AlphaSlayer1964 / kemono-dl

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

inline_image KeyError: 'src' #138

Open afterdelight opened 2 years ago

afterdelight commented 2 years ago

only got error on this particular user: https://kemono.party/patreon/user/10087150

command: kemono-dl.py --cookies kemono_cookies.txt --kemono-fav-users patreon --skip-filetypes psd --post-timeout 10 --archive patreon_downloaded.txt --verbose

log:

INFO:Skipping post | post already archived
DEBUG:Requesting user json from: https://kemono.party/api/patreon/user/10087150?o=25
INFO:Skipping post | post already archived
ERROR:Unable to get favorite users from kemono.party
Traceback (most recent call last):
  File "F:\downloader\kemono.party\kemono-dl-main\src\main.py", line 672, in start_download
    self.get_favorites('kemono.party', 'artist', self.k_fav_users)
  File "F:\downloader\kemono.party\kemono-dl-main\src\main.py", line 126, in get_favorites
    self.get_post(f"https://{domain}/{favorite['service']}/user/{favorite['id']}")
  File "F:\downloader\kemono.party\kemono-dl-main\src\main.py", line 162, in get_post
    post = self.clean_post(post, user, site)
  File "F:\downloader\kemono.party\kemono-dl-main\src\main.py", line 327, in clean_post
    content_soup = self.get_inline_images(new_post, content_soup)
  File "F:\downloader\kemono.party\kemono-dl-main\src\main.py", line 231, in get_inline_images
    inline_images = [inline_image for inline_image in content_soup.find_all("img") if inline_image['src'][0] == '/']
  File "F:\downloader\kemono.party\kemono-dl-main\src\main.py", line 231, in <listcomp>
    inline_images = [inline_image for inline_image in content_soup.find_all("img") if inline_image['src'][0] == '/']
  File "C:\Python\Python310\lib\site-packages\bs4\element.py", line 1519, in __getitem__
    return self.attrs[key]
KeyError: 'src'
L4cache commented 2 years ago

What is inline images actually? I never used that option.

Ovear commented 2 years ago

What is inline images actually? I never used that option.

It will try to download images in description of post.