summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yeetube.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/yeetube.el b/yeetube.el
index da9d998..d366075 100644
--- a/yeetube.el
+++ b/yeetube.el
@@ -226,8 +226,15 @@ WHERE indicates where in the buffer the update should happen."
(yeetube-get-content-youtube)
(yeetube-buffer-create query yeetube-content 'yeetube-mode)))
-
-(defun yeetube-get-content-youtube ()
+(defun yeetube-get-item (query)
+ "Get item from youtube results for QUERY.
+
+Video result starts with videorenderer.
+Search back to videorenderer (start of video results),
+then for item."
+ (search-backward "videorenderer" nil t)
+ (search-forward query nil t)
+ (search-forward "text" nil t))
"Get content from youtube."
(setf yeetube-content nil)
;; we define these temp lists to keep tract of video-ids and