mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-11 02:37:18 +08:00
Merge branch 'fix-facebook-date' into fix.25.12.2018
This commit is contained in:
commit
fabc416b73
@ -354,7 +354,6 @@ class FacebookIE(InfoExtractor):
|
|||||||
video_id, transform_source=js_to_json, fatal=False)
|
video_id, transform_source=js_to_json, fatal=False)
|
||||||
video_data = extract_from_jsmods_instances(server_js_data)
|
video_data = extract_from_jsmods_instances(server_js_data)
|
||||||
|
|
||||||
tahoe_secondary_data = ''
|
|
||||||
if not video_data:
|
if not video_data:
|
||||||
if not fatal_if_no_video:
|
if not fatal_if_no_video:
|
||||||
return webpage, False
|
return webpage, False
|
||||||
@ -396,6 +395,8 @@ class FacebookIE(InfoExtractor):
|
|||||||
data=tahoe_request_data,
|
data=tahoe_request_data,
|
||||||
headers=tahoe_request_headers, fatal=False
|
headers=tahoe_request_headers, fatal=False
|
||||||
)
|
)
|
||||||
|
if not tahoe_secondary_data:
|
||||||
|
tahoe_secondary_data = ''
|
||||||
|
|
||||||
tahoe_js_data = self._parse_json(
|
tahoe_js_data = self._parse_json(
|
||||||
self._search_regex(
|
self._search_regex(
|
||||||
@ -466,7 +467,7 @@ class FacebookIE(InfoExtractor):
|
|||||||
uploader_id = self._search_regex(
|
uploader_id = self._search_regex(
|
||||||
r'ownerid:"([\d]+)', webpage,
|
r'ownerid:"([\d]+)', webpage,
|
||||||
'uploader_id', default=None) or self._search_regex(
|
'uploader_id', default=None) or self._search_regex(
|
||||||
r'\"ownerid\":"(\d+)"', tahoe_secondary_data,
|
r'[\'\"]ownerid[\'\"]\s*:\s*[\'\"](\d+)[\'\"]', tahoe_secondary_data,
|
||||||
'uploader_id', fatal=False)
|
'uploader_id', fatal=False)
|
||||||
|
|
||||||
thumbnail = self._og_search_thumbnail(webpage)
|
thumbnail = self._og_search_thumbnail(webpage)
|
||||||
@ -474,11 +475,11 @@ class FacebookIE(InfoExtractor):
|
|||||||
view_count = parse_count(self._search_regex(
|
view_count = parse_count(self._search_regex(
|
||||||
r'\bpostViewCount\s*:\s*["\']([\d,.]+)', webpage, 'view count',
|
r'\bpostViewCount\s*:\s*["\']([\d,.]+)', webpage, 'view count',
|
||||||
default=None) or self._search_regex(
|
default=None) or self._search_regex(
|
||||||
r'\"postViewCount\"\s*:\s*(\d+)', tahoe_secondary_data, 'view count',
|
r'[\'\"]postViewCount[\'\"]\s*:\s*(\d+)', tahoe_secondary_data, 'view count',
|
||||||
default=None) or self._search_regex(
|
default=None) or self._search_regex(
|
||||||
r'\bviewCount\s*:\s*["\']([\d,.]+)', webpage, 'view count',
|
r'\bviewCount\s*:\s*["\']([\d,.]+)', webpage, 'view count',
|
||||||
default=None) or self._search_regex(
|
default=None) or self._search_regex(
|
||||||
r'\"viewCount\"\s*:\s*(\d+)', tahoe_secondary_data, 'view count',
|
r'[\'\"]viewCount[\'\"]\s*:\s*(\d+)', tahoe_secondary_data, 'view count',
|
||||||
default=None)
|
default=None)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user