mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-09 22:39:32 +01:00
[dailymotion] improve the regex for extracting the video info
This commit is contained in:
parent
9c2ade40de
commit
4ff7a0f1f6
@ -55,7 +55,8 @@ def _real_extract(self, url):
|
|||||||
embed_url = 'http://www.dailymotion.com/embed/video/%s' % video_id
|
embed_url = 'http://www.dailymotion.com/embed/video/%s' % video_id
|
||||||
embed_page = self._download_webpage(embed_url, video_id,
|
embed_page = self._download_webpage(embed_url, video_id,
|
||||||
u'Downloading embed page')
|
u'Downloading embed page')
|
||||||
info = self._search_regex(r'var info = ({.*?}),', embed_page, 'video info')
|
info = self._search_regex(r'var info = ({.*?}),$', embed_page,
|
||||||
|
'video info', flags=re.MULTILINE)
|
||||||
info = json.loads(info)
|
info = json.loads(info)
|
||||||
|
|
||||||
# TODO: support choosing qualities
|
# TODO: support choosing qualities
|
||||||
|
Loading…
Reference in New Issue
Block a user