Add YoutubeSearchDateIE extractor to youtube.py & __init__.py, which searches by...
authorCraig Markwardt <cbmarkwardt+github@gmail.com>
Sun, 3 Nov 2013 02:40:48 +0000 (22:40 -0400)
committerCraig Markwardt <cbmarkwardt+github@gmail.com>
Sun, 3 Nov 2013 02:40:48 +0000 (22:40 -0400)
youtube_dl/extractor/__init__.py
youtube_dl/extractor/youtube.py

index bcf1cce7f9f52ba4283e975393640ebe3d8f9fd2..abdee8eb098fd6c986f24e4d4d39ae8a7765320c 100644 (file)
@@ -159,6 +159,7 @@ from .youtube import (
     YoutubeIE,
     YoutubePlaylistIE,
     YoutubeSearchIE,
+    YoutubeSearchDateIE,
     YoutubeUserIE,
     YoutubeChannelIE,
     YoutubeShowIE,
index dc601de520bae7f83b5e64aa87a1f7e77161385c..6b5ce068d08e0461d3cbde30e6fdf518b2d101ac 100644 (file)
@@ -1743,6 +1743,9 @@ class YoutubeSearchIE(SearchInfoExtractor):
         videos = [self.url_result('http://www.youtube.com/watch?v=%s' % id, 'Youtube') for id in video_ids]
         return self.playlist_result(videos, query)
 
+class YoutubeSearchDateIE(YoutubeSearchIE):
+    _API_URL = 'https://gdata.youtube.com/feeds/api/videos?q=%s&start-index=%i&max-results=50&v=2&alt=jsonc&orderby=published'
+    _SEARCH_KEY = 'ytsearchdate'
 
 class YoutubeShowIE(InfoExtractor):
     IE_DESC = u'YouTube.com (multi-season) shows'