diff --git a/youtube_dl/extractor/genvideos.py b/youtube_dl/extractor/genvideos.py index e5ec20c7a..d3362e059 100644 --- a/youtube_dl/extractor/genvideos.py +++ b/youtube_dl/extractor/genvideos.py @@ -17,11 +17,12 @@ class GenVideosIE(InfoExtractor): # * http://genvideos.org/watch_kMjlhMWE5OT.html#video=tBa-Q-WkbPqwzs34b7ArqU7VomQMb2n-RAlARWKWKTI _TESTS = [{ 'url': 'http://genvideos.org/watch?v=kMjlhMWE5OT', - #'md5': 'TODO: md5 sum of the first 10241 bytes of the video file (use --test)', + 'md5': '666118ec1176f14259bb9f11c74bea83', 'info_dict': { 'id': 'kMjlhMWE5OT', 'ext': 'mp4', 'title': 'The Hunger Games (2012) - HD 1080p', + 'description': 'In a dystopian future, the totalitarian nation of Panem is divided between 12 districts and the Capitol. Each year two young representatives from each distri...' #'thumbnail': 're:^https?://.*\.jpg$', # TODO more properties, either as: # * A value @@ -31,10 +32,12 @@ class GenVideosIE(InfoExtractor): } }, { 'url': 'https://genvideos.org/watch?v=Pitch_Perfect_2_2015#video=tBa-Q-WkbPqwzs34b7ArqU7VomQMb2n-RAlARWKWKTI', + 'md5': '441b5c9f0445724b0f6f9d6e5498e577', 'info_dict':{ 'id': 'Pitch_Perfect_2_2015', 'ext': 'mp4', - 'title': 'Pitch Perfect 2 (2015) - HD 1080p' + 'title': 'Pitch Perfect 2 (2015) - HD 1080p', + 'description': 'The Bellas are back, and they are better than ever. After being humiliated in front of none other than the President of the United States of America, the Bel...' } }] @@ -43,7 +46,6 @@ class GenVideosIE(InfoExtractor): webpage = self._download_webpage(url, video_id) title = self._html_search_regex(r'

(.+?)

', webpage, 'title') - print("Title - " + title) #TODO retrieve video url urls_data = requests.post( "https://genvideos.org/video_info/iframe", @@ -56,13 +58,12 @@ class GenVideosIE(InfoExtractor): #_360p_url = urllib.urlopen(_360p_redirect_url).geturl() # TODO : return all possible formats instead of just 360p - return { 'id': video_id, 'title': title, 'url': _360p_url, - 'ext': 'mp4' - #'description': self._og_search_description(webpage), + 'ext': 'mp4', + 'description': self._og_search_description(webpage), #'uploader': self._search_regex(r']+id="uploader"[^>]*>([^<]+)<', webpage, 'uploader', fatal=False), # TODO more properties (see youtube_dl/extractor/common.py) }