Ovear / kemono-dl

A simple kemono.party downloader using python.
109 stars 11 forks source link

New API #16

Closed anon567321 closed 2 months ago

anon567321 commented 8 months ago

New API and datetime format https://kemono.party/api/schema

We need to change these lines

main.py 103 creators_api = f"https://{domain}/api/v1/creators/" 114 fav_api = f'https://{domain}/api/v1/account/favorites?type={fav_type}' 137 api = f"{found.group(1)}api/v1/{found.group(3)}" 698 t = datetime.datetime.fromisoformat(time)

args.py 278 args[key] = datetime.datetime.fromisoformat(args[key])

The date format in datebefore/dateafter functions should now be YYYY-MM-DD, not YYYYMMDD.

SunburntStorm48 commented 8 months ago

needs updating! L4cache's fork works currently...

Caxapok-X commented 8 months ago

needs updating! L4cache's fork works currently...

Hello. Share the link, thanks in advance. ❤️

AXIHIXA commented 8 months ago

I tested @anon567321's suggestions and it works. Thanks for suggesting! P.S. The latest main.py seems to be different from what @anon567321 has.

698 t = datetime.datetime.fromisoformat(time)

seems to be

712 t = datetime.datetime.fromisoformat(time)

for my main.py.

AsiaIceorb commented 8 months ago

Thanks a lot! It works now. But I still getting these errors after download several pages:

ERROR:Unable to get favorite users from kemono.su Traceback (most recent call last): File "G:\kemono-dl-main\src\main.py", line 693, in start_download self.get_favorites(self.cookie_domains['kemono'], 'artist', self.k_fav_users) File "G:\kemono-dl-main\src\main.py", line 130, in get_favorites self.get_post(f"https://{domain}/{favorite['service']}/user/{favorite['id']}") File "G:\kemono-dl-main\src\main.py", line 166, in get_post post = self.clean_post(post, user, site) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\kemono-dl-main\src\main.py", line 302, in clean_post new_post['post_variables']['title'] = post['title']


TypeError: string indices must be integers, not 'str'

Do you guys have any good solutions?Thanks in advance.
SunburntStorm48 commented 7 months ago

needs updating! L4cache's fork works currently...

Hello. Share the link, thanks in advance. ❤️

https://github.com/L4cache/kemono-dl This one

AsiaIceorb commented 7 months ago

needs updating! L4cache's fork works currently...

Hello. Share the link, thanks in advance. ❤️

https://github.com/L4cache/kemono-dl This one

I can't run it properly...Thanks anyway.

ERROR:Unable to get favorite users from kemono.su Traceback (most recent call last): File "G:\kemono-dl-main\src\main.py", line 827, in start_download self.get_favorites(self.cookie_domains['kemono'], 'artist', self.k_fav_users) File "G:\kemono-dl-main\src\main.py", line 147, in get_favorites if not (favorite['service'] in services or 'all' in services): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: argument of type 'NoneType' is not iterable

Caxapok-X commented 7 months ago

needs updating! L4cache's fork works currently...

Hello. Share the link, thanks in advance. ❤️

https://github.com/L4cache/kemono-dl This one

I can't run it properly...Thanks anyway.

ERROR:Unable to get favorite users from kemono.su Traceback (most recent call last): File "G:\kemono-dl-main\src\main.py", line 827, in start_download self.get_favorites(self.cookie_domains['kemono'], 'artist', self.k_fav_users) File "G:\kemono-dl-main\src\main.py", line 147, in get_favorites if not (favorite['service'] in services or 'all' in services): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: argument of type 'NoneType' is not iterable

I checked and it seems to be working for me. What command do you use ? Maybe you need to reinstall python ? I am using version 3.10.6 maybe it makes some difference. I also checked the two domains su and party and everything seems to work but if you use party the cookies won't work.

SunburntStorm48 commented 7 months ago

needs updating! L4cache's fork works currently...

Hello. Share the link, thanks in advance. ❤️

https://github.com/L4cache/kemono-dl This one

I can't run it properly...Thanks anyway.

ERROR:Unable to get favorite users from kemono.su Traceback (most recent call last): File "G:\kemono-dl-main\src\main.py", line 827, in start_download self.get_favorites(self.cookie_domains['kemono'], 'artist', self.k_fav_users) File "G:\kemono-dl-main\src\main.py", line 147, in get_favorites if not (favorite['service'] in services or 'all' in services): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: argument of type 'NoneType' is not iterable

Still works for me. I'm using latest pillow

Ovear commented 2 months ago

Hi,

The latest version should work now. Please feel free to let me know if there is anything wrong.