Facebook timestamp fix (#320)
* missing metadate fix * timestamp fix * timestamp conditions fix * timestamp conditions fix * timestamp conditions fix Co-authored-by: bhodaya <bhodaya@videocites.com>
This commit is contained in:
parent
5fada70cbf
commit
846b092130
@ -454,16 +454,30 @@ class FacebookIE(InfoExtractor):
|
|||||||
self._search_regex(r'ownerName"\s*:\s*"([^"]+)"', webpage, 'uploader', default=None) or \
|
self._search_regex(r'ownerName"\s*:\s*"([^"]+)"', webpage, 'uploader', default=None) or \
|
||||||
self._og_search_title(webpage, default=None)
|
self._og_search_title(webpage, default=None)
|
||||||
|
|
||||||
if webpage.find('Paid Partnership'):
|
timestamp = self._search_regex(
|
||||||
timestamp = self._search_regex(
|
r'datePublished":"(.+?)"', webpage,'timestamp', default=None)\
|
||||||
r'datePublished":"(.+?)"', webpage,
|
or self._search_regex(r'datePublished":"(.+?)"', tahoe_data.secondary, 'timestamp', default=None)\
|
||||||
'timestamp', default=None)
|
or self._search_regex(r'datePublished":"(.+?)"', tahoe_data.primary, 'timestamp', default=None)
|
||||||
timestamp = parse_iso8601(timestamp)
|
timestamp = parse_iso8601(timestamp)
|
||||||
else:
|
|
||||||
timestamp = int_or_none(
|
if timestamp == None and webpage.find('Paid Partnership') == -1 or\
|
||||||
self._search_regex(r'data-utime=\\\"(\d+)\\\"', tahoe_data.secondary,'timestamp', default=None)
|
(timestamp == None and webpage.find('Paid Partnership') > -1 and
|
||||||
or self._search_regex(r'<abbr[^>]+data-utime=["\'](\d+)', webpage, 'timestamp', default=None)
|
'cookiefile' in self._downloader.params):
|
||||||
) or int_or_none(self._search_regex(r'publish_time":([\d]+)', webpage, 'timestamp', default=None))
|
|
||||||
|
regex_search_result_date_time = self._search_regex(r'data-utime=\\\"(\d+)\\\"', tahoe_data.secondary, 'timestamp', default=None)\
|
||||||
|
or self._search_regex(r'data-utime=\\\"(\d+)\\\"', tahoe_data.primary, 'timestamp', default=None)\
|
||||||
|
or self._search_regex(r'data-utime=\\\"(\d+)\\\"', webpage,'timestamp', default=None)\
|
||||||
|
or self._search_regex(r'<abbr[^>]+data-utime=["\'](\d+)', webpage, 'timestamp', default=None)\
|
||||||
|
or self._search_regex(r'<abbr[^>]+data-utime=["\'](\d+)', tahoe_data.secondary, 'timestamp', default=None)\
|
||||||
|
or self._search_regex(r'<abbr[^>]+data-utime=["\'](\d+)', tahoe_data.primary, 'timestamp', default=None)
|
||||||
|
|
||||||
|
regex_search_result_publish_time = self._search_regex(r'publish_time":([\d]+)', webpage, 'timestamp', default=None)\
|
||||||
|
or self._search_regex(r'publish_time":([\d]+)', tahoe_data.primary, 'timestamp', default=None)\
|
||||||
|
or self._search_regex(r'publish_time":([\d]+)', tahoe_data.secondary, 'timestamp', default=None)
|
||||||
|
|
||||||
|
timestamp = int_or_none(regex_search_result_date_time) or int_or_none(regex_search_result_publish_time)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
uploader_id = self._search_regex(
|
uploader_id = self._search_regex(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user