From 81aa8614be3b47b4d6b2ee1f1bfae53bae9c5863 Mon Sep 17 00:00:00 2001 From: ajj8 <35781586+ajj8@users.noreply.github.com> Date: Tue, 14 Jan 2020 21:31:26 +0000 Subject: [PATCH] Update facebook.py --- youtube_dl/extractor/facebook.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/facebook.py b/youtube_dl/extractor/facebook.py index 36f52e1ef..e6f156a56 100644 --- a/youtube_dl/extractor/facebook.py +++ b/youtube_dl/extractor/facebook.py @@ -512,6 +512,7 @@ class FacebookPluginsVideoIE(InfoExtractor): compat_urllib_parse_unquote(self._match_id(url)), FacebookIE.ie_key()) + class FacebookUserIE(InfoExtractor): _VALID_URL = r'(?Phttps?://(?:[^/]+\.)?facebook\.com/(?:pg/)?(?P[^/?#&]+))/videos(?!/\d)' @@ -549,7 +550,7 @@ class FacebookUserIE(InfoExtractor): page, 'collection_token', default=None) cursor = None entries = [] - + if fb_url_mobj.group('type') == 'page': endpoint = 'PagesVideoHubVideoContainerPagelet' a_class = '_5asm' @@ -590,7 +591,7 @@ class FacebookUserIE(InfoExtractor): user_id, fatal=True) for video in re.findall( - r'href="(?P[^"]+)"[^>]+%s' % a_class, + r'href="(?P[^"]+)"[^>]+%s' % a_class, js_data['payload']): entries.append( self.url_result( @@ -599,7 +600,7 @@ class FacebookUserIE(InfoExtractor): cursor = None if fb_url_mobj.group('type') == 'page': - if not 'instances' in js_data['jsmods']: + if 'instances' not in js_data['jsmods']: break for parent in js_data['jsmods']['instances']: if type(parent) is list: