New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facebook login TWOFACTOR functionality missing #30337
Comments
see under authentication options - https://github.com/ytdl-org/youtube-dl/blob/master/README.md#readme |
Thanks for reply, if you see the Command-line args in my debug log, I did pass the
|
strange, i was able to download this video - https://www.facebook.com/106937041769662/videos/601957961078153/ |
Yes, I signed in to my Facebook account, but it didn't go thru the 2 factor approvals, the program should perform like this: login_results = self._download_webpage(request, None,note='Logging in', errnote='unable to fetch login page')
if re.search(r'<form(.*)name="login"(.*)</form>', login_results) is not None:
error = self._html_search_regex(
r'(?s)<div[^>]+class=(["\']).*?login_error_box.*?\1[^>]*><div[^>]*>.*?</div><div[^>]*>(?P<error>.+?)</div>',
login_results, 'login error', default=None, group='error')
if error:
raise ExtractorError('Unable to login: %s' % error, expected=True)
self._downloader.report_warning('unable to log in: bad username/password, or exceeded login rate limit (~3/min). Check credentials or wait.')
return
fb_dtsg = self._search_regex(r'name="fb_dtsg" value="(.+?)"', login_results, 'fb_dtsg', default=None)
h = self._search_regex(r'name="h"\s+(?:\w+="[^"]+"\s+)*?value="([^"]+)"', login_results, 'h', default=None)
if not fb_dtsg or not h:
return
|
Facebook is tricky. Even if a video can be viewed without login, the login page may be returned to youtube-dl. If there's no problem at first, the login page may be returned even to browsers after repeated attempts. Or It may be related to your location or network. For your URL, I too can download the video without login info. If I use a proxy in other countries, sometimes login page is returned, sometimes still no problem. What users can do would be:
|
Checklist
Verbose log
Description
Trying to download a facebook post video, debug log shows I successfully logged in, but still shows
This video is only available for registered users.
. I went thru the facebook login code, didn't find anything about TWOFACTOR functionality, am I missing something?The text was updated successfully, but these errors were encountered: