{"action":"created","issue":{"url":"https://api.github.com/repos/rg3/youtube-dl/issues/5225","labels_url":"https://api.github.com/repos/rg3/youtube-dl/issues/5225/labels{/name}","comments_url":"https://api.github.com/repos/rg3/youtube-dl/issues/5225/comments","events_url":"https://api.github.com/repos/rg3/youtube-dl/issues/5225/events","html_url":"https://github.com/rg3/youtube-dl/issues/5225","id":62370487,"number":5225,"title":"Get SSL failure when trying to download video from facebook.","user":{"login":"shirishag75","id":727626,"avatar_url":"https://avatars.githubusercontent.com/u/727626?v=3","gravatar_id":"","url":"https://api.github.com/users/shirishag75","html_url":"https://github.com/shirishag75","followers_url":"https://api.github.com/users/shirishag75/followers","following_url":"https://api.github.com/users/shirishag75/following{/other_user}","gists_url":"https://api.github.com/users/shirishag75/gists{/gist_id}","starred_url":"https://api.github.com/users/shirishag75/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shirishag75/subscriptions","organizations_url":"https://api.github.com/users/shirishag75/orgs","repos_url":"https://api.github.com/users/shirishag75/repos","events_url":"https://api.github.com/users/shirishag75/events{/privacy}","received_events_url":"https://api.github.com/users/shirishag75/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-17T11:29:40Z","updated_at":"2015-03-25T21:47:11Z","closed_at":null,"body":"Hi all, \r\nI have been trying to download fb videos. When asking to see which streams are downloadable it's all good :-\r\n\r\n    [$] youtube-dl -F \"https://www.facebook.com/video.php?v=785520541528967\"                                                     \r\n    [facebook] 785520541528967: Downloading webpage\r\n    [info] Available formats for 785520541528967:\r\n    format code  extension  resolution note\r\n    sd           mp4        unknown    \r\n    hd           mp4        unknown    (best)    \r\n\r\nBut when I am actually trying to download the video in question I get the following :-\r\n\r\n      [$] youtube-dl -v -u 'private' -p 'private' -f hd \"http://www.facebook.com/video.php?v=785520541528967\"       [17:15:56]\r\n    [debug] System config: []\r\n    [debug] User config: []\r\n    [debug] Command-line args: ['-v', '-u', u'PRIVATE', '-p', u'PRIVATE', '-f', 'hd', 'http://www.facebook.com/video.php?v=785520541528967']\r\n    [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8\r\n    [debug] youtube-dl version 2015.02.28\r\n    [debug] Python version 2.7.9 - Linux-3.16.0-4-amd64-x86_64-with-debian-8.0\r\n    [debug] exe versions: avconv 11.3-6, avprobe 11.3-6, rtmpdump 2.4\r\n    [debug] Proxy map: {}\r\n    [facebook] Downloading login page\r\n    [facebook] Logging in\r\n    [facebook] Confirming login\r\n    [facebook] 785520541528967: Downloading webpage\r\n    [debug] Invoking downloader on u'https://fbcdn-video-h-a.akamaihd.net/hvideo-ak-xfp1/v/t43.1792-2/11044001_785526411528380_2033975173_n.mp4?efg=big_alphanumeric-sequence&rl=2046&vabr=1364&oh=big_alphanumeric_sequence=55082B9E&__gda__=big_alphanumeric_sequence'\r\n    ERROR: unable to download video data: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)>\r\n    Traceback (most recent call last):\r\n      File \"/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py\", line 1375, in process_info\r\n        success = dl(filename, info_dict)\r\n      File \"/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py\", line 1350, in dl\r\n        return fd.download(name, info)\r\n      File \"/usr/lib/python2.7/dist-packages/youtube_dl/downloader/common.py\", line 339, in download\r\n        return self.real_download(filename, info_dict)\r\n      File \"/usr/lib/python2.7/dist-packages/youtube_dl/downloader/http.py\", line 64, in real_download\r\n        data = self.ydl.urlopen(request)\r\n      File \"/usr/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py\", line 1666, in urlopen\r\n        return self._opener.open(req, timeout=self._socket_timeout)\r\n      File \"/usr/lib/python2.7/urllib2.py\", line 431, in open\r\n        response = self._open(req, data)\r\n      File \"/usr/lib/python2.7/urllib2.py\", line 449, in _open\r\n        '_open', req)\r\n      File \"/usr/lib/python2.7/urllib2.py\", line 409, in _call_chain\r\n        result = func(*args)\r\n      File \"/usr/lib/python2.7/dist-packages/youtube_dl/utils.py\", line 673, in https_open\r\n        req, **kwargs)\r\n      File \"/usr/lib/python2.7/urllib2.py\", line 1197, in do_open\r\n        raise URLError(err)\r\n    URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)>\r\n    \r\nNow the changes I have made is in the alphanumeric sequences which it tells/shares when the downloader is invoked, whether those are cookies or something which identifies me is not known to me hence not sharing that. Obviously username and password are also marked as 'private'. Any ideas anybody ?"},"comment":{"url":"https://api.github.com/repos/rg3/youtube-dl/issues/comments/86228391","html_url":"https://github.com/rg3/youtube-dl/issues/5225#issuecomment-86228391","issue_url":"https://api.github.com/repos/rg3/youtube-dl/issues/5225","id":86228391,"user":{"login":"shirishag75","id":727626,"avatar_url":"https://avatars.githubusercontent.com/u/727626?v=3","gravatar_id":"","url":"https://api.github.com/users/shirishag75","html_url":"https://github.com/shirishag75","followers_url":"https://api.github.com/users/shirishag75/followers","following_url":"https://api.github.com/users/shirishag75/following{/other_user}","gists_url":"https://api.github.com/users/shirishag75/gists{/gist_id}","starred_url":"https://api.github.com/users/shirishag75/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shirishag75/subscriptions","organizations_url":"https://api.github.com/users/shirishag75/orgs","repos_url":"https://api.github.com/users/shirishag75/repos","events_url":"https://api.github.com/users/shirishag75/events{/privacy}","received_events_url":"https://api.github.com/users/shirishag75/received_events","type":"User","site_admin":false},"created_at":"2015-03-25T21:47:10Z","updated_at":"2015-03-25T21:47:10Z","body":"Yes with the --no-check-certificate workaround it works :-\r\n\r\n    [$]  youtube-dl -f hd --no-check-certificate \"https://www.facebook.com/video.php?v=785520541528967\"                                 [3:12:21]\r\n    [facebook] 785520541528967: Downloading webpage\r\n    [download] Destination: Jeffrey & Jomy Live in Sydney - Come and see us..-785520541528967.mp4\r\n    [download]  36.6% of 8.37MiB at 57.83KiB/s ETA 01:34\r\n\r\nBut it needs this workaround otherwise it asks for certificate each time. Both while either using wget or curl. \r\n\r\n    [$] curl -o video.mp4 https://fbcdn-video-h-a.akamaihd.net/hvideo-ak-xfp1/v/t43.1792-2/11044001_785526411528380_2033975173_n.mp4    [3:10:41]\r\n      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                     Dload  Upload   Total   Spent    Left  Speed\r\n      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (60) SSL certificate problem: unable to get local issuer certificate\r\n    More details here: http://curl.haxx.se/docs/sslcerts.html\r\n    \r\n    curl performs SSL certificate verification by default, using a \"bundle\"\r\n     of Certificate Authority (CA) public keys (CA certs). If the default\r\n     bundle file isn't adequate, you can specify an alternate file\r\n     using the --cacert option.\r\n    If this HTTPS server uses a certificate signed by a CA represented in\r\n     the bundle, the certificate verification probably failed due to a\r\n     problem with the certificate (it might be expired, or the name might\r\n     not match the domain name in the URL).\r\n    If you'd like to turn off curl's verification of the certificate, use\r\n     the -k (or --insecure) option.\r\n\r\nWith wget get this :-\r\n\r\n       [$] wget -O video.mp4 https://fbcdn-video-h-a.akamaihd.net/hvideo-ak-xfp1/v/t43.1792-2/11044001_785526411528380_2033975173_n.mp4    [3:10:55]\r\n    --2015-03-26 03:11:18--  https://fbcdn-video-h-a.akamaihd.net/hvideo-ak-xfp1/v/t43.1792-2/11044001_785526411528380_2033975173_n.mp4\r\n    Resolving fbcdn-video-h-a.akamaihd.net (fbcdn-video-h-a.akamaihd.net)... 115.112.4.6\r\n    Connecting to fbcdn-video-h-a.akamaihd.net (fbcdn-video-h-a.akamaihd.net)|115.112.4.6|:443... connected.\r\n    HTTP request sent, awaiting response... 403 Forbidden\r\n    2015-03-26 03:11:18 ERROR 403: Forbidden."}}