mansuf / mangadex-downloader

A command-line tool to download manga from MangaDex, written in Python.
https://mangadex-dl.mansuf.link/
MIT License
472 stars 37 forks source link

Failed connect errors #84

Closed PPlayzX01 closed 8 months ago

PPlayzX01 commented 1 year ago

What happened ?

Trying to batch download these manga urls listed in this txt file: urls.txt

but connections keep failing until i get Unhandled HTTP error. This happens for every URL listed, sometimes it works though, but most of the time it doesn't. The failed downloads seem to be increasing in frequency until now as listed below, everything failed.

Log:

Microsoft Windows [Version 10.0.19045.3086]
(c) Microsoft Corporation. All rights reserved.

C:\Users\REDACTED\mangadex-dl>mangadex-dl urls.txt --force-https --dns-over-https cloudflare --delay-requests 1S
[INFO] Checking url = https://mangadex.org/title/4259cfdd-2a81-41aa-91d0-a5d44275d6cc
[INFO] Using English language
[ERROR] Failed connect to "https://api.mangadex.org/manga/4259cfdd-2a81-41aa-91d0-a5d44275d6cc", reason: HTTPSConnectionPool(host='api.mangadex.org', port=443): Max retries exceeded with url: /manga/4259cfdd-2a81-41aa-91d0-a5d44275d6cc?includes%5B%5D=author&includes%5B%5D=artist&includes%5B%5D=cover_art (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)'))). Trying... (attempt: 1)
[ERROR] Failed connect to "https://api.mangadex.org/manga/4259cfdd-2a81-41aa-91d0-a5d44275d6cc", reason: HTTPSConnectionPool(host='api.mangadex.org', port=443): Max retries exceeded with url: /manga/4259cfdd-2a81-41aa-91d0-a5d44275d6cc?includes%5B%5D=author&includes%5B%5D=artist&includes%5B%5D=cover_art (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)'))). Trying... (attempt: 2)
[ERROR] Failed connect to "https://api.mangadex.org/manga/4259cfdd-2a81-41aa-91d0-a5d44275d6cc", reason: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)). Trying... (attempt: 3)
[ERROR] Failed connect to "https://api.mangadex.org/manga/4259cfdd-2a81-41aa-91d0-a5d44275d6cc", reason: HTTPSConnectionPool(host='api.mangadex.org', port=443): Max retries exceeded with url: /manga/4259cfdd-2a81-41aa-91d0-a5d44275d6cc?includes%5B%5D=author&includes%5B%5D=artist&includes%5B%5D=cover_art (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)'))). Trying... (attempt: 4)
[ERROR] Failed connect to "https://api.mangadex.org/manga/4259cfdd-2a81-41aa-91d0-a5d44275d6cc", reason: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)). Trying... (attempt: 5)
[ERROR] Unhandled HTTP error
Traceback (most recent call last):
  File "mangadex_downloader\cli\download.py", line 33, in download
  File "mangadex_downloader\cli\url.py", line 166, in __call__
  File "mangadex_downloader\cli\url.py", line 97, in download_manga
  File "mangadex_downloader\main.py", line 70, in download
  File "mangadex_downloader\manga.py", line 72, in __init__
  File "mangadex_downloader\fetcher.py", line 43, in get_manga
  File "requests\sessions.py", line 602, in get
  File "mangadex_downloader\network.py", line 273, in request
mangadex_downloader.errors.UnhandledHTTPError: Unhandled HTTP error
[INFO] Checking url = https://mangadex.org/title/d7bcf782-3aaa-4916-868b-0a3a2629826a/blue-archive-dengeki-comic-anthology
[INFO] Using English language
[ERROR] Failed connect to "https://api.mangadex.org/manga/d7bcf782-3aaa-4916-868b-0a3a2629826a", reason: HTTPSConnectionPool(host='api.mangadex.org', port=443): Max retries exceeded with url: /manga/d7bcf782-3aaa-4916-868b-0a3a2629826a?includes%5B%5D=author&includes%5B%5D=artist&includes%5B%5D=cover_art (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)'))). Trying... (attempt: 1)
[ERROR] Failed connect to "https://api.mangadex.org/manga/d7bcf782-3aaa-4916-868b-0a3a2629826a", reason: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)). Trying... (attempt: 2)
[ERROR] Failed connect to "https://api.mangadex.org/manga/d7bcf782-3aaa-4916-868b-0a3a2629826a", reason: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)). Trying... (attempt: 3)
[ERROR] Failed connect to "https://api.mangadex.org/manga/d7bcf782-3aaa-4916-868b-0a3a2629826a", reason: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)). Trying... (attempt: 4)
[ERROR] Failed connect to "https://api.mangadex.org/manga/d7bcf782-3aaa-4916-868b-0a3a2629826a", reason: HTTPSConnectionPool(host='api.mangadex.org', port=443): Max retries exceeded with url: /manga/d7bcf782-3aaa-4916-868b-0a3a2629826a?includes%5B%5D=author&includes%5B%5D=artist&includes%5B%5D=cover_art (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)'))). Trying... (attempt: 5)
[ERROR] Unhandled HTTP error
Traceback (most recent call last):
  File "mangadex_downloader\cli\download.py", line 33, in download
  File "mangadex_downloader\cli\url.py", line 166, in __call__
  File "mangadex_downloader\cli\url.py", line 97, in download_manga
  File "mangadex_downloader\main.py", line 70, in download
  File "mangadex_downloader\manga.py", line 72, in __init__
  File "mangadex_downloader\fetcher.py", line 43, in get_manga
  File "requests\sessions.py", line 602, in get
  File "mangadex_downloader\network.py", line 273, in request
