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

Can't download video on Facebook #1269

Closed
Rudloff opened this issue Aug 18, 2013 · 20 comments
Closed

Can't download video on Facebook #1269

Rudloff opened this issue Aug 18, 2013 · 20 comments

Comments

@Rudloff
Copy link
Contributor

@Rudloff Rudloff commented Aug 18, 2013

pierre@Rudloff:~/Bureau/youtube-dl$ ./youtube-dl https://www.facebook.com/photo.php?v=1726498360960
[facebook] 1726498360960: Downloading webpage
ERROR: 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. Make sure you are using the latest version; type  youtube-dl -U  to update.
pierre@Rudloff:~/Bureau/youtube-dl$ ./youtube-dl https://www.facebook.com/photo.php?v=1726498360960 -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['https://www.facebook.com/photo.php?v=1726498360960', '-v']
[debug] youtube-dl version 2013.08.17
[debug] Python version 2.7.3 - Linux-3.2.0-4-amd64-x86_64-with-debian-7.1
[debug] Proxy map: {}
[facebook] 1726498360960: Downloading webpage
ERROR: 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. Make sure you are using the latest version; type  youtube-dl -U  to update.
Traceback (most recent call last):
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 312, in extract_info
    ie_result = ie.extract(url)
  File "./youtube-dl/youtube_dl/extractor/common.py", line 96, in extract
    return self._real_extract(url)
  File "./youtube-dl/youtube_dl/extractor/facebook.py", line 96, in _real_extract
    raise ExtractorError(u'Cannot parse data')
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. Make sure you are using the latest version; type  youtube-dl -U  to update.
@phihag
Copy link
Contributor

@phihag phihag commented Aug 18, 2013

Mmm, can you see that video in the web interface? Under https://www.facebook.com/photo.php?v=1726498360960 , I see just "This content is currently unavailable", both when logged in and when logged out. In constrast, our test video https://www.facebook.com/photo.php?v=120708114770723 works just fine on my machine.

@Rudloff
Copy link
Contributor Author

@Rudloff Rudloff commented Aug 18, 2013

Yes, I can watch the video but now that you say it, I think it is a private video (only friends of the uploader can see it).

@phihag
Copy link
Contributor

@phihag phihag commented Aug 18, 2013

Does it work if you add --username Rudloff@example.com --password secret (replace with your facebook credentials) to the command line?

@Rudloff
Copy link
Contributor Author

@Rudloff Rudloff commented Aug 18, 2013

I get an error although I double-checked my password:
WARNING: unable to log in: bad username/password, or exceded login rate limit (~3/min). Check credentials or wait.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Aug 21, 2013

The login process seems to be broken, the video posted in #1244 can be viewed when login but it raises the same error when using the Facebook credentials.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Oct 27, 2013

@Rudloff I have fixed the login process, could you confim it works with your credentials?

@Rudloff
Copy link
Contributor Author

@Rudloff Rudloff commented Oct 27, 2013

