Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 02-02-2024, 05:29 PM   #9241
Madisonian
Junior Member
Madisonian began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2024
Device: none
replace_tags_with_spans does not seem to be working

Hi,

I use FanFicFare for a few different websites. Some stories have most chapters inside of a <pre> tag, which makes it hard to read. So I thought I could use "replace_tags_with_spans: pre" (in the defaults section) in the personal.ini file to avoid that. However, it does not seem to have any effect. What am I doing wrong?

(Using version 4.30.0 with Calibre 7.4)

Thanks!
Madisonian is offline   Reply With Quote
Old 02-02-2024, 05:43 PM   #9242
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,990
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
I don't think that's going to help you.

<pre> tag preserves whitespace. Adding pre to replace_tags_with_spans would cause it to be replaced with <span class="pre">.

Now all the text inside that span does not preserve whitespace and it's all going to be one text block now.

Without seeing some of these stories (SFW story URLs only please), I can't help any more than that. And FYI, I don't expect to be able to help much anyway for stories formatted with <pre>
JimmXinu is offline   Reply With Quote
Old 02-02-2024, 06:34 PM   #9243
Madisonian
Junior Member
Madisonian began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2024
Device: none
Quote:
Originally Posted by JimmXinu View Post
I don't think that's going to help you.

<pre> tag preserves whitespace. Adding pre to replace_tags_with_spans would cause it to be replaced with <span class="pre">.

Now all the text inside that span does not preserve whitespace and it's all going to be one text block now.

Without seeing some of these stories (SFW story URLs only please), I can't help any more than that. And FYI, I don't expect to be able to help much anyway for stories formatted with <pre>
If that ends up being an issue in practice I could use white-space: pre... Though that reminds me, I could try adding "pre { font-family: serif; }" to the CSS or something like that.

But that doesn't explain why replace_tags_with_spans doesn't seem to be working?

(sorry, I have no SFW URL right now)
Madisonian is offline   Reply With Quote
Old 02-02-2024, 06:40 PM   #9244
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,990
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Without a story to look at, you'll have to explain what you mean by 'doesn't seem to be working'.

It isn't changing the HTML, or the appearance isn't what you expect afterwards? Because when I set it does what I explained above.
Code:
replace_tags_with_spans:pre
JimmXinu is offline   Reply With Quote
Old 02-03-2024, 03:27 AM   #9245
zeusosphere
Member
zeusosphere began at the beginning.
 
Posts: 11
Karma: 10
Join Date: May 2019
Device: Kindle PW3, Marvin 3 on iPhone X
I've been having a bit of trouble for several weeks. For particular stories on both AO3 and ff.net, FFF keeps throwing "this story already has X chapters" errors where X is lower than the number of chapters on the website. I've tried overwriting and adding new story and deleting the ID from current version of the story but FFF consistently fails to see the new chapters. Is there something I'm missing? I'm using the latest versions of Calibre and FFF on OSX 14 and BrowserCache for ff.net using Firefox. Here's the log for a bunch of the affected stories if it helps:


Status
Title
Author
Comment
URL
Skipped
Rubber Rebound
Noodlehammer
Already contains 12 chapters.
https://www.fanfiction.net/s/14169468/1/Rubber-Rebound
Skipped
Ramsgate Rescue
LPK9
Already contains 17 chapters.
https://www.fanfiction.net/s/14308142/1/Ramsgate-Rescue
Skipped
Worlds Beyond Death
GeMerope
Already contains 16 chapters.
https://www.fanfiction.net/s/1419730...s-Beyond-Death
Skipped
Uzumaki Naruto: Dawn of the Gamer Remastered
Legend of the Kyuubi
Already contains 18 chapters.
https://www.fanfiction.net/s/7185232...mer-Remastered
Skipped
Supernova
Primordial Vortex
Already contains 14 chapters.
https://www.fanfiction.net/s/11568253/1/Supernova
Skipped
Luke and Leia's Excellent Adventure
LPK9
Already contains 90 chapters.
https://www.fanfiction.net/s/1349417...lent-Adventure

Thanks for your hard work developing and supporting this plugin!
zeusosphere is offline   Reply With Quote
Old 02-03-2024, 10:18 AM   #9246
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,990
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Did you set your browser_cache_age_limit higher? Because I suspect your cache isn't updating.

First, I'd try setting that back down. But if you want to keep it, you could clear your browser cache entirely, which would require reloading those stories.

Otherwise, you'll need to at least force reload (usually ctrl-shft-R or cmd-shft-R) the first chapter of each story.

If you see a cloudflare page before you see the chapter 1 page of a story, make sure you have loaded the page 'normally' by clicking to chapter 2, then return to chapter 1 with the "< Prev" button on page, not the browser back button. Or click to the author page, then click the story link there.

Read the BrowserCacheFeature wiki page for more details.
JimmXinu is offline   Reply With Quote
Old 02-03-2024, 10:28 AM   #9247
John Maverick
Connoisseur
John Maverick began at the beginning.
 
Posts: 61
Karma: 10
Join Date: Oct 2018
Device: none
Quote:
Originally Posted by JimmXinu View Post
New Version Released

Version 4.31.0 - 2024-02-01
- Update translations.
- adapter_deviantartcom: Changed to 2 post login (#1035) and finding story id
- fetcher_flaresolverr: Report errors from Flaresolverr better and fail faster--no retries.
- Update adapter_royalroadcom to remove 'stolen' injections. Thanks, grenskul
- Fix for site change, adapter_deviantartcom. #1030
- Allow image/comic (/i/) and poems (/p/) on literotica
- Fix estimatedWords site metadata for SB/SV - thanks mx-sylveon!
- Swap out SuperFastHash implementation #1026
- Another OTW(AO3) block/hidden story string
The error message from FlareSolverr is shown as expected now. Thanks for your hard work JimmXinu
John Maverick is offline   Reply With Quote
Old 02-03-2024, 11:44 AM   #9248
zeusosphere
Member
zeusosphere began at the beginning.
 
Posts: 11
Karma: 10
Join Date: May 2019
Device: Kindle PW3, Marvin 3 on iPhone X
Quote:
Originally Posted by JimmXinu View Post
Did you set your browser_cache_age_limit higher? Because I suspect your cache isn't updating.

First, I'd try setting that back down. But if you want to keep it, you could clear your browser cache entirely, which would require reloading those stories.

Otherwise, you'll need to at least force reload (usually ctrl-shft-R or cmd-shft-R) the first chapter of each story.

If you see a cloudflare page before you see the chapter 1 page of a story, make sure you have loaded the page 'normally' by clicking to chapter 2, then return to chapter 1 with the "< Prev" button on page, not the browser back button. Or click to the author page, then click the story link there.

Read the BrowserCacheFeature wiki page for more details.
Clearing the browser cache for ff.net didn't work, but lowering the browser_cache_age_limit did. Thanks a lot, I was tearing my hair out over this!
zeusosphere is offline   Reply With Quote
Old 02-03-2024, 03:54 PM   #9249
ficfangirl
Junior Member
ficfangirl began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2024
Device: Thinkpad laptop T480
Since I updated the plug-in on calibre, I've been unable to download stories from AO3. I keep getting this message:

calibre 7.4 embedded-python: True
Windows-10-10.0.19045-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19045')
Python 3.11.5
Windows: ('10', '10.0.19045', 'SP0', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: FanFicFare (4, 31, 0)
Traceback (most recent call last):
File "C:\Users\Robin.RICE-LAW\AppData\Roaming\calibre\plugins\FanFicFare.zip \fanficfare\fetchers\fetcher_requests.py", line 128, in request
File "C:\Users\Robin.RICE-LAW\AppData\Roaming\calibre\plugins\FanFicFare.zip \requests\models.py", line 943, in raise_for_status
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://archiveofourown.org/tags/Har...iew_adult=true

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre_plugins.fanficfare_plugin.fff_plugin" , line 663, in get_urls_from_page_menu
File "calibre_plugins.fanficfare_plugin.fff_plugin" , line 686, in get_urls_from_page
File "C:\Users\Robin.RICE-LAW\AppData\Roaming\calibre\plugins\FanFicFare.zip \fanficfare\geturls.py", line 44, in get_urls_from_page
File "C:\Users\Robin.RICE-LAW\AppData\Roaming\calibre\plugins\FanFicFare.zip \fanficfare\adapters\base_adapter.py", line 457, in get_urls_from_page
File "C:\Users\Robin.RICE-LAW\AppData\Roaming\calibre\plugins\FanFicFare.zip \fanficfare\adapters\base_otw_adapter.py", line 603, in before_get_urls_from_page
File "C:\Users\Robin.RICE-LAW\AppData\Roaming\calibre\plugins\FanFicFare.zip \fanficfare\requestable.py", line 119, in get_request
File "C:\Users\Robin.RICE-LAW\AppData\Roaming\calibre\plugins\FanFicFare.zip \fanficfare\requestable.py", line 111, in get_request_redirected
File "C:\Users\Robin.RICE-LAW\AppData\Roaming\calibre\plugins\FanFicFare.zip \fanficfare\fetchers\base_fetcher.py", line 133, in get_request_redirected
File "C:\Users\Robin.RICE-LAW\AppData\Roaming\calibre\plugins\FanFicFare.zip \fanficfare\fetchers\cache_basic.py", line 122, in fetcher_do_request
File "C:\Users\Robin.RICE-LAW\AppData\Roaming\calibre\plugins\FanFicFare.zip \fanficfare\fetchers\decorators.py", line 102, in fetcher_do_request
File "C:\Users\Robin.RICE-LAW\AppData\Roaming\calibre\plugins\FanFicFare.zip \fanficfare\fetchers\base_fetcher.py", line 106, in do_request
File "C:\Users\Robin.RICE-LAW\AppData\Roaming\calibre\plugins\FanFicFare.zip \fanficfare\fetchers\fetcher_requests.py", line 149, in request
fanficfare.exceptions.HTTPErrorFFF: HTTP Error in FFF '403 Client Error: Forbidden for url: https://archiveofourown.org/tags/Har...=true'(403)

I'll admit to not be terribly tech savvy, but I've tried all the self help I can think of. Rebooting my computer, restarting calibre, updating to calibre 7.4, signing in and out of AO3. I get this this message or slight variations thereof whether I'm trying to download a page of stories, a single story, or updating existing stories. I'm not sure how to go back to an earlier version of FFF, but that's the only other cure I can think of, and I'm not sure how I go back to an earlier version. Any suggestions?
ficfangirl is offline   Reply With Quote
Old 02-03-2024, 04:52 PM   #9250
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,990
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ficfangirl View Post
Since I updated the plug-in on calibre, I've been unable to download stories from AO3. I keep getting this message:

...
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://archiveofourown.org/tags/Har...iew_adult=true
...

I'll admit to not be terribly tech savvy, but I've tried all the self help I can think of. Rebooting my computer, restarting calibre, updating to calibre 7.4, signing in and out of AO3. I get this this message or slight variations thereof whether I'm trying to download a page of stories, a single story, or updating existing stories. I'm not sure how to go back to an earlier version of FFF, but that's the only other cure I can think of, and I'm not sure how I go back to an earlier version. Any suggestions?
Getting 403 Client Error: Forbidden suggests that you are being blocked by the site.

Have you been doing a lot of downloads? The fact you're trying to pull all stories from such a large search set would suggest you have been.

We have seen AO3 blocked people before for 'large' numbers of downloads, but I don't have specific numbers for that. But I'm able to get a story list using the same search URL.

I suspect the answer is first, to wait for the block to clear. I don't know how long that could take, unfortunately. Could be hours, could be days.

Then second, limit your self to fewer downloads. Evaluate and choose before downloading rather than downloading and deleting the ones you don't like.
JimmXinu is offline   Reply With Quote
Old 02-03-2024, 05:20 PM   #9251
ficfangirl
Junior Member
ficfangirl began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2024
Device: Thinkpad laptop T480
Quote:
Originally Posted by JimmXinu View Post
Getting 403 Client Error: Forbidden suggests that you are being blocked by the site.

Have you been doing a lot of downloads? The fact you're trying to pull all stories from such a large search set would suggest you have been.

We have seen AO3 blocked people before for 'large' numbers of downloads, but I don't have specific numbers for that. But I'm able to get a story list using the same search URL.

I suspect the answer is first, to wait for the block to clear. I don't know how long that could take, unfortunately. Could be hours, could be days.

Then second, limit your self to fewer downloads. Evaluate and choose before downloading rather than downloading and deleting the ones you don't like.
Thanks for the input. This is day 3 and the commencement of the issue coincided with the update of the plug-in, but it is what it is. Thanks again.
ficfangirl is offline   Reply With Quote
Old 02-03-2024, 05:24 PM   #9252
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,990
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ficfangirl View Post
Thanks for the input. This is day 3 and the commencement of the issue coincided with the update of the plug-in, but it is what it is. Thanks again.
Past releases are available on the project home. Go ahead and try older versions if you like.
JimmXinu is offline   Reply With Quote
Old 02-03-2024, 06:06 PM   #9253
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,027
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Depending on your ISP, unplugging your modem for a few minutes and then plugging it back in might get you a new IP address and resolve the problem.
ownedbycats is offline   Reply With Quote
Old 02-03-2024, 06:37 PM   #9254
culytera
Zealot
culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.culytera ought to be getting tired of karma fortunes by now.
 
Posts: 125
Karma: 295674
Join Date: Jul 2021
Device: iPhone
Is it normal for the error log to show the URL for the tag instead of a specific work with that tag? It kind of looks like FFF was trying to download from the tag.
culytera is offline   Reply With Quote
Old 02-03-2024, 06:38 PM   #9255
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,027
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by culytera View Post
Is it normal for the error log to show the URL for the tag instead of a specific work with that tag? It kind of looks like FFF was trying to download from the tag.
Get story URLs from webpage, I'd presume.
ownedbycats is offline   Reply With Quote
Reply

Tags
fanfiction


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 523 07-15-2025 06:45 PM
[GUI Plugin] Open With kiwidude Plugins 404 02-21-2025 05:42 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


All times are GMT -4. The time now is 11:30 AM.


MobileRead.com is a privately owned, operated and funded community.