mangadex_downloader.errors.UnhandledHTTPError: Unhandled HTTP error
[INFO] Checking url = https://mangadex.org/title/31dc805a-7cef-498d-9e00-93a434b4da67/blue-archive-hide-and-seek-behind-the-scenes-kivotos-kourin-grand-festival
[INFO] Using English language
[ERROR] Failed connect to "https://api.mangadex.org/manga/31dc805a-7cef-498d-9e00-93a434b4da67", reason: HTTPSConnectionPool(host='api.mangadex.org', port=443): Max retries exceeded with url: /manga/31dc805a-7cef-498d-9e00-93a434b4da67?includes%5B%5D=author&includes%5B%5D=artist&includes%5B%5D=cover_art (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)'))). Trying... (attempt: 1)
[ERROR] Failed connect to "https://api.mangadex.org/manga/31dc805a-7cef-498d-9e00-93a434b4da67", reason: HTTPSConnectionPool(host='api.mangadex.org', port=443): Max retries exceeded with url: /manga/31dc805a-7cef-498d-9e00-93a434b4da67?includes%5B%5D=author&includes%5B%5D=artist&includes%5B%5D=cover_art (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)'))). Trying... (attempt: 2)
[ERROR] Failed connect to "https://api.mangadex.org/manga/31dc805a-7cef-498d-9e00-93a434b4da67", reason: HTTPSConnectionPool(host='api.mangadex.org', port=443): Max retries exceeded with url: /manga/31dc805a-7cef-498d-9e00-93a434b4da67?includes%5B%5D=author&includes%5B%5D=artist&includes%5B%5D=cover_art (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)'))). Trying... (attempt: 3)
[ERROR] Failed connect to "https://api.mangadex.org/manga/31dc805a-7cef-498d-9e00-93a434b4da67", reason: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)). Trying... (attempt: 4)
[ERROR] Failed connect to "https://api.mangadex.org/manga/31dc805a-7cef-498d-9e00-93a434b4da67", reason: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)). Trying... (attempt: 5)
[ERROR] Unhandled HTTP error
Traceback (most recent call last):
  File "mangadex_downloader\cli\download.py", line 33, in download
  File "mangadex_downloader\cli\url.py", line 166, in __call__
  File "mangadex_downloader\cli\url.py", line 97, in download_manga
  File "mangadex_downloader\main.py", line 70, in download
  File "mangadex_downloader\manga.py", line 72, in __init__
  File "mangadex_downloader\fetcher.py", line 43, in get_manga
  File "requests\sessions.py", line 602, in get
  File "mangadex_downloader\network.py", line 273, in request