It does not seem to work:

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['https://www.facebook.com/photo.php?v=1726498360960', '-u', '<PRIVATE>', '-v']
Type account password and press return:
[debug] youtube-dl version 2013.10.23.2
[debug] Python version 2.7.3 - Linux-3.2.0-4-amd64-x86_64-with-debian-7.2
[debug] Proxy map: {}
[facebook] Logging in
ERROR: Unable to extract nh; 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. Make sure you are using the latest version; type  youtube-dl -U  to update.
Traceback (most recent call last):
  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 342, in extract_info
    ie_result = ie.extract(url)
  File "./youtube-dl/youtube_dl/extractor/common.py", line 120, in extract
    self.initialize()
  File "./youtube-dl/youtube_dl/extractor/common.py", line 115, in initialize
    self._real_initialize()
  File "./youtube-dl/youtube_dl/extractor/facebook.py", line 88, in _real_initialize
    self._login()
  File "./youtube-dl/youtube_dl/extractor/facebook.py", line 74, in _login
    'nh': self._search_regex(r'name="nh" value="(\w*?)"', login_results, u'nh'),
  File "./youtube-dl/youtube_dl/extractor/common.py", line 255, in _search_regex
    raise RegexNotFoundError(u'Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract nh; 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. Make sure you are using the latest version; type  youtube-dl -U  to update.
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Oct 27, 2013

You have to login in the browser and confirm that login. I haven't managed to detect this case by looking in the reponses (if you find how to do it, please tell us)

@sfavor
Copy link

@sfavor sfavor commented Dec 10, 2013

Got something similar. If I run as:

youtube-dl --write-pages --verbose -n :ytwatchlater

I see the following in the auth page response. The issue is I had an old 6 character youtube user id, not an email. It worked once I assigned a PW to the funky *********@pages.plusgoogle.com user id under Settings.

Error Message: "Please use your Google Account (*********@pages.plusgoogle.com) password to sign in. We no longer support signing in with your old YouTube password."

FI, using --write-pages might give you a clue what the error is.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Dec 10, 2013

@sfavor That's an issue with the Youtube login process, not Facebook, please open a new issue if the problem persists.

@sfavor
Copy link

@sfavor sfavor commented Dec 10, 2013

Read the whole thing, dude. I said it was similar and might help figure out what was happening with the facebook issue. The youtube issue is perma on the youtube side. Not much point in opening an issue on it.

@aurium
Copy link
Contributor

@aurium aurium commented Oct 27, 2014

To find the facebook video, find something like [["params","\u00257B\u002522autoplay\u002522\u00253Afalse\u00252C\u002522auto_hd... in a <script> tag. There you get a hash with hd_src key with a downloadable url.

@mcepl
Copy link
Contributor

@mcepl mcepl commented Jan 28, 2015

matej@mitmanek: youtube-dl (epel7 %)$ youtube-dl --verbose \
    -u mcepl -p veryverysecret \
    'https://www.facebook.com/video.php?v=10203524731698317&set=vb.1215049765&type=2&theater'
[debug] System config: ['--prefer-free-formats']
[debug] User config: []
[debug] Command-line args: ['--verbose', '-u', u'PRIVATE', '-p', u'PRIVATE', 'https://www.facebook.com/video.php?v=10203524731698317&set=vb.1215049765&type=2&theater']
[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.5 - Linux-3.10.0-123.9.3.el7.x86_64-x86_64-with-redhat-7.1-Maipo
[debug] exe versions: ffmpeg 2.3.4, ffprobe 2.3.4, rtmpdump 2.4
[debug] Proxy map: {}
[facebook] Downloading login page
[facebook] Logging in
WARNING: unable to log in: bad username/password, or exceded login rate limit (~3/min). Check credentials or wait.
[facebook] 10203524731698317: Downloading webpage
ERROR: The video is not available, Facebook said: "The page you requested cannot be displayed right now. It may be temporarily unavailable, the link you clicked on may have expired, or you may not have permission to view this page."
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 613, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 266, in extract
    return self._real_extract(url)
  File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/facebook.py", line 122, in _real_extract
    expected=True)
ExtractorError: The video is not available, Facebook said: "The page you requested cannot be displayed right now. It may be temporarily unavailable, the link you clicked on may have expired, or you may not have permission to view this page."

matej@mitmanek: youtube-dl (epel7 %)$

I don't think this is a private video, is it?

@brightghost
Copy link

@brightghost brightghost commented Aug 3, 2016

Is this still broken? I'm seeing all the same behaviors described here.

@Rudloff
Copy link
Contributor Author

@Rudloff Rudloff commented Mar 22, 2017

This seems to be fixed now.

@Rudloff Rudloff closed this Mar 22, 2017
@mcepl
Copy link
Contributor

@mcepl mcepl commented Mar 22, 2017

@Rudloff no, it isn't. I can still reproduce #1269 (comment) with 2017.02.16

@Rudloff
Copy link
Contributor Author

@Rudloff Rudloff commented Mar 22, 2017

Well, I can download the video from the original comment with 2017.03.22, so yours is probably a different issue.

@mcepl
Copy link
Contributor

@mcepl mcepl commented Mar 23, 2017

Right, confirming, this has been fixed in 2017.03.22

@klavixs
Copy link

@klavixs klavixs commented Mar 23, 2017

Confirmed NOT working in my instance.

Videos are public, no login needed, downloaded same collection a month ago with no problems.

using 2017.03.22
updated using sudo youtube-dl -U
failed for https://www.facebook.com/pg/ReformedThugLife/videos/?ref=page_internal

youtube-dl -f best 'http://www.facebook.com/ReformedThugLife/videos/'


[generic] videos: Requesting header
[redirect] Following redirect to https://www.facebook.com/ReformedThugLife/videos/
[generic] videos: Requesting header
WARNING: Falling back on generic information extractor.
[generic] videos: Downloading webpage
[generic] videos: Extracting information
[redirect] Following redirect to https://www.facebook.com/ReformedThugLife/videos/?_fb_noscript=1
[generic] ?_fb_noscript=1: Requesting header
WARNING: Falling back on generic information extractor.
[generic] ?_fb_noscript=1: Downloading webpage
[generic] ?_fb_noscript=1: Extracting information
ERROR: Unsupported URL: https://www.facebook.com/ReformedThugLife/videos/?_fb_noscript=1

@Ads20000
Copy link

@Ads20000 Ads20000 commented May 15, 2017

This doesn't work if you have certain special characters in your password (obviously I can't really disclose more and even this may be too much!)

@ytdl-org ytdl-org deleted a comment from sophanarin Jul 22, 2017
@ytdl-org ytdl-org locked and limited conversation to collaborators Jul 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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