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

[FimFiction] Fetching all stories in a users bookshelf #1018

Open
EpicLPer opened this issue Nov 24, 2023 · 4 comments
Open

[FimFiction] Fetching all stories in a users bookshelf #1018

EpicLPer opened this issue Nov 24, 2023 · 4 comments

Comments

@EpicLPer
Copy link

EpicLPer commented Nov 24, 2023

I want to automatically archive stories that I've added to my personal bookshelves, however I can't seem to find a proper way to extract story URLs from my own bookshelves.

Using the following command as example fanficfare -l "https://www.fimfiction.net/bookshelf/XXXXXX/read-it-later&view_mode=1" does somewhat work, the List view shows a lot more entries than the default view does, however this also includes featured stories that are displayed on the right side or anywhere else on the website.

Is there any way to use an alternative method? I've seen that FimFiction does have an API, tho in a previously closed GitHub issue read that FanFicFare switched away from it due to BBCode weirdness. Maybe it's possible to scrape URLs via their API but download them via webscraping instead?

Thanks!

@JimmXinu
Copy link
Owner

Not promising I'm going to do it, but here's my initial thoughts:

FanFicFare's mechanism for getting story URLs from a page is deliberately pretty general--fetch page, search for valid stories. But as you've noticed, that can get additional links sometimes, depending on site and page.

There is additional complexity in the code for some sites for series pages using the Calibre plugin version's anthology feature, but it's not really helpful for your case, or available in FFF's CLI.

The adapter_fimfictionnet.py code could probably override the default implementation of base_adapter.get_urls_from_page() with one that recognizes book shelf URLs and scrapes only the list. And/Or the base implementation could be modified to allow for an additional hook for that. If the list can be paginated when it gets long, that would increase the complexity. I don't know anything about the API off hand.

@EpicLPer
Copy link
Author

I've read further about the API and so far it's pretty private, one can ask the Admin of FimFiction to request access but not sure if scraping stories is going to be greenlit ^^"
If another method would work then I guess it's the safer option.

@nerdguy1338
Copy link

I've had this exact problem.

Load the bookshelf in a browser, switch to card mode, and use an auto scrolled to scroll to the bottom slowly, letting each page load as it goes. Then repeat every x days.

@mcepl
Copy link
Contributor

mcepl commented Nov 3, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants