Skip to content

Commit

Permalink
[facebook] Improve login required detection
Browse files Browse the repository at this point in the history
  • Loading branch information
dstftw committed Jun 5, 2021
1 parent fdf91c5 commit bb7ac1e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion youtube_dl/extractor/facebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,10 @@ def parse_attachment(attachment, key='media'):
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:
Expand Down

0 comments on commit bb7ac1e

Please sign in to comment.