mangadex_downloader.errors.UnhandledHTTPError: Unhandled HTTP error
[INFO] Checking url = https://mangadex.org/title/5fcf0847-7d3a-4164-a705-970a06df2794/blue-archive-problem-solver-68-business-diary
[INFO] Using English language
[ERROR] Failed connect to "https://api.mangadex.org/manga/5fcf0847-7d3a-4164-a705-970a06df2794", reason: HTTPSConnectionPool(host='api.mangadex.org', port=443): Max retries exceeded with url: /manga/5fcf0847-7d3a-4164-a705-970a06df2794?includes%5B%5D=author&includes%5B%5D=artist&includes%5B%5D=cover_art (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)'))). Trying... (attempt: 1)
[ERROR] Failed connect to "https://api.mangadex.org/manga/5fcf0847-7d3a-4164-a705-970a06df2794", reason: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)). Trying... (attempt: 2)
[ERROR] Failed connect to "https://api.mangadex.org/manga/5fcf0847-7d3a-4164-a705-970a06df2794", reason: HTTPSConnectionPool(host='api.mangadex.org', port=443): Max retries exceeded with url: /manga/5fcf0847-7d3a-4164-a705-970a06df2794?includes%5B%5D=author&includes%5B%5D=artist&includes%5B%5D=cover_art (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)'))). Trying... (attempt: 3)
[ERROR] Failed connect to "https://api.mangadex.org/manga/5fcf0847-7d3a-4164-a705-970a06df2794", reason: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)). Trying... (attempt: 4)
[ERROR] Failed connect to "https://api.mangadex.org/manga/5fcf0847-7d3a-4164-a705-970a06df2794", reason: HTTPSConnectionPool(host='api.mangadex.org', port=443): Max retries exceeded with url: /manga/5fcf0847-7d3a-4164-a705-970a06df2794?includes%5B%5D=author&includes%5B%5D=artist&includes%5B%5D=cover_art (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)'))). Trying... (attempt: 5)
[ERROR] Unhandled HTTP error
Traceback (most recent call last):
  File "mangadex_downloader\cli\download.py", line 33, in download
  File "mangadex_downloader\cli\url.py", line 166, in __call__
  File "mangadex_downloader\cli\url.py", line 97, in download_manga
  File "mangadex_downloader\main.py", line 70, in download
  File "mangadex_downloader\manga.py", line 72, in __init__
  File "mangadex_downloader\fetcher.py", line 43, in get_manga
  File "requests\sessions.py", line 602, in get
  File "mangadex_downloader\network.py", line 273, in request
mangadex_downloader.errors.UnhandledHTTPError: Unhandled HTTP error
[INFO] Checking url = https://mangadex.org/title/4e166e00-a9b3-4f17-8075-441b9745715a/dolls-frontline-dengeki-comic-anthology
[INFO] Using English language
[ERROR] Failed connect to "https://api.mangadex.org/manga/4e166e00-a9b3-4f17-8075-441b9745715a", reason: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)). Trying... (attempt: 1)
[ERROR] Failed connect to "https://api.mangadex.org/manga/4e166e00-a9b3-4f17-8075-441b9745715a", reason: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)). Trying... (attempt: 2)
[ERROR] Failed connect to "https://api.mangadex.org/manga/4e166e00-a9b3-4f17-8075-441b9745715a", reason: HTTPSConnectionPool(host='api.mangadex.org', port=443): Max retries exceeded with url: /manga/4e166e00-a9b3-4f17-8075-441b9745715a?includes%5B%5D=author&includes%5B%5D=artist&includes%5B%5D=cover_art (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1007)'))). Trying... (attempt: 3)
[ERROR] Failed connect to "https://api.mangadex.org/manga/4e166e00-a9b3-4f17-8075-441b9745715a", reason: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)). Trying... (attempt: 4)
[ERROR] Failed connect to "https://api.mangadex.org/manga/4e166e00-a9b3-4f17-8075-441b9745715a", reason: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)). Trying... (attempt: 5)
[ERROR] Unhandled HTTP error
Traceback (most recent call last):
  File "mangadex_downloader\cli\download.py", line 33, in download
  File "mangadex_downloader\cli\url.py", line 166, in __call__
  File "mangadex_downloader\cli\url.py", line 97, in download_manga
  File "mangadex_downloader\main.py", line 70, in download
  File "mangadex_downloader\manga.py", line 72, in __init__
  File "mangadex_downloader\fetcher.py", line 43, in get_manga
  File "requests\sessions.py", line 602, in get
  File "mangadex_downloader\network.py", line 273, in request
mangadex_downloader.errors.UnhandledHTTPError: Unhandled HTTP error
[INFO] Cleaning up...

C:\Users\REDACTED\mangadex-dl>

What did you expect to happen ?

Sometimes the downloads work, but other times, like now, I keep getting unhandled http error. I expect the mangas to be downloaded. I tried force-https and dns-over-https but those don't seem to help. They should just create folders with the manga names on them and download into those, but since it can't access the server, it can't start on them.

OS version

Windows 10

App version

mangadex-downloader v2.10.3 (https://github.com/mansuf/mangadex-downloader) Python: 3.10.11 arch: x64 bundled executable: yes

Installation origin

Github releases

Installation origin (other sources)

No response

Reproducible command

mangadex-dl urls.txt --force-https --dns-over-https cloudflare --delay-requests 1

Additional context

I've tried multiple times to get this to work, to the point where now none of the URLs can be connected to. Maybe my isp, router, or mangadex is blacklisting me?

mansuf commented 1 year ago

When you get this error, did you try to open MangaDex website in a browser and check if it's working ? if it's not working, maybe your isp has blacklisted MangaDex or your router has some changes that cause connection to MangaDex servers to failing.

I suggest check your router first and then your isp.

This is rare case though, even if it's isp fault to blacklisting MangaDex, it should working if you use dns over https.