AlphaSlayer1964 / kemono-dl

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

Error when adding "--dateafter" #144

Open lukmanscootkenn opened 1 year ago

lukmanscootkenn commented 1 year ago

Version

Version: idk which version but im using from Ovear

Your Command

python kemono-dl.py --user-agent curl/7.66.0 --retry 10 --cookies "cookie.txt" --links https://kemono.party/patreon/user/2885342 --filename-pattern "[{published}] {title}_{index}.{ext}" --date-strf-pattern "%Y-%m-%d" --dateafter 20210818

Description of bug

it shows the error when you try to add "--dateafter YYYYMMDD" and it works fine when you didnt add that ive already tried to add dash YYYY-MM-DD and its incorrect format

How To Reproduce

Simply preform a command similar to mine to receive the error.

Error messages and tracebacks


Traceback (most recent call last):
  File "Z:\Downloader\kemono-dl-main\src\main.py", line 689, in start_download
    self.get_post(url)
  File "Z:\Downloader\kemono-dl-main\src\main.py", line 170, in get_post
    if self.skip_post(post):
  File "Z:\Downloader\kemono-dl-main\src\main.py", line 577, in skip_post
    elif check_date(self.get_date_by_type(post['post_variables']['published']), self.date, self.datebefore, self.dateafter):
  File "Z:\Downloader\kemono-dl-main\src\main.py", line 697, in get_date_by_type
    t = datetime.datetime.strptime(time, r'%a, %d %b %Y %H:%M:%S %Z')
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\_strptime.py", line 349, in _strptime
    raise ValueError("time data %r does not match format %r" %
ValueError: time data '2022-10-05' does not match format '%a, %d %b %Y %H:%M:%S %Z'
Ovear commented 1 year ago

Hi, Fixed now, please upgrade to new version.

lukmanscootkenn commented 1 year ago

thankyou... ^-^

Ovear commented 1 year ago

Please kindly close this issue if fixed.