r0oth3x49 / udemy-dl

A cross-platform python based utility to download courses from udemy for personal offline use.
MIT License
4.86k stars 1.2k forks source link

ConnectionError: HTTPSConnectionPool(host='c.udemycdn.com', port=443): Max retries exceeded with url #430

Closed thangphamspk closed 5 years ago

thangphamspk commented 5 years ago

I try to download my udemy course with command: python3 udemy-dl.py my-udemy-course -u myemail -p mypass I can download some video like this Screen Shot 2019-09-16 at 5 44 36 PM but after i get an error and my process go to stop. Screen Shot 2019-09-16 at 5 46 15 PM Can you help me fix that Thanks

r0oth3x49 commented 5 years ago

@thangphamspk will check :)

thangphamspk commented 5 years ago

@thangphamspk will check :)

thanks

aspiringguru commented 5 years ago

just experienced similar. ubuntu 18 anaconda python 3

also experienced 3 errors first time connecting, 4th attempt worked fine. (didn't record the err messages) thanks for the awesome work.

codeByAshu01 commented 5 years ago

i am also getting same kind of error

[] : Downloading (142 Testing an Express Application Part II-it) [] : Subtitle : '142 Testing an Express Application Part II-it' (download skipped). [-] : ConnectionError: HTTPSConnectionPool(host='c.udemycdn.com', port=443): Max retries exceeded with url: /16862024/it_IT/2019-03-01_16-02-34-72f974f0ca2a5f8eb8e326efab033e68.vtt?nva=20191004161954&response-content-disposition=attachment%3B+filename=%22it_ittesting-an-express-application-part-iiautogenerated.vtt%22&token=0a8abe0453281f7d88e39 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10e217110>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

[] : Downloading subtitle(s) [] : Downloading (142 Testing an Express Application Part II-ja) [*] : Subtitle : '142 Testing an Express Application Part II-ja' (download skipped). [-] : ConnectionError: HTTPSConnectionPool(host='c.udemycdn.com', port=443): Max retries exceeded with url: /16862024/ja_JP/2019-03-01_16-02-34-fa782978df2d95693e986f4bee1ba83a.vtt?nva=20191004161954&response-content-disposition=attachment%3B+filename=%22ja_jptesting-an-express-application-part-iiautogenerated.vtt%22&token=021e6c64cd55aee5f813d (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10e217290>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

[] : Downloading subtitle(s) [] : Downloading (142 Testing an Express Application Part II-pl) [*] : Subtitle : '142 Testing an Express Application Part II-pl' (download skipped). [-] : ConnectionError: HTTPSConnectionPool(host='c.udemycdn.com', port=443): Max retries exceeded with url: /16862024/pl_PL/2019-03-01_16-02-34-091e943e315ec690751ffec8a32c37bf.vtt?nva=20191004161954&response-content-disposition=attachment%3B+filename=%22pl_pltesting-an-express-application-part-iiautogenerated.vtt%22&token=04b63b0df875b78980ae8 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10e217410>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

[] : Downloading subtitle(s) [] : Downloading (142 Testing an Express Application Part II-pt) [*] : Subtitle : '142 Testing an Express Application Part II-pt' (download skipped). [-] : ConnectionError: HTTPSConnectionPool(host='c.udemycdn.com', port=443): Max retries exceeded with url: /16862024/pt_BR/2019-03-01_16-02-34-ce8c6a4e3724e362262ec7fa3a9ffa19.vtt?nva=20191004161954&response-content-disposition=attachment%3B+filename=%22pt_brtesting-an-express-application-part-iiautogenerated.vtt%22&token=030dd07e0aa77bb5fae4a (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10e217590>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

[] : Downloading subtitle(s) [] : Downloading (142 Testing an Express Application Part II-ro) [*] : Subtitle : '142 Testing an Express Application Part II-ro' (download skipped). [-] : ConnectionError: HTTPSConnectionPool(host='c.udemycdn.com', port=443): Max retries exceeded with url: /16862024/ro_RO/2019-03-01_16-02-34-066f365cfdbab2ebb32c3aa80fa6b69c.vtt?nva=20191004161954&response-content-disposition=attachment%3B+filename=%22ro_rotesting-an-express-application-part-iiautogenerated.vtt%22&token=0f8e46ac143fda007b1b8 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10e217710>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

[] : Downloading subtitle(s) [] : Downloading (142 Testing an Express Application Part II-tr) [*] : Subtitle : '142 Testing an Express Application Part II-tr' (download skipped). [-] : ConnectionError: HTTPSConnectionPool(host='c.udemycdn.com', port=443): Max retries exceeded with url: /16862024/tr_TR/2019-03-01_16-02-34-081b018b077a42ea21ea631f2aa62e75.vtt?nva=20191004161954&response-content-disposition=attachment%3B+filename=%22tr_trtesting-an-express-application-part-iiautogenerated.vtt%22&token=022a344c4affedc22ecd6 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10e217890>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

[] : Downloading subtitle(s) [] : Downloading (142 Testing an Express Application Part II-de) [*] : Subtitle : '142 Testing an Express Application Part II-de' (download skipped). [-] : ConnectionError: HTTPSConnectionPool(host='c.udemycdn.com', port=443): Max retries exceeded with url: /16862024/de_DE/2019-03-01_16-02-33-787a36b69b4b2bbf8cc4261f5516b88a.vtt?nva=20191004161954&response-content-disposition=attachment%3B+filename=%22de_detesting-an-express-application-part-iiautogenerated.vtt%22&token=0bde8293dadd5374fd730 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10e217a10>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

[] : Downloading subtitle(s) [] : Downloading (142 Testing an Express Application Part II-es) [*] : Subtitle : '142 Testing an Express Application Part II-es' (download skipped). [-] : ConnectionError: HTTPSConnectionPool(host='c.udemycdn.com', port=443): Max retries exceeded with url: /16862024/es_ES/2019-03-01_16-02-33-f5da8dc30e580f1fcbb48caa11187eb5.vtt?nva=20191004161954&response-content-disposition=attachment%3B+filename=%22es_estesting-an-express-application-part-iiautogenerated.vtt%22&token=07db01855fd2d9e173b66 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10e217b90>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

[] : Downloading subtitle(s) [] : Downloading (142 Testing an Express Application Part II-fr) [*] : Subtitle : '142 Testing an Express Application Part II-fr' (download skipped). [-] : ConnectionError: HTTPSConnectionPool(host='c.udemycdn.com', port=443): Max retries exceeded with url: /16862024/fr_FR/2019-03-01_16-02-33-7b67244d21f8957d3736947fda06e13d.vtt?nva=20191004161954&response-content-disposition=attachment%3B+filename=%22fr_frtesting-an-express-application-part-iiautogenerated.vtt%22&token=0e7b2a2b6fd01afdd8f82 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x10e217d10>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))

[] : Downloading subtitle(s) [] : Downloading (142 Testing an Express Application Part II-en) [*] : Subtitle : '142 Testing an Express Application Part II-en' (download skipped).

ghost commented 5 years ago

It can be related to subtitles. If you try downloading via --skip-sub option the problem does not occur (at least for my case). I just want to share it for temporary solution.

r0oth3x49 commented 5 years ago

It can be related to subtitles. If you try downloading via --skip-sub option the problem does not occur (at least for my case). I just want to share it for temporary solution.

that's because --skip-sub skips downloading subtitles, rest the error is more related to requests then udemy-dl, but i checking alternative ways

kshitij9969 commented 5 years ago

Download the subtitles separately. I think a lot of lectures have autogenerated English subtitles and that is creating an issue while downloading(This is mentioned in a few red coloured errors). Use --skip-sub and --sub-only and download the subtitles separately.

Also, run the --sub-only command multiple times it will download all the subtitles that were skipped in the previous iteration. Better put in a batch file and iterate these commands multiple time.

If you have an external hard disk try --output and download the lectures to it. Somehow the download speed surges and subtitles aren't skipped.

Let me know if the correct reason or solution is identified. Thanks.

ghost commented 5 years ago

This error still persists.

sagespidy commented 4 years ago

--skip-sub works

xxzozaxx commented 4 years ago

--skip-sub works

Not always, it works for 2 videos and then the error rise again

bruno-braga commented 4 years ago

Also getting this error. Even using --skip-sub.

viertelb commented 4 years ago

--skip-sub works with python2.7 on macOS. Also, this reduces the amount of files downloaded. Who needs (auto generated) subtitles in English anyway? :) Could be made default.

viertelb commented 4 years ago

Update: --skip-sub worked for a lot of downloads (even when downloading several courses parallel in three terminal screens) but eventually the same error occured. It is possible to load all courses by executing the command several times.

A wild guess: It might be related to the pace with which items are downloaded.

armantur commented 4 years ago

Looks like Udemy is blocking the connections that are behaving suspicious (not falling under normal user behavior)