浏览代码

[facebook] Improve login required detection

Sergey M․ 4 年之前
父节点
当前提交
bb7ac1ed66
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      youtube_dl/extractor/facebook.py

+ 4 - 1
youtube_dl/extractor/facebook.py

@@ -521,7 +521,10 @@ class FacebookIE(InfoExtractor):
                 raise ExtractorError(
                     'The video is not available, Facebook said: "%s"' % m_msg.group(1),
                     expected=True)
-            elif '>You must log in to continue' in webpage:
+            elif any(p in webpage for p in (
+                    '>You must log in to continue',
+                    'id="login_form"',
+                    'id="loginbutton"')):
                 self.raise_login_required()
 
         if not video_data and '/watchparty/' in url: