fix facebook channel handle.
This commit is contained in:
parent
0c0cab39e9
commit
88081b0795
@ -482,9 +482,7 @@ class FacebookIE(InfoExtractor):
|
|||||||
shares_count = parse_count(self._extract_shares(webpage, tahoe_data))
|
shares_count = parse_count(self._extract_shares(webpage, tahoe_data))
|
||||||
comment_count = parse_count(self._extract_comments_count(webpage, tahoe_data))
|
comment_count = parse_count(self._extract_comments_count(webpage, tahoe_data))
|
||||||
|
|
||||||
uploader_handle = self._search_regex(r'"video_path":"\\\/([^\/]+)\\\/', tahoe_data.primary, 'uploader_handle', fatal=False)
|
uploader_handle = self._resolve_uploader_handle(tahoe_data, uploader_id)
|
||||||
if uploader_handle:
|
|
||||||
uploader_handle = uploader_handle.lower()
|
|
||||||
info_dict = {
|
info_dict = {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': video_title,
|
'title': video_title,
|
||||||
@ -512,6 +510,16 @@ class FacebookIE(InfoExtractor):
|
|||||||
|
|
||||||
return webpage, info_dict
|
return webpage, info_dict
|
||||||
|
|
||||||
|
def _resolve_uploader_handle(self, tahoe_data, uploader_id):
|
||||||
|
uploader_handle = self._search_regex(r'"video_path":"\\\/([^\/]+)\\\/', tahoe_data.primary, 'uploader_handle',
|
||||||
|
fatal=False)
|
||||||
|
if uploader_handle == uploader_id:
|
||||||
|
uploader_handle = self._search_regex(r'href=\\"https:\\\/\\\/www.facebook.com\\\/(.+?)\\\/\\', tahoe_data.secondary,
|
||||||
|
'uploader_handle',
|
||||||
|
fatal=False)
|
||||||
|
|
||||||
|
return uploader_handle
|
||||||
|
|
||||||
def _extract_meta_count(self, fields, webpage, tahoe_data, name, ):
|
def _extract_meta_count(self, fields, webpage, tahoe_data, name, ):
|
||||||
value = None
|
value = None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user