1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-10 06:47:14 +08:00

Merge pull request #298 from aviperes/facebook-tahoe-bug

trying to get video-date using the tahoe data before giving up
This commit is contained in:
aviperes 2020-04-22 20:03:02 +03:00 committed by GitHub
commit cd54efa8ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -362,6 +362,15 @@ class FacebookIE(InfoExtractor):
video_data = extract_from_jsmods_instances(server_js_data)
tahoe_data = FacebookTahoeData(self, webpage, video_id)
if not video_data:
tahoe_js_data = self._parse_json(
self._search_regex(
r'for\s+\(\s*;\s*;\s*\)\s*;(.+)', tahoe_data.primary,
'tahoe js data', default='{}'),
video_id, fatal=False)
video_data = extract_from_jsmods_instances(tahoe_js_data)
if not video_data:
if not fatal_if_no_video:
return webpage, False
@ -372,15 +381,6 @@ class FacebookIE(InfoExtractor):
expected=True)
elif '>You must log in to continue' in webpage:
self.raise_login_required()
# Video info not in first request, do a secondary request using
# tahoe player specific URL
tahoe_js_data = self._parse_json(
self._search_regex(
r'for\s+\(\s*;\s*;\s*\)\s*;(.+)', tahoe_data.primary,
'tahoe js data', default='{}'),
video_id, fatal=False)
video_data = extract_from_jsmods_instances(tahoe_js_data)
if not video_data :
if self._search_regex(r'newsFeedStream.*?<h1><span class.*?>(.*?)<\/span><\/h1>', webpage, "video_title") is not None: