|
|
#12286 | |
|
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 5010203
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
Converting to one of those as culytera suggested may work. But it may not, depending on where there story URL is in the pdf. I'd try one or two before converting a ton. |
|
|
|
|
|
|
#12287 | |
|
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 5010203
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
Calibre Plugin Monkey patching FFF's open_url() call from a different Calibre plugin seems a bit roundabout. There's already a framework in FFF for calling a proxy. Combining fetcher_flaresolverr_proxy.py and cache_browser.py might have been easier. Or if you've already gone to the effort of making a browser extension, why not make it a proxy that returns the requested page directly and skip using the cache? Browser Extension I'm honestly surprised a browser extension is allowed to open and listen to a port. Or is that only possible because you've put the browser in development mode? BTW, if it doesn't already, this would be handy place to force uncached sites to save pages to cache. See https://github.com/JimmXinu/FanFicFare/issues/1312 Intentions What is your(vorm) intention with this? Is this something you intend to support? |
|
|
|
|
|
|
#12288 | |
|
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Dec 2024
Device: Kindle Paperwhite
|
Quote:
Fair enough on not blessing it. Quick answers to your points, plus why I built it this way. Intention I only archive every few months. Between checking for updates and new fics it can take a long time, and open_pages_in_browser keeps interrupting whatever else I’m doing, so I can’t leave it running in the background the way I used to. That was already annoying before, so I threw together a quick and dirty fix for myself. It was meant to stay personal. I only shared it because I’d seen other people wanting something similar. I’m not planning ongoing support in any serious sense. I just posted a zip link; there’s no GitHub repo or anything. If people try it and it helps, great. If FFF changes and it breaks, that’s on me / them to notice. Why monkey-patch from another plugin I didn’t want to modify FanFicFare itself. Idea was: keep my hack working across FFF updates without re-applying patches every time. Hooking open_url from a separate Calibre plugin was the blunt way to do that. I didn’t know about the existing proxy framework when I started, and it didn’t come to mind for the same reason: I was avoiding touching FFF. I’ll look at the Flaresolverr / proxy path you mentioned and see what I can do with that. Why not “extension as proxy, skip cache” Partly already there. The extension loads the page (fetch or one reused background tab), sends the HTML back to Calibre, and the plugin can feed that body to FFF when disk cache is missing/stale. Disk cache is still in play where it works; for no-cache / no-store type sites (same problem as #1312) the body handoff is what actually works. A cleaner proxy-style fetcher inside FFF would probably be better; this started from the browser-cache + open_url path because that’s what I was already using. Extension listening on a port It doesn’t. The Calibre plugin listens on localhost. The extension only polls / posts to that bridge. Developer mode is just so I can load the unpacked extension, not because of the networking. #1312 Related: the extension rewrites cache headers so Chromium is more willing to store responses, and when that still isn’t enough it returns the page body directly so FFF isn’t stuck waiting on a disk-cache entry that never appears. |
|
|
|
|
|
|
#12289 |
|
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 158
Karma: 295686
Join Date: Jul 2021
Device: iPhone
|
Question, wouldn't the default setting "use_view_full_work:true" be redundant on AO3 if you're logged in and you have "Show the whole work by default." enabled in preferences?
|
|
|
|
|
|
#12290 |
|
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Dec 2024
Device: Kindle Paperwhite
|
I looked at using the existing Flaresolverr proxy path for this. It works as a hook: point FlareSolverr_ProxyFetcher at a localhost helper, POST the URL, get HTML back from an extension. In that setup FFF does not call open_pages_in_browser, so silent loads work without monkey-patching open_url.
An MV3 extension cannot listen on a TCP port, so today something else must own localhost (my Calibre plugin, or a separate helper process) while the extension only polls and returns HTML. If you want this to need only FFF + a browser extension, FFF would need to own that localhost side. For example: when a browser-helper mode is on, FFF (Calibre plugin and/or CLI) starts a small 127.0.0.1 server, accepts fetch jobs, and the extension long-polls for URLs and POSTs HTML back. FFF then uses that HTML like FlareSolverr_ProxyFetcher does. Protocol can be simple JSON or a thin Flaresolverr /v1 subset. FFF documents the contract; the extension stays out of tree. Optional: when that mode is on, open_pages_in_browser uses the same path instead of safe_open_url. That removes third-party Calibre plugins and standalone helpers. Stock Flaresolverr can stay as the headless option. |
|
|
|
|
|
#12291 | |
|
technology hates me
![]() Posts: 20
Karma: 10
Join Date: Sep 2025
Device: None
|
Quote:
|
|
|
|
|
|
|
#12292 | |
|
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 5010203
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
I'll look into detecting when full work was already gotten. |
|
|
|
|
|
|
#12293 | ||||
|
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 5010203
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Multireply
Quote:
I also wonder whether the browser extension store gatekeepers would allow this. Quote:
Quote:
I'm not sure I see any cases where reading from the cache would be preferred if the page could be returned. Flaresolverr has problems with returning images for reasons with how it's implemented. I would assume this does not? Quote:
I will be thinking about this more. |
||||
|
|
|
|
|
#12294 | ||
|
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Dec 2024
Device: Kindle Paperwhite
|
Quote:
Quote:
From what I tested, images work no problem with this. |
||
|
|
|
|
|
#12295 |
|
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 5010203
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
New Test Version Posted
2026-07-24 - base_otw_adapter: Save and use if served full work initially - base_otw_adapter: Save a network req if need to login. If you check the 'Show the whole work by default.' setting in your AO3 account, you'll now save a network request any time you're downloading logged in. Thanks, culytera, for pointing that out. Also saves loading that page until after login (if needed), saves reloading it after login. |
|
|
|
|
|
#12296 | ||
|
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 5010203
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
Do we have any browser extension developers in the house? Even just to answer questions? Quote:
That's part of the problem with monkey patching--it can happen anywhere. And the line between 'patch' and 'exploit' is entirely semantic. I think if my motivation was not needing to update for new FFF versions, I would have faked being a flaresolverr server instead of all the monkey patching. But as you said, you came at it from browser cache. IPC How is the bridge server working with Calibre's BG job processes? Oh. It's using the bridge server both to talk to browser extension and all the FFF patches. So there's nothing but convenience that says the bridge server has to live inside Calibre? Not that that isn't a good reason. |
||
|
|
|
|
|
#12297 | |
|
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Dec 2024
Device: Kindle Paperwhite
|
Quote:
And yes nothing technical requires the bridge to live inside Calibre. That is mostly convenience (auto-start, shared settings, no extra process). A standalone helper with the same endpoints would work the same way, but i really didn't want to bother running calibre + server + extension to make this work, so adding to the plugin hack was the simplest path. |
|
|
|
|
|
|
#12298 | |
|
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 158
Karma: 295686
Join Date: Jul 2021
Device: iPhone
|
Quote:
Another AO3-related question, when always_login isn't true, bookmarked and subscribed data aren't automatically set to False, they're simply missing. This isn't an issue for me personally since I have it set to true anyway. However, when the cache settings are enabled and always_login isn't true, but the user's already logged in to their AO3 account on the browser, bookmarked and subscribed are still missing even when the work being downloaded has subscribed or bookmarked data. I know that always_login being false by default is to reduce network requests, but how is the behavior different once cache settings are enabled and a user's already logged in? |
|
|
|
|
|
|
#12299 | |
|
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 5010203
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
Code:
if self.getConfig("always_login") and LOGOUT_STR in data: # check actually is logged.
# deliberately using always_login instead of checking for
# actual login so we don't have a case where these show up
# for a user only when they get user-restricted stories.
Options include:
|
|
|
|
|
|
|
#12300 | |
|
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 158
Karma: 295686
Join Date: Jul 2021
Device: iPhone
|
Quote:
It's not exactly a problem since I can just set always_login to true, but I was wondering why the behavior wasn't different if you're using browser cache. You did mention that this was before browser cache was a thing so that's likely why. I don't have is_adult set to true since I'm always logged in and have the "Show me adult content without checking." in preferences checked so the behavior is as I expected. Last edited by culytera; Yesterday at 10:18 PM. |
|
|
|
|
![]() |
| Tags |
| fanfiction |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 546 | 05-21-2026 02:44 PM |
| [GUI Plugin] Open With | kiwidude | Plugins | 405 | 02-09-2026 07:54 AM |
| [GUI Plugin] Marvin XD | Philantrop | Plugins | 126 | 01-29-2017 12:48 PM |
| [GUI Plugin] KiNotes | -axel- | Plugins | 0 | 07-14-2013 06:39 PM |
| [GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |