Skip to content
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

unable to extract facebook video in private group, user with two-factor auth #4785

Open
jakutis opened this issue Jan 26, 2015 · 8 comments
Open
Labels

Comments

@jakutis
Copy link

@jakutis jakutis commented Jan 26, 2015

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['https://www.facebook.com/video.php?v=PRIVATE', '--username', u'PRIVATE', '--password', u'PRIVATE', '--twofactor', 'PRIVATE', '--verbose']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.01.25
[debug] Python version 2.7.8 - Linux-3.18.2-2-ARCH-x86_64-with-glibc2.2.5
[debug] exe versions: ffmpeg 2.5.2, ffprobe 2.5.2, rtmpdump 2.4
[debug] Proxy map: {}
[facebook] Downloading login page
[facebook] Logging in
ERROR: Unable to extract h; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/home/jakutis/.bin/youtube-dl/youtube_dl/YoutubeDL.py", line 613, in extract_info
    ie_result = ie.extract(url)
  File "/home/jakutis/.bin/youtube-dl/youtube_dl/extractor/common.py", line 265, in extract
    self.initialize()
  File "/home/jakutis/.bin/youtube-dl/youtube_dl/extractor/common.py", line 260, in initialize
    self._real_initialize()
  File "/home/jakutis/.bin/youtube-dl/youtube_dl/extractor/facebook.py", line 107, in _real_initialize
    self._login()
  File "/home/jakutis/.bin/youtube-dl/youtube_dl/extractor/facebook.py", line 93, in _login
    r'name="h"\s+(?:\w+="[^"]+"\s+)*?value="([^"]+)"', login_results, 'h'),
  File "/home/jakutis/.bin/youtube-dl/youtube_dl/extractor/common.py", line 522, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract h; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
@mcepl
Copy link
Contributor

@mcepl mcepl commented Jan 28, 2015

Isn't this in fact duplicate of #1084 ?

@jakutis
Copy link
Author

@jakutis jakutis commented Jan 28, 2015

I don't know but maybe not, because my

[debug] Command-line args: ['https://www.facebook.com/video.php?v=PRIVATE', '--username', u'PRIVATE', '--password', u'PRIVATE', '--twofactor', 'PRIVATE', '--verbose']

is different from his

[debug] Command-line args: ['--verbose', 'https://www.facebook.com/photo.php?v=10151799802758653']

Also I end up with

RegexNotFoundError: Unable to extract h; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

And he ends up with

ExtractorError: Cannot parse data; please report this issue on https://yt-dl.org/bug . Be sure to call youtube-dl with the --verbose flag and include its complete output.
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jan 28, 2015

The facebook extractor doesn't have support for twofactor authentication, it only supports login via username and password (which I guess it doesn't work if you have twofactor-auth enabled).

@jakutis
Copy link
Author

@jakutis jakutis commented Jan 29, 2015

Okey, then this should be labeled as a feature request.

@jaimeMF jaimeMF added the request label Jan 29, 2015
@git-commit
Copy link

@git-commit git-commit commented May 30, 2017

A workaround is using the --cookies option with your facebook cookie

@jackfuchs
Copy link

@jackfuchs jackfuchs commented Jul 13, 2018

Still not implemented right?

@nathany
Copy link

@nathany nathany commented Jan 1, 2019

The cookies.txt Chrome extension made it fairly easy.

@jakutis
Copy link
Author

@jakutis jakutis commented Jan 1, 2019

Thanks @git-commit and @nathany - just tried this and it is very easy!

@remitamine remitamine mentioned this issue Nov 11, 2019
5 of 5 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.