Jeffchen54 / KMP-Kemono-Downloader

Simple Kemono downloader
MIT License
47 stars 4 forks source link

ISSUE - 'in <string>' requires string as left operand, not Tag #23

Closed TheThirdComputer closed 1 year ago

TheThirdComputer commented 1 year ago

I use the switches: Python KMPDownloader.py -w --date -d E:\KMP-Kemono-Downloader-0.6.2.1-pre\logs

I try using scanning this user: https://kemono.party/patreon/user/53820

And after a certain amount of downloads, this occurs in CMD:

Exception in thread Thread-102: Traceback (most recent call last): File "E:\Python_3.11.3\Lib\threading.py", line 1038, in _bootstrap_inner self.run() File "E:\KMP-Kemono-Downloader-0.6.2.1-pre\Threadpool.py", line 256, in run todo0 File "E:\KMP-Kemono-Downloader-0.6.2.1-pre\KMPDownloader.py", line 1007, in __process_container if not prev or (prev and container.contents[0] not in prev): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'in ' requires string as left operand, not Tag

Any idea what it means, or how to fix it? Thanks.

Jeffchen54 commented 1 year ago

I'll take a look at the issue later today. From a glance, it seems like an issue resulting from the inconsistent structure from the website. If you would like to download without post content, use the "--omitcontent" switch. It should work after applying that switch. What will be omitted will be the stuff labeled "Content" as seen below: image Any attachments such as rar files will still be downloaded so you can just use the --omitcontent switch for now while waiting on the fix if you don't care too much about not having "Content" data being downloaded.

TheThirdComputer commented 1 year ago

Extra information:

At first I thought this might be a different problem and was going to open another issue, but after some testing, I think this might be related to this original post.

User = https://kemono.party/patreon/user/797556

Problem = The downloader SOMETIMES is unable to skip broken links, and enters a state of infinite loading, in which the time-remaining-counter goes up slowly forever.

Examples of skippable broken links = https://kemono.party/patreon/user/797556/post/13755803 https://kemono.party/patreon/user/797556/post/13403479 https://kemono.party/patreon/user/797556/post/13403248 https://kemono.party/patreon/user/797556/post/13403140 https://kemono.party/patreon/user/797556/post/12493741

Examples of unskippable broken links that stop the downloading entirely = https://kemono.party/patreon/user/797556/post/11558120

Wish you goods, friend~

Jeffchen54 commented 1 year ago

I think the issue is fixed in #25, you can go to the pull request and click on 0.6.2.2.1 then download it as a zip. I've been busy with work and more so I haven't had the time to properly test it but it does work now for the issues you mentioned here when plugging the URLs in.

Jeffchen54 commented 1 year ago

Fixed in releases 0.6.2.2.1 and 0.6.2.3