mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-30 19:02:55 +01:00
[revison3] fix video_id for --download-archive
This commit is contained in:
parent
51ce91174b
commit
2629a3802c
@ -19,7 +19,7 @@ class Revision3IE(InfoExtractor):
|
|||||||
'url': 'http://www.revision3.com/technobuffalo/5-google-predictions-for-2016',
|
'url': 'http://www.revision3.com/technobuffalo/5-google-predictions-for-2016',
|
||||||
'md5': 'd94a72d85d0a829766de4deb8daaf7df',
|
'md5': 'd94a72d85d0a829766de4deb8daaf7df',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '73034',
|
'id': '71089',
|
||||||
'display_id': 'technobuffalo/5-google-predictions-for-2016',
|
'display_id': 'technobuffalo/5-google-predictions-for-2016',
|
||||||
'ext': 'webm',
|
'ext': 'webm',
|
||||||
'title': '5 Google Predictions for 2016',
|
'title': '5 Google Predictions for 2016',
|
||||||
@ -42,7 +42,7 @@ class Revision3IE(InfoExtractor):
|
|||||||
}, {
|
}, {
|
||||||
'url': 'https://testtube.com/dnews/5-weird-ways-plants-can-eat-animals?utm_source=FB&utm_medium=DNews&utm_campaign=DNewsSocial',
|
'url': 'https://testtube.com/dnews/5-weird-ways-plants-can-eat-animals?utm_source=FB&utm_medium=DNews&utm_campaign=DNewsSocial',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '60163',
|
'id': '58227',
|
||||||
'display_id': 'dnews/5-weird-ways-plants-can-eat-animals',
|
'display_id': 'dnews/5-weird-ways-plants-can-eat-animals',
|
||||||
'duration': 275,
|
'duration': 275,
|
||||||
'ext': 'webm',
|
'ext': 'webm',
|
||||||
@ -56,7 +56,7 @@ class Revision3IE(InfoExtractor):
|
|||||||
}, {
|
}, {
|
||||||
'url': 'http://testtube.com/tt-editors-picks/the-israel-palestine-conflict-explained-in-ten-min',
|
'url': 'http://testtube.com/tt-editors-picks/the-israel-palestine-conflict-explained-in-ten-min',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '73573',
|
'id': '71618',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'display_id': 'tt-editors-picks/the-israel-palestine-conflict-explained-in-ten-min',
|
'display_id': 'tt-editors-picks/the-israel-palestine-conflict-explained-in-ten-min',
|
||||||
'title': 'The Israel-Palestine Conflict Explained in Ten Minutes',
|
'title': 'The Israel-Palestine Conflict Explained in Ten Minutes',
|
||||||
@ -81,6 +81,7 @@ class Revision3IE(InfoExtractor):
|
|||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
domain, display_id = re.match(self._VALID_URL, url).groups()
|
domain, display_id = re.match(self._VALID_URL, url).groups()
|
||||||
|
site = domain.split('.')[0]
|
||||||
page_info = self._download_json(
|
page_info = self._download_json(
|
||||||
self._PAGE_DATA_TEMPLATE % (domain, display_id, domain), display_id)
|
self._PAGE_DATA_TEMPLATE % (domain, display_id, domain), display_id)
|
||||||
|
|
||||||
@ -88,6 +89,7 @@ class Revision3IE(InfoExtractor):
|
|||||||
page_type = page_data['type']
|
page_type = page_data['type']
|
||||||
if page_type in ('episode', 'embed'):
|
if page_type in ('episode', 'embed'):
|
||||||
show_data = page_data['show']['data']
|
show_data = page_data['show']['data']
|
||||||
|
page_id = compat_str(page_data['id'])
|
||||||
video_id = compat_str(page_data['video']['data']['id'])
|
video_id = compat_str(page_data['video']['data']['id'])
|
||||||
|
|
||||||
preference = qualities(['mini', 'small', 'medium', 'large'])
|
preference = qualities(['mini', 'small', 'medium', 'large'])
|
||||||
@ -98,7 +100,7 @@ class Revision3IE(InfoExtractor):
|
|||||||
} for image_id, image_url in page_data.get('images', {}).items()]
|
} for image_id, image_url in page_data.get('images', {}).items()]
|
||||||
|
|
||||||
info = {
|
info = {
|
||||||
'id': video_id,
|
'id': page_id,
|
||||||
'display_id': display_id,
|
'display_id': display_id,
|
||||||
'title': unescapeHTML(page_data['name']),
|
'title': unescapeHTML(page_data['name']),
|
||||||
'description': unescapeHTML(page_data.get('summary')),
|
'description': unescapeHTML(page_data.get('summary')),
|
||||||
@ -107,6 +109,7 @@ class Revision3IE(InfoExtractor):
|
|||||||
'uploader': show_data.get('name'),
|
'uploader': show_data.get('name'),
|
||||||
'uploader_id': show_data.get('slug'),
|
'uploader_id': show_data.get('slug'),
|
||||||
'thumbnails': thumbnails,
|
'thumbnails': thumbnails,
|
||||||
|
'extractor_key': site,
|
||||||
}
|
}
|
||||||
|
|
||||||
if page_type == 'embed':
|
if page_type == 'embed':
|
||||||
@ -153,8 +156,13 @@ class Revision3IE(InfoExtractor):
|
|||||||
entries = []
|
entries = []
|
||||||
page_num = 1
|
page_num = 1
|
||||||
while True:
|
while True:
|
||||||
entries.extend([self.url_result(
|
entries.extend([{
|
||||||
'http://%s%s' % (domain, episode['path'])) for episode in episodes_data])
|
'_type': 'url',
|
||||||
|
'url': 'http://%s%s' % (domain, episode['path']),
|
||||||
|
'id': compat_str(episode['id']),
|
||||||
|
'ie_key': 'Revision3',
|
||||||
|
'extractor_key': site,
|
||||||
|
} for episode in episodes_data])
|
||||||
processed_episodes += len(episodes_data)
|
processed_episodes += len(episodes_data)
|
||||||
if processed_episodes == num_episodes:
|
if processed_episodes == num_episodes:
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user