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
131.39k stars 9.96k forks source link

ivysilani (ceskatelevize.cz) Problem #16997

Open Martianno opened 6 years ago

Martianno commented 6 years ago

Please follow the guide below


Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.07.10. 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 the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):


C:\CT>youtube-dl -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v']
[debug] Encodings: locale cp1250, fs mbcs, out cp852, pref cp1250
[debug] youtube-dl version 2018.07.10
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: none
[debug] Proxy map: {}
Usage: youtube-dl [OPTIONS] URL [URL...]

youtube-dl: error: You must provide at least one URL.
Type youtube-dl --help to see a list of all options.

<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible. If work on your issue requires account credentials please provide them or explain how one can obtain them.

Hello, Unfortunately youtube-dl is currently not working for ivysilani (ceskatelevize.cz) I am getting this message in cmd:

C:\CT>youtube-dl https://www.ceskatelevize.cz/ivysilani/1097181328-udalosti [CeskaTelevize] 1097181328-udalosti: Downloading webpage [CeskaTelevize] 1097181328-udalosti: Downloading JSON metadata Traceback (most recent call last): File "main.py", line 19, in File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp4etivjk5\build\youtube_dl__init.py", line 472, in main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp4etivjk5\build\youtube_dl__init__.py", line 462, in _real_main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp4etivjk5\build\youtube_dl\YoutubeDL.py", line 2001, in download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp4etivjk5\build\youtube_dl\YoutubeDL.py", line 792, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp4etivjk5\build\youtube_dl\extractor\common.py", line 502, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp4etivjk5\build\youtube_dl\extractor\ceskatelevize.py", line 130, in _real_extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp4etivjk5\build\youtube_dl\utils.py", line 561, in sanitized_Request File "C:\Python\Python34\lib\urllib\request.py", line 267, in init__ File "C:\Python\Python34\lib\urllib\request.py", line 293, in full_url File "C:\Python\Python34\lib\urllib\request.py", line 322, in _parse ValueError: unknown url type: 'Error'

I use the win .exe youtube-dl, last version

Thank you for your solutions

nadlabak commented 6 years ago

@bato3 Thanks, I can confirm that the change to https coupled with --no-check-certificate allows to download from ivysilani again.

Martianno commented 6 years ago

Thank you very much! It was quite quick, indeed :) Just one question: I use the win exe, how can I implement your update? Have I to wait for a new release?

NiesmialyGosc commented 6 years ago

Still no luck.. Could anyone help me troubleshoot this..? Thank you.

`D:\MOVIE>youtube-dl -U youtube-dl is up-to-date (2018.07.21)

D:\MOVIE>youtube-dl --no-check-certificate https://www.ceskatelevize.cz/ivysilani/898281-arabela/280350950200005-arabela-na-uteku [CeskaTelevize] 280350950200005-arabela-na-uteku: Downloading webpage [CeskaTelevize] 280350950200005-arabela-na-uteku: Downloading JSON metadata Traceback (most recent call last): File "main.py", line 19, in File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl__init.py", line 472, in main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl__init__.py", line 462, in _real_main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\YoutubeDL.py", line 2001, in download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\YoutubeDL.py", line 792, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\extractor\common.py", line 502, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\extractor\ceskatelevize.py", line 130, in _real_extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\utils.py", line 561, in sanitized_Request File "C:\Python\Python34\lib\urllib\request.py", line 267, in init__ File "C:\Python\Python34\lib\urllib\request.py", line 293, in full_url File "C:\Python\Python34\lib\urllib\request.py", line 322, in _parse ValueError: unknown url type: 'Error'

D:\MOVIE>youtube-dl --no-check-certificate --proxy socks5://195.181.214.110:443 https://www.ceskatelevize.cz/ivysilani/898281-arabela/280350950200005-arabela-na-uteku [CeskaTelevize] 280350950200005-arabela-na-uteku: Downloading webpage Traceback (most recent call last): File "main.py", line 19, in File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl__init__.py", line 472, in main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl__init__.py", line 462, in _real_main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\YoutubeDL.py", line 2001, in download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\YoutubeDL.py", line 792, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\extractor\common.py", line 502, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\extractor\ceskatelevize.py", line 74, in _real_extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\extractor\common.py", line 761, in _download_webpage File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\extractor\common.py", line 627, in _download_webpage_handle File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\extractor\common.py", line 599, in _request_webpage File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\YoutubeDL.py", line 2211, in urlopen File "C:\Python\Python34\lib\urllib\request.py", line 464, in open File "C:\Python\Python34\lib\urllib\request.py", line 482, in _open File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\utils.py", line 1102, in https_open File "C:\Python\Python34\lib\urllib\request.py", line 1183, in do_open File "C:\Python\Python34\lib\http\client.py", line 1137, in request File "C:\Python\Python34\lib\http\client.py", line 1182, in _send_request File "C:\Python\Python34\lib\http\client.py", line 1133, in endheaders File "C:\Python\Python34\lib\http\client.py", line 963, in _send_output File "C:\Python\Python34\lib\http\client.py", line 898, in send File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\utils.py", line 1068, in connect File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\socks.py", line 270, in connect File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\socks.py", line 266, in _make_proxy File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\socks.py", line 221, in _setup_socks5 File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\socks.py", line 192, in _socks5_auth File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\socks.py", line 131, in _recv_bytes File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\socks.py", line 126, in recvall EOFError: 2 bytes missing

D:\MOVIE>youtube-dl --no-check-certificate --proxy 185.142.208.139:41258 https://www.ceskatelevize.cz/ivysilani/898281-arabela/280350950200005-arabela-na-uteku [CeskaTelevize] 280350950200005-arabela-na-uteku: Downloading webpage ERROR: Unable to download webpage: <urlopen error EOF occurred in violation of protocol (_ssl.c:600)> (caused by URLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:600)'),))

D:\MOVIE>youtube-dl --no-check-certificate --verbose https://www.ceskatelevize.cz/ivysilani/898281-arabela/280350950200005-arabela-na-uteku [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['--no-check-certificate', '--verbose', 'https://www.ceskatelevize.cz/ivysilani/898281-arabela/280350950200005-arabela-na-uteku'] [debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252 [debug] youtube-dl version 2018.07.21 [debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1 [debug] exe versions: none [debug] Proxy map: {} [CeskaTelevize] 280350950200005-arabela-na-uteku: Downloading webpage [CeskaTelevize] 280350950200005-arabela-na-uteku: Downloading JSON metadata Traceback (most recent call last): File "main.py", line 19, in File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl__init.py", line 472, in main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl__init__.py", line 462, in _real_main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\YoutubeDL.py", line 2001, in download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\YoutubeDL.py", line 792, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\extractor\common.py", line 502, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\extractor\ceskatelevize.py", line 130, in _real_extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpphie_b_3\build\youtube_dl\utils.py", line 561, in sanitized_Request File "C:\Python\Python34\lib\urllib\request.py", line 267, in init__ File "C:\Python\Python34\lib\urllib\request.py", line 293, in full_url File "C:\Python\Python34\lib\urllib\request.py", line 322, in _parse ValueError: unknown url type: 'Error'`

