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

Download Facebook authenticated only videos #17050

Closed
Natim opened this issue Jul 23, 2018 · 6 comments
Closed

Download Facebook authenticated only videos #17050

Natim opened this issue Jul 23, 2018 · 6 comments

Comments

@Natim
Copy link

@Natim Natim commented Jul 23, 2018

I validated the following checklist

  • I've verified and I assure that I'm running youtube-dl 2018.07.21
  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other
$ youtube-dl https://www.facebook.com/maronyr/videos/1806104126121482/ --cookies ~/Downloads/cookies.txt -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.facebook.com/maronyr/videos/1806104126121482/', '--cookies', '/home/rhubscher/Downloads/cookies.txt', '-v']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.07.21
[debug] Python version 3.6.5 (CPython) - Linux-4.15.0-23-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.2-2, ffprobe 3.4.2-2
[debug] Proxy map: {}
[facebook] 1806104126121482: Downloading webpage
[facebook] 1806104126121482: Downloading webpage
[facebook] 1806104126121482: Downloading webpage
ERROR: Cannot parse data; 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 "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 792, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 502, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/facebook.py", line 469, in _real_extract
    video_id, fatal_if_no_video=True)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/facebook.py", line 378, in _extract_from_url
    raise ExtractorError('Cannot parse data')
youtube_dl.utils.ExtractorError: Cannot parse data; 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.

Description of your issue, suggested solution and other information

When trying to download a private video on Facebook, even if the authentication is successful, youtube-dl will raise a Cannot Parse data error.

This is because the call to Facebook is not the same for private and logged in users.

@Natim
Copy link
Author

@Natim Natim commented Jul 23, 2018

(Pdb) tahoe_data
'for (;;);{"__ar":1,"error":1357004,"errorSummary":"Sorry, something went wrong","errorDescription":"Please try closing and re-opening your browser window.","payload":null,"bootloadable":{},"ixData":{},"gkxData":{},"lid":"6581411343114701408"}'
@remitamine
Copy link
Collaborator

@remitamine remitamine commented Jul 23, 2018

it's not even the same issue, and it works both with and without an account, most likely your not using git version or there is a problem with the cookies.

python __main__.py --netrc https://www.facebook.com/maronyr/videos/1806104126121482
[facebook] Downloading login page
[facebook] Logging in
[facebook] 1806104126121482: Downloading webpage
[facebook] 1806104126121482: Downloading webpage
[facebook] 1806104126121482: Downloading webpage
WARNING: unable to extract uploader; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract OpenGraph title; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract thumbnail URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Destination: Facebook video #1806104126121482-1806104126121482.f217627222202285vd.mp4
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  1 18.5M    1  225k    0     0  40984      0  0:07:54  0:00:05  0:07:49 46405
python __main__.py https://www.facebook.com/maronyr/videos/1806104126121482
[facebook] 1806104126121482: Downloading webpage
[download] Destination: Eu nunca vi algo assim. Muito menos em uma bicicleta! 😱 😱 😱-1806104126121482.f217627222202285vd.mp4
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 40 18.5M   40 7713k    0     0   141k      0  0:02:14  0:00:54  0:01:20  150k
@remitamine remitamine closed this Jul 23, 2018
@Natim
Copy link
Author

@Natim Natim commented Jul 23, 2018

@Natim
Copy link
Author

@Natim Natim commented Jul 23, 2018

$ youtube-dl  https://www.facebook.com/Chefclubcocktailsuk/videos/1556391614435227/ --netrc -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://www.facebook.com/Chefclubcocktailsuk/videos/1556391614435227/', '--netrc', '-v']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.07.21
[debug] Python version 3.6.5 (CPython) - Linux-4.15.0-23-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.2-2, ffprobe 3.4.2-2
[debug] Proxy map: {}
[facebook] Downloading login page
[facebook] Logging in
[facebook] 1556391614435227: Downloading webpage
[facebook] 1556391614435227: Downloading webpage
[facebook] 1556391614435227: Downloading webpage
ERROR: Cannot parse data; 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 "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 792, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 502, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/facebook.py", line 469, in _real_extract
    video_id, fatal_if_no_video=True)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/facebook.py", line 378, in _extract_from_url
    raise ExtractorError('Cannot parse data')
youtube_dl.utils.ExtractorError: Cannot parse data; 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.
@remitamine
Copy link
Collaborator

@remitamine remitamine commented Jul 23, 2018

this has been already fixed(not released yet):

python __main__.py --netrc https://www.facebook.com/Chefclubcocktailsuk/videos/1556391614435227
[facebook] Downloading login page
[facebook] Logging in
[facebook] 1556391614435227: Downloading webpage
[facebook] 1556391614435227: Downloading webpage
[facebook] 1556391614435227: Downloading webpage
WARNING: unable to extract uploader; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract OpenGraph title; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
WARNING: unable to extract thumbnail URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Destination: Facebook video #1556391614435227-1556391614435227.f1556394407768281v.mp4
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  1 7659k    1  145k    0     0  26399      0  0:04:57  0:00:05  0:04:52 29861
@Natim
Copy link
Author

@Natim Natim commented Jul 23, 2018

Fixed with 631f93e
Thanks @remitamine

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
2 participants
You can’t perform that action at this time.