mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-08 17:02:51 +08:00
missing metadate fix
This commit is contained in:
parent
cd13c98582
commit
64b596f672
@ -1,6 +1,7 @@
|
||||
# coding: utf-8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import datetime
|
||||
import re
|
||||
import socket
|
||||
|
||||
@ -25,10 +26,12 @@ from ..utils import (
|
||||
try_get,
|
||||
urlencode_postdata,
|
||||
update_url_query,
|
||||
lowercase_escape
|
||||
lowercase_escape,
|
||||
parse_iso8601
|
||||
)
|
||||
|
||||
|
||||
|
||||
class FacebookIE(InfoExtractor):
|
||||
_VALID_URL = r'''(?x)
|
||||
(?:
|
||||
@ -451,7 +454,12 @@ class FacebookIE(InfoExtractor):
|
||||
self._search_regex(r'ownerName"\s*:\s*"([^"]+)"', webpage, 'uploader', default=None) or \
|
||||
self._og_search_title(webpage, default=None)
|
||||
|
||||
|
||||
if webpage.find('Paid Partnership'):
|
||||
timestamp = self._search_regex(
|
||||
r'datePublished":"(.+?)"', webpage,
|
||||
'timestamp', default=None)
|
||||
timestamp = parse_iso8601(timestamp)
|
||||
else:
|
||||
timestamp = int_or_none(self._search_regex(
|
||||
r'data-utime=\\\"(\d+)\\\"', tahoe_data.secondary,
|
||||
'timestamp', default=None) or self._search_regex(
|
||||
@ -460,6 +468,7 @@ class FacebookIE(InfoExtractor):
|
||||
r'publish_time":([\d]+)', webpage,
|
||||
'timestamp', default=None))
|
||||
|
||||
|
||||
uploader_id = self._search_regex(
|
||||
r'ownerid:"([\d]+)', webpage,
|
||||
'uploader_id', default=None) or self._search_regex(
|
||||
@ -631,7 +640,6 @@ class FacebookIE(InfoExtractor):
|
||||
video_title = 'Facebook video #%s' % video_id
|
||||
return video_title
|
||||
|
||||
|
||||
class FacebookTahoeData:
|
||||
def __init__(self, extractor, page, video_id):
|
||||
self._page = page
|
||||
|
Loading…
Reference in New Issue
Block a user