Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mass post downloading not working #96

Closed
jli94 opened this issue Sep 30, 2022 · 3 comments
Closed

Mass post downloading not working #96

jli94 opened this issue Sep 30, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@jli94
Copy link

jli94 commented Sep 30, 2022

Happens when going https://fantia.jp/fanclubs/[clubhere]/posts, but individual posts it works fine.

Downloading fanclub [club id here]...
Collecting fanclub posts...
Encountered an error downloading URL. Skipping...
Traceback (most recent call last):
File "D:\roar of the abyss\dl\fantiadl-master\fantiadl.py", line 109, in
downloader.download_fanclub(fanclub, cmdl_opts.limit)
File "D:\roar of the abyss\dl\fantiadl-master\models.py", line 206, in download_fanclub
post_ids = self.fetch_fanclub_posts(fanclub)
File "D:\roar of the abyss\dl\fantiadl-master\models.py", line 282, in fetch_fanclub_posts
parsed_date = dt.strptime(date_string, "%Y-%m-%d %H:%M")
File "C:\Users\red\AppData\Local\Programs\Python\Python38-32\lib_strptime.py", line 568, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "C:\Users\red\AppData\Local\Programs\Python\Python38-32\lib_strptime.py", line 352, in _strptime
raise ValueError("unconverted data remains: %s" %
ValueError: unconverted data remains: Update

@ToBowlRu
Copy link

ToBowlRu commented Sep 30, 2022

Quick fix is going into model.py and after line 281 date_string = post.select_one("span.post-date").text.rstrip(RENEW_STR) but before parsed_date = dt.strptime(date_string, "%Y-%m-%d %H:%M")
Add the following:
date_string = date_string.replace("Update", "")

So lines 281-283 should look like this (I never use github so I don't know how to format this):
date_string = post.select_one("span.post-date").text.rstrip(RENEW_STR)
date_string = date_string.replace("Update", "")
parsed_date = dt.strptime(date_string, "%Y-%m-%d %H:%M")

@jli94
Copy link
Author

jli94 commented Oct 1, 2022

Worked perfectly! Thanks.

@bitbybyte
Copy link
Owner

That's insufficient because Fantia has language options now.

@bitbybyte bitbybyte added the bug Something isn't working label Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants