AlphaSlayer1964 / kemono-dl

A simple kemono.party downloader using python.
504 stars 81 forks source link

script hang after 504 error #96

Closed afterdelight closed 2 years ago

afterdelight commented 2 years ago

Version

latest

Your Command

F:\downloader\kemono.party\kemono-dl-main>kemono-dl.py --cookies kemono.party_cookies.txt --kemono-fav-users patreon --dirname-pattern "{site}/{service}/{username} [{user_id}]" --filename-pattern "[{published}] [{id}] [{index}] {filename}.{ext}" --other-filename-pattern "[{published}] [{id}] [0] {filename}.{ext}" --extract-links --banner --icon --yt-dlp --json --content --comments --inline --dms --skip-filetypes psd --archive patreon_downloaded.txt

Description of bug

i run 3 session of the script , two of them got 504 errors then i tried to rerun the script but it just hang and cant resume download

it stuck with: INFO:Downloading: [20211211] [59790659] [1] Bastila 3.gif

it only occurs with --kemono-fav-users command

How To Reproduce

re run it after get 504 error with --kemono-fav-users command

Error messages and tracebacks

INFO:Skipping user gin00 | Service fanbox was not requested INFO:Skipping user nekoworks | Service fanbox was not requested INFO:Skipping user syannhaineko | Service fanbox was not requested INFO:Skipping user yellowbea | Service fanbox was not requested INFO:Skipping user SinenSian | Service fanbox was not requested INFO:Skipping user lesdias | Service fanbox was not requested INFO:Skipping user backstreetgirl | Service fanbox was not requested INFO:Skipping user omasomas | Service fanbox was not requested INFO:Skipping user backsu | Service fanbox was not requested INFO:Skipping user akt | Service fanbox was not requested INFO:Skipping user 加瀬大輝 | Service fanbox was not requested INFO:Skipping user sunhyun | Service fanbox was not requested INFO:Skipping user kallenz | Service fanbox was not requested INFO:Skipping user Belko | Service fanbox was not requested INFO:Skipping user animated-maker | Service fanbox was not requested INFO:Skipping user backspace | Service fanbox was not requested INFO:Skipping user absorblog | Service fanbox was not requested INFO:Skipping user bbbsfm | Service fanbox was not requested INFO:Skipping user fukuro | Service fanbox was not requested INFO:Skipping user casinoep | Service fanbox was not requested INFO:Skipping user back | Service fanbox was not requested INFO:Skipping user aroma | Service fanbox was not requested INFO:Skipping user lolinyan | Service fanbox was not requested INFO:Skipping user horosuke | Service fanbox was not requested INFO:Skipping user egami | Service fanbox was not requested INFO:Skipping user akt08sukebemilk | Service fanbox was not requested INFO:Skipping user teamboobs | Service fanbox was not requested INFO:Skipping user lambda | Service fanbox was not requested INFO:Skipping user bginga | Service fanbox was not requested INFO:Skipping user 紳士Leon | Service fantia was not requested INFO:Skipping user 🔞MMDer_Dyson(フェイスハガーの人) | Service fantia was not requested INFO:Skipping user 弱電波@JackDempa | Service fantia was not requested INFO:Skipping user horosuke | Service fantia was not requested INFO:Skipping user lambda | Service fantia was not requested INFO:Skipping user Aroma Sensei   | Service gumroad was not requested INFO:Skipping user Zarory | Service gumroad was not requested INFO:Skipping user ocmas | Service gumroad was not requested INFO:Skipping user Kittew | Service gumroad was not requested INFO:Skipping user 🔞Rinhee | Service gumroad was not requested INFO:Skipping user Sciamano240 (Mirco Cabbia) | Service gumroad was not requested INFO:Skipping user JackDempa (弱電波) | Service gumroad was not requested INFO:Skipping user Aroma Sensei | Service gumroad was not requested INFO:Skipping user MLeth | Service gumroad was not requested INFO:Skipping user Kidmo | Service gumroad was not requested INFO:Skipping user sakimichanpatreon | Service gumroad was not requested INFO:Skipping user Tofuubear | Service gumroad was not requested INFO:Skipping user windwalker | Service gumroad was not requested INFO:Skipping user arion art | Service gumroad was not requested INFO:Skipping user MissWarmJ | Service gumroad was not requested INFO:Skipping user Akt | Service gumroad was not requested INFO:Skipping user SLASH | Service gumroad was not requested INFO:Skipping: [10568962]_icon.png | File already exists INFO:No DMs found for https://kemono.party/patreon/user/10568962 INFO:Skipping post | post already archived INFO:Skipping post | post already archived INFO:Skipping post | post already archived INFO:Skipping post | post already archived INFO:Skipping post | post already archived INFO:Skipping post | post already archived INFO:Skipping post | post already archived INFO:Skipping post | post already archived INFO:Skipping post | post already archived INFO:Skipping post | post already archived INFO:Skipping post | post already archived INFO:Skipping post | post already archived INFO:Starting Post | Bastila Shan 4k INFO:Downloading: [20211211] [59790659] [1] Bastila 3.gif

