KJHJason / Cultured-Downloader

A project to automate the process of downloading images and other attachment files from platforms like Fantia and more!
GNU General Public License v3.0
63 stars 8 forks source link

[Bug]: Unable to download all Pixiv Fanbox posts from a creator #19

Open yepyepyepok opened 1 year ago

yepyepyepok commented 1 year ago

Which program are you seeing this problem on?

Cultured Downloader (py)

Program Version

4.2.1

Steps to reproduce the bug

  1. run launcher.py and log in
  2. select pixiv fanbox option
  3. select Download all pixiv Fanbox posts from a creator(s)
  4. input all url and pages

The program only picks up 0-10 posts out of all the posts in the page range. These downloadable posts include membership posts and are not just the free member posts. It used to pick up all posts, but stopped suddenly.

Expected behaviour

Expected to have the Download all pixiv Fanbox posts from a creator(s) option identify all posts in the page range provided instead of just a few.

Individually downloading each post with their own urls from the Download images from pixiv Fanbox post(s) option works as expected.

Relevant log output (If any)

No response

Screenshots (Optional)

No response

KJHJason commented 1 year ago

Would you be able to provide some screenshots? I am still able to download normally on my end so I can't really pinpoint where your issue is occurring at 🤔

yepyepyepok commented 1 year ago
  1. No post(s) were found on Pixiv Fanbox creator URL(s) provided. If you are sure that there are posts in the URL(s) above, you may raise an issue on GitHub.

  2. Connection error, please try again later.

Almost randomly, I get either of the above two errors or just a few posts recognized when I try to download 1-X pages

I've tried logging in and logging out, but I still am encountering this issue.

KJHJason commented 1 year ago

Could you share the creator's URL that the program is not detecting?

You could also try the CLI version since that uses their API instead of scraping off the Pixiv Fanbox webpage. However, I still have not implemented a page range for that program (it's only for Pixiv downloads, not Fantia or Pixiv Fanbox).

Example usage of the CLI program to download posts from creators:

C:\Users\KJHJason>.\"Cultured-Downloader-CLI.exe" -fanbox_session <session_id> -creator_id "creator1 creator2 creator3"

Replace with your Pixiv Fanbox session cookie value (look for FANBOXSESSID) accessible via your browser, refer to this for Chrome.

Example usage of the CLI program to download posts and posts from creators:

C:\Users\KJHJason>.\"Cultured-Downloader-CLI.exe" -fanbox_session <session_id> -creator_id "creator1 creator2 creator3" -fanbox_post "1234567 8901234"  -gdrive_api_key <get_from_google_cloud_console> 
yepyepyepok commented 1 year ago

it's happening to every creator I support. Even if I support a new creator, the problem still occurs.

I have tried inputting the links in both formats: https://creator_name.fanbox.cc/posts and https://www.fanbox.cc/@creator_name/posts.

I have also tried running the program without the fanbox cookies loaded in - it still doesn't detect all posts, not even all free posts.

KJHJason commented 1 year ago

Hmm, could you go on Pixiv Fanbox on your browser and paste //a[contains(@href, '/posts/')] in inspect element shown in the image below

image

Afterwards, take a screenshot and paste it here

yepyepyepok commented 1 year ago

image

yepyepyepok commented 1 year ago

Also, I tried deleting the Cultured-Downloader folder from the Roaming folder to reset the cookies and it still didn't work for me.

KJHJason commented 1 year ago

hmm that's strange, it looks like the program would be detecting all the post links but isn't doing so on your end.

However, I'm still unable to replicate your issue, could you do a screen record of your interaction with the program and its output?

yepyepyepok commented 1 year ago

What's the best way for me to do a clean install? Is the folder in Roaming the only other folder I need to delete besides main?

image

This is what it looks like, sometimes it picks up 10 posts though.

KJHJason commented 1 year ago

The fact that you said "This is what it looks like, sometimes it picks up 10 posts though." could mean that Pixiv might have some sort of bot protection that interfered with the download process, have you been frequently downloading?

I've only managed to figure out how you got the "Connection error, please try again later.". This is caused when the page range is invalid and its max page number is more than what the creator's page currently has. However, I'm still unable to replicate the issue you're facing where the program is unable to detect any URLs.

Doing a clean install wouldn't help since the files in the roaming folder contain the encrypted data of your cookies and some download configs like your preferred download folder path.

KJHJason commented 1 year ago

That said, I am unable to fix any bugs until 2-3 months later due to various school assignments and tests so I can only recommend that you use the CLI version first before I work on wrapping the CLI version to this Python program.

yepyepyepok commented 1 year ago

Appreciate your help and no worries. I'll use the individual post download feature to bulk download posts from creators for now as that is still working, albeit more tedious.

As a quick note - I've always exceeded the true page range by 1 in the past and the program always kept working, so I am not sure if that is the source of the Connection error, please try again later issue. But in all these tests I've been doing, I've kept it below the max.

yepyepyepok commented 1 year ago

And yes, I have been frequently downloading. I suspected it had something to do with my account at first, but I tried as a guest and with/without my vpn. All had the same issue.

KJHJason commented 2 months ago

Hey @yepyepyepok, sorry it took so long but I have just released V5.0.0. Let me know if you are still facing any issues.