mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-17 15:25:49 +00:00
Fix Facebook IE
This commit is contained in:
parent
233a22960a
commit
edba5137b8
@ -2050,8 +2050,10 @@ def _real_extract(self, url):
|
|||||||
if not m:
|
if not m:
|
||||||
raise ExtractorError(u'Cannot parse data')
|
raise ExtractorError(u'Cannot parse data')
|
||||||
data = dict(json.loads(m.group(1)))
|
data = dict(json.loads(m.group(1)))
|
||||||
video_url = compat_urllib_parse.unquote(data['hd_src'])
|
params_raw = compat_urllib_parse.unquote(data['params'])
|
||||||
video_duration = int(data['video_duration'])
|
params = json.loads(params_raw)
|
||||||
|
video_url = params['hd_src']
|
||||||
|
video_duration = int(params['video_duration'])
|
||||||
|
|
||||||
m = re.search('<h2 class="uiHeaderTitle">([^<]+)</h2>', webpage)
|
m = re.search('<h2 class="uiHeaderTitle">([^<]+)</h2>', webpage)
|
||||||
if not m:
|
if not m:
|
||||||
@ -2064,7 +2066,7 @@ def _real_extract(self, url):
|
|||||||
'url': video_url,
|
'url': video_url,
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'duration': video_duration,
|
'duration': video_duration,
|
||||||
'thumbnail': data['thumbnail_src'],
|
'thumbnail': params['thumbnail_src'],
|
||||||
}
|
}
|
||||||
return [info]
|
return [info]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user