mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-08-30 19:15:56 +02:00
[nowvideo] Fix key extraction
Extract it from the embed page
This commit is contained in:
parent
3126050c0f
commit
2450bcb28b
@ -20,7 +20,10 @@ def _real_extract(self, url):
|
|||||||
|
|
||||||
video_id = mobj.group('id')
|
video_id = mobj.group('id')
|
||||||
webpage_url = 'http://www.nowvideo.ch/video/' + video_id
|
webpage_url = 'http://www.nowvideo.ch/video/' + video_id
|
||||||
|
embed_url = 'http://embed.nowvideo.ch/embed.php?v=' + video_id
|
||||||
webpage = self._download_webpage(webpage_url, video_id)
|
webpage = self._download_webpage(webpage_url, video_id)
|
||||||
|
embed_page = self._download_webpage(embed_url, video_id,
|
||||||
|
u'Downloading embed page')
|
||||||
|
|
||||||
self.report_extraction(video_id)
|
self.report_extraction(video_id)
|
||||||
|
|
||||||
@ -28,7 +31,7 @@ def _real_extract(self, url):
|
|||||||
webpage, u'video title')
|
webpage, u'video title')
|
||||||
|
|
||||||
video_key = self._search_regex(r'var fkzd="(.*)";',
|
video_key = self._search_regex(r'var fkzd="(.*)";',
|
||||||
webpage, u'video key')
|
embed_page, u'video key')
|
||||||
|
|
||||||
api_call = "http://www.nowvideo.ch/api/player.api.php?file={0}&numOfErrors=0&cid=1&key={1}".format(video_id, video_key)
|
api_call = "http://www.nowvideo.ch/api/player.api.php?file={0}&numOfErrors=0&cid=1&key={1}".format(video_id, video_key)
|
||||||
api_response = self._download_webpage(api_call, video_id,
|
api_response = self._download_webpage(api_call, video_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user