mangasee123-downloader
mangasee123-downloader copied to clipboard
Need to detect 404s
Trying to download Trigun I'm getting a 404 from Cloudflare. Using the debug hooks from #4 I'm getting this output:
DEBUG:urllib3.connectionpool:https://official-complete-1.granpulse.us:443 "GET /manga/Trigun/0006-027.png HTTP/1.1" 404 None
send: b'GET /manga/Trigun/0006-028.png HTTP/1.1\r\nHost: official-complete-1.granpulse.us\r\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\n\r\n'
reply: 'HTTP/1.1 404 Not Found\r\n'
header: Date: Sun, 16 Apr 2023 05:58:26 GMT
header: Content-Type: text/html; charset=utf-8
header: Transfer-Encoding: chunked
header: Connection: keep-alive
header: Vary: Accept-Encoding
header: Last-Modified: Tue, 15 Jun 2021 01:23:51 GMT
header: Cache-Control: max-age=14400
header: CF-Cache-Status: EXPIRED
header: Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=YNLMK8hql8hz5xZoWU3n6p76e5bVFdlDk2sIat6LgDS0KQ9KYxlyc7TKpvBgY15KHe6TOAjmGdRdYo3YlSm1xtTNeDnybl%2F%2FQXBz5hmYwKqnFThjWepX%2FXosnXZss8zqYNgO1e6zTNRQBKkTJ1%2FB42ViP6VA07LJ31wqmLIWyg%3D%3D"}],"group":"cf-nel","max_age":604800}
header: NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
header: Server: cloudflare
header: CF-RAY: 7b8a3250781a38af-IAD
header: Content-Encoding: gzip
header: alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
And similar from running as python3 MangaseeDL.py -v Trigun 6 6
. That's saving the 404 page as NNN.png in the expected folder, but they're all HTML. I've verified One Piece works (picked because it's your example from the help text) so it's not just my connection.
I'm mostly leaving this for myself to figure out unless you get to it first :)