afterdelight commented 2 years ago

I got this after waiting several minutes:

ERROR:Failed to get responce: https://kemono.party/data/18/22/18225c123976a814e77520c31d5291737ecf634f2c8c9c3ba856e8e72fd836c5.gif?f=Bastila 3.gif | Retrying Traceback (most recent call last): File "C:\Python\Python310\lib\site-packages\requests\adapters.py", line 440, in send resp = conn.urlopen( File "C:\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 876, in urlopen return self.urlopen( File "C:\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 876, in urlopen return self.urlopen( File "C:\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 876, in urlopen return self.urlopen( [Previous line repeated 2 more times] File "C:\Python\Python310\lib\site-packages\urllib3\connectionpool.py", line 866, in urlopen retries = retries.increment(method, url, response=response, _pool=self) File "C:\Python\Python310\lib\site-packages\urllib3\util\retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='data12.kemono.party', port=443): Max retries exceeded with url: /data/18/22/18225c123976a814e77520c31d5291737ecf634f2c8c9c3ba856e8e72fd836c5.gif?f=Bastila%203.gif (Caused by ResponseError('too many 504 error responses'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "F:\downloader\kemono.party\kemono-dl-main\src\main.py", line 504, in download_file response = self.session.get(url=file['file_variables']['url'], stream=True, headers={self.headers,'Range':f"bytes={resume_size}-"}, cookies=self.cookies, timeout=self.timeout) File "C:\Python\Python310\lib\site-packages\requests\sessions.py", line 542, in get return self.request('GET', url, kwargs) File "C:\Python\Python310\lib\site-packages\requests\sessions.py", line 529, in request resp = self.send(prep, send_kwargs) File "C:\Python\Python310\lib\site-packages\requests\sessions.py", line 667, in send history = [resp for resp in gen] File "C:\Python\Python310\lib\site-packages\requests\sessions.py", line 667, in history = [resp for resp in gen] File "C:\Python\Python310\lib\site-packages\requests\sessions.py", line 237, in resolve_redirects resp = self.send( File "C:\Python\Python310\lib\site-packages\requests\sessions.py", line 645, in send r = adapter.send(request, kwargs) File "C:\Python\Python310\lib\site-packages\requests\adapters.py", line 510, in send raise RetryError(e, request=request) requests.exceptions.RetryError: HTTPSConnectionPool(host='data12.kemono.party', port=443): Max retries exceeded with url: /data/18/22/18225c123976a814e77520c31d5291737ecf634f2c8c9c3ba856e8e72fd836c5.gif?f=Bastila%203.gif (Caused by ResponseError('too many 504 error responses')) INFO:Downloading: [20211211] [59790659] [1] Bastila 3.gif

AlphaSlayer1964 commented 2 years ago

A 504 is a server error. I cannot help with that.