mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-26 04:02:11 +00:00
ArteTVIE: support emission urls that don't contain the video id
Like http://www.arte.tv/guide/fr/emissions/AJT/arte-journal
This commit is contained in:
parent
c536d38059
commit
9941ceb331
1 changed files with 6 additions and 1 deletions
|
@ -77,7 +77,12 @@ class ArteTvIE(InfoExtractor):
|
||||||
|
|
||||||
def _extract_emission(self, url, video_id, lang):
|
def _extract_emission(self, url, video_id, lang):
|
||||||
"""Extract from www.arte.tv/guide"""
|
"""Extract from www.arte.tv/guide"""
|
||||||
json_url = 'http://org-www.arte.tv/papi/tvguide/videos/stream/player/F/%s_PLUS7-F/ALL/ALL.json' % video_id
|
if video_id.replace('-','').isdigit():
|
||||||
|
json_url = 'http://org-www.arte.tv/papi/tvguide/videos/stream/player/F/%s_PLUS7-F/ALL/ALL.json' % video_id
|
||||||
|
else:
|
||||||
|
# We don't know the real id of the video, we have to search in the webpage
|
||||||
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
json_url = self._html_search_regex(r'arte_vp_url="(.*?)"', webpage, 'json url')
|
||||||
|
|
||||||
json_info = self._download_webpage(json_url, video_id, 'Downloading info json')
|
json_info = self._download_webpage(json_url, video_id, 'Downloading info json')
|
||||||
self.report_extraction(video_id)
|
self.report_extraction(video_id)
|
||||||
|
|
Loading…
Reference in a new issue