Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
(Somewhat OT) Issues with viewing/downloading from YouTube (Other sites work fine) #5327
Comments
|
This a problem with the certificates (we are getting some similar reports), can those videos be downloaded with youtube-dl itself? (Note that --prefer-insecure doesn't do anythin for youtube videos, they only use https on their website now) |
|
Yes, direct downloading via youtube-dl works. P.S. The URL I am using for testing is: |
|
It works with VLC and wget on OSX for me, maybe the SSL support is not properly configured (I don't know how to fix it). |
|
It's probably version-of-VLC related. VLC has a nasty habit of changing stuff (removing features) from version to version, so I try to avoid "upgrading" unless it is absolutely necessary. Therefore, I'm running a fairly old version of VLC -> VLC media player 2.0.7 Twoflower (revision 2.0.7-3-g51f7bb4). When I find something that works, I stick with it. But I would imagine that version might not support the latest https: foo. |
|
Since youtube-dl works fine, I'm closing the issue. |
So, I wrote this script to access, view, and, optionally, d/l vids from YouTube and other sites (i.e., anything site that youtube-dl supports). It runs under OSX, and is built around the following tools:
Basically, I use "youtube-dl -j" to translate the short URL into the long URL, jq to parse the JSON output to get the "long URL", VLC to view it, and finally, wget to d/l it (if I like it).
This all works fine on other sites, but on YouTube itself, as of sometime in the past few months, two problems arise:
Resolving r3---sn-hp57knly.googlevideo.com... 173.194.17.89, 2607:f8b0:4008:3::9
Connecting to r3---sn-hp57knly.googlevideo.com|173.194.17.89|:443... connected.
ERROR: cannot verify r3---sn-hp57knly.googlevideo.com's certificate, issued by
/C=US/O=Google Inc/CN=Google Internet Authority G2': Unable to locally verify the issuer's authority. ERROR: certificate common name*.c.docs.google.com' doesn't match requested host namer3---sn-hp57knly.googlevideo.com'. To connect to r3---sn-hp57knly.googlevideo.com insecurely, use--no-check-certificate'.Note: If I manually re-try this, supplying "--no-check-certificate", then it does, indeed, work.
So, it boils down to: VLC won't play it, wget will download it, but only with --no-check-certificate.
What can I do?
P.S. The exact youtube-dl command I am using is:
youtube-dl.py --prefer-insecure --skip-download --write-info-json --write-description -o tmptmp "$url"
which creates a file called tmptmp.info.json, which I then parse with "jq".