Ovear / kemono-dl

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

When I add the --dateafter 20230206 parameter, the program keeps reporting errors and cannot be downloaded. #7

Closed wenq1217 closed 1 year ago

wenq1217 commented 1 year ago

Version

Version:2022.04.27

Your Command


python3 kemono-dl.py --cookies "kemono.party_cookies.txt" --content --dms --dateafter 20230206 --kemono-fav-users ALL

Description of bug

the program keeps reporting errors and cannot be downloaded.

How To Reproduce

Error messages and tracebacks


ERROR:Unable to get favorite users from kemono.party
Traceback (most recent call last):
  File "/share/external/.nd/1000/07826e16c-dbef-42c4-b0da-353a8e755450/Python/KM/src/main.py", line 683, in start_download
    self.get_favorites('kemono.party', 'artist', self.k_fav_users)
  File "/share/external/.nd/1000/07826e16c-dbef-42c4-b0da-353a8e755450/Python/KM/src/main.py", line 132, in get_favorites
    self.get_post(f"https://{domain}/{favorite['service']}/user/{favorite['id']}")
  File "/share/external/.nd/1000/07826e16c-dbef-42c4-b0da-353a8e755450/Python/KM/src/main.py", line 175, in get_post
    if self.skip_post(post):
  File "/share/external/.nd/1000/07826e16c-dbef-42c4-b0da-353a8e755450/Python/KM/src/main.py", line 582, in skip_post
    elif check_date(self.get_date_by_type(post['post_variables']['published']), self.date, self.datebefore, self.dateafter):
  File "/share/external/.nd/1000/07826e16c-dbef-42c4-b0da-353a8e755450/Python/KM/src/main.py", line 702, in get_date_by_type
    t = datetime.datetime.strptime(time, r'%a, %d %b %Y %H:%M:%S %Z')
  File "/share/CACHEDEV4_DATA/.qpkg/Python3/python3/lib/python3.10/_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/share/CACHEDEV4_DATA/.qpkg/Python3/python3/lib/python3.10/_strptime.py", line 349, in _strptime
    raise ValueError("time data %r does not match format %r" %
ValueError: time data '20230329' does not match format '%a, %d %b %Y %H:%M:%S %Z'

Additional comments

Ovear commented 1 year ago

Hi,

Please upgrade to latest version, this issue is already fixed months ago.