mcepl commented 6 years ago

@NiesmialyGosc you haven't applied the patch from fda2aa630318c5b7a384f9059aefdb535c7bf788

mcepl commented 6 years ago
matej@mitmanek: ~$ curl -L -I -v https://www.ceskatelevize.cz/ivysilani/ajax/get-client-playlist
* About to connect() to www.ceskatelevize.cz port 443 (#0)
*   Trying 212.47.2.209...
* Connected to www.ceskatelevize.cz (212.47.2.209) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
*   subject: CN=ceskatelevize.cz,OU=IT,O=ČESKÁ TELEVIZE,L=Praha,C=CZ,serialNumber=00027383,incorporationCountry=CZ,businessCategory=Private Organization
*   start date: Jun 25 00:00:00 2018 GMT
*   expire date: Oct 18 12:00:00 2019 GMT
*   common name: ceskatelevize.cz
*   issuer: CN=GeoTrust EV RSA CA 2018,OU=www.digicert.com,O=DigiCert Inc,C=US
> HEAD /ivysilani/ajax/get-client-playlist HTTP/1.1
> User-Agent: curl/7.29.0
> Host: www.ceskatelevize.cz
> Accept: */*
> 
< HTTP/1.1 403 Forbidden
HTTP/1.1 403 Forbidden
< Server: nginx
Server: nginx
< Date: Mon, 23 Jul 2018 13:35:21 GMT
Date: Mon, 23 Jul 2018 13:35:21 GMT
< Content-Type: text/html; charset=iso-8859-1
Content-Type: text/html; charset=iso-8859-1
< Content-Length: 226
Content-Length: 226
< Connection: keep-alive
Connection: keep-alive

< 
* Connection #0 to host www.ceskatelevize.cz left intact
matej@mitmanek: ~$

Unfortunately, Česká Televize apparently still uses certificate which has been distrusted by most operating systems and browsers.

Isn't there some facility in youtube-dl to accept invalid certificates?

nadlabak commented 6 years ago

@Martianno Use the tar.gz release of youtube-dl and the Windows embeddable zip file of Python 3 release. Put the extracted python embed files to the youtube-dl folder extracted from the tar.gz archive, edit the youtube_dl\extractor\ceskatelevize.py file as in the bato3's commit and finally run youtube-dl like: python -m youtube_dl --no-check-certificate -v https://www.ceskatelevize.cz/ivysilani/10988632309-smrt-prichazi-do-pemberley/216381479580001

NiesmialyGosc commented 6 years ago

Thank you @mcepl ! However I'm using youtube-dl.EXE in Windows, it's an all-in-one executable file and there's no .py file for me to edit, so how can I apply the patch otherwise than typing "youtube-dl -U" in Windows command lines?

Many thanks! NiesmialyGosc

Drakonosh commented 6 years ago

Could you make a new version with this diff soon please?

bato3 commented 6 years ago

@Drakonosh it's merged for https://www.ceskatelevize.cz/ivysilani/10988632309-smrt-prichazi-do-pemberley/216381479580001 Pořad bylo možné přehrát do 28. 7. 2018 22:50

also add --no-check-certificate

mcepl commented 4 years ago

This should be closed, shouldn’t it?

bato3 commented 4 years ago

Probably yes. Take tests, you'll know. XD

porn commented 4 years ago

The certificate problem seems to be solved by ceskatelevize.cz

mcepl commented 3 years ago

ping? Could somebody close this?