ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.76k stars 10.07k forks source link

Downloading Facebook videos return "Unable to download webpage: HTTP Error 404" #11851

Closed kalemi19 closed 7 years ago

kalemi19 commented 7 years ago

Please follow the guide below


Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.01.25. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

Before submitting an issue make sure you have:

What is the purpose of your issue?


The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.facebook.com/peopleareawesome/videos/1214770915238751/']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.01.25
[debug] Python version 2.6.6 - Linux-2.6.32-042stab104.1-x86_64-with-centos-6.8-Final
[debug] exe versions: ffmpeg N-77953-gcc83177-syslint
[debug] Proxy map: {}
[facebook] 1214770915238751: Downloading webpage
[facebook] 1214770915238751: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 404: Not Found (caused by HTTPError()); 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.
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 406, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2001, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib64/python2.6/urllib2.py", line 397, in open
    response = meth(req, response)
  File "/usr/lib64/python2.6/urllib2.py", line 510, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python2.6/urllib2.py", line 435, in error
    return self._call_chain(*args)
  File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.6/urllib2.py", line 518, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

Description of your issue, suggested solution and other information

I don't know when this started happening. I tried downloading tons of Facebook videos and the result is the same: 404 error. The Facebook video url used in the example (logs) above is this https://www.facebook.com/peopleareawesome/videos/1214770915238751/

The video is public and can be downloaded from other sites online. Other sites that I tried work normally (YouTube, Instagram etc)

Thanks in advance

kalemi19 commented 7 years ago

Any thoughts? It works on my local machine, but not on my VPS. I haven't changed anything and it was working fine until now. As I said, other sites work just fine.

Thanks.

dstftw commented 7 years ago

Can you watch it in browser from your VPS's IP in the first place?

kalemi19 commented 7 years ago

How do I do that? I did a wget and it looks fine

--2017-01-27 09:29:10-- https://www.facebook.com/peopleareawesome/videos/1214770915238751/ Resolving www.facebook.com... 31.13.66.36, 2a03:2880:f113:83:face:b00c:0:25de Connecting to www.facebook.com|31.13.66.36|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://www.facebook.com/unsupportedbrowser [following] --2017-01-27 09:29:10-- https://www.facebook.com/unsupportedbrowser Reusing existing connection to www.facebook.com:443. HTTP request sent, awaiting response... 200 OK

dstftw commented 7 years ago

Setup proxy, VPN, SSH tunnel or whatever. In any case your VPS is most likely blocked by Facebook and it's not an youtube-dl issue.

kalemi19 commented 7 years ago

So I did turn my VPN into a proxy and I was able to browse Facebook normally and everything. Just to make sure the proxy was working I went to Facebook's security settings and I saw the current active session had the IP of my VPS.

I will keep looking. Thanks for your help.

kalemi19 commented 7 years ago

It's working now. I guess it fixed itself (?)