add description and hash value in tests
This commit is contained in:
parent
ab410f7476
commit
826c5473c1
@ -17,11 +17,12 @@ class GenVideosIE(InfoExtractor):
|
|||||||
# * http://genvideos.org/watch_kMjlhMWE5OT.html#video=tBa-Q-WkbPqwzs34b7ArqU7VomQMb2n-RAlARWKWKTI
|
# * http://genvideos.org/watch_kMjlhMWE5OT.html#video=tBa-Q-WkbPqwzs34b7ArqU7VomQMb2n-RAlARWKWKTI
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'http://genvideos.org/watch?v=kMjlhMWE5OT',
|
'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': {
|
'info_dict': {
|
||||||
'id': 'kMjlhMWE5OT',
|
'id': 'kMjlhMWE5OT',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'The Hunger Games (2012) - HD 1080p',
|
'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$',
|
#'thumbnail': 're:^https?://.*\.jpg$',
|
||||||
# TODO more properties, either as:
|
# TODO more properties, either as:
|
||||||
# * A value
|
# * A value
|
||||||
@ -31,10 +32,12 @@ class GenVideosIE(InfoExtractor):
|
|||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://genvideos.org/watch?v=Pitch_Perfect_2_2015#video=tBa-Q-WkbPqwzs34b7ArqU7VomQMb2n-RAlARWKWKTI',
|
'url': 'https://genvideos.org/watch?v=Pitch_Perfect_2_2015#video=tBa-Q-WkbPqwzs34b7ArqU7VomQMb2n-RAlARWKWKTI',
|
||||||
|
'md5': '441b5c9f0445724b0f6f9d6e5498e577',
|
||||||
'info_dict':{
|
'info_dict':{
|
||||||
'id': 'Pitch_Perfect_2_2015',
|
'id': 'Pitch_Perfect_2_2015',
|
||||||
'ext': 'mp4',
|
'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)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
title = self._html_search_regex(r'<h1>(.+?)</h1>', webpage, 'title')
|
title = self._html_search_regex(r'<h1>(.+?)</h1>', webpage, 'title')
|
||||||
print("Title - " + title)
|
|
||||||
#TODO retrieve video url
|
#TODO retrieve video url
|
||||||
urls_data = requests.post(
|
urls_data = requests.post(
|
||||||
"https://genvideos.org/video_info/iframe",
|
"https://genvideos.org/video_info/iframe",
|
||||||
@ -56,13 +58,12 @@ class GenVideosIE(InfoExtractor):
|
|||||||
#_360p_url = urllib.urlopen(_360p_redirect_url).geturl()
|
#_360p_url = urllib.urlopen(_360p_redirect_url).geturl()
|
||||||
# TODO : return all possible formats instead of just 360p
|
# TODO : return all possible formats instead of just 360p
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
'url': _360p_url,
|
'url': _360p_url,
|
||||||
'ext': 'mp4'
|
'ext': 'mp4',
|
||||||
#'description': self._og_search_description(webpage),
|
'description': self._og_search_description(webpage),
|
||||||
#'uploader': self._search_regex(r'<div[^>]+id="uploader"[^>]*>([^<]+)<', webpage, 'uploader', fatal=False),
|
#'uploader': self._search_regex(r'<div[^>]+id="uploader"[^>]*>([^<]+)<', webpage, 'uploader', fatal=False),
|
||||||
# TODO more properties (see youtube_dl/extractor/common.py)
|
# TODO more properties (see youtube_dl/extractor/common.py)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user