JimmXinu / FanFicFare

FanFicFare is a tool for making eBooks from stories on fanfiction and other web sites.
Other
757 stars 162 forks source link

Weird messages for FFnet on CLI #913

Closed Twilight666 closed 1 year ago

Twilight666 commented 1 year ago

I just updated FFF with today's update and now I get some weird messages on CLI:

b'1/0/_dk_https://fanfiction.net https://fanfiction.net https://www.fanfiction.net/u/4900616/Zahariel' is not in the cache b'1/0/_dk_chrome-extension://akiljllkbielkidmammnifcnibaigelm chrome-extension://akiljllkbielkidmammnifcnibaigelm https://www.fanfiction.net/u/4900616/Zahariel' is not in the cache FFF: WARNING: 2023-02-02 23:04:10,756: adapter_fanfictionnet.py(353): Caught exception in skip_author_cover: HTTP Error in FFF 'Page not found or expired in Browser Cache (see FFF setting browser_cache_age_limit)'(428) URL:'https://www.fanfiction.net/u/4900616/Zahariel'. b'1/0/_dk_chrome-extension://akiljllkbielkidmammnifcnibaigelm chrome-extension://akiljllkbielkidmammnifcnibaigelm https://www.fanfiction.net/image/7076598/180/' is not in the cache b'1/0/_dk_chrome-extension://akiljllkbielkidmammnifcnibaigelm chrome-extension://akiljllkbielkidmammnifcnibaigelm https://www.fanfiction.net/s/14177029/7/A-Young-Girl-s-Weaponization-of-the-Mythos' is not in the cache Downloaded Story: "A Young Girl's Weaponization of the Mythos (Ch 7-7)" by "Zahariel", Chapters: 7, Updated on: "2023-02-02 22:24:49"

The story I am downloading is https://www.fanfiction.net/s/14177029/[7-] and the last line is my custom post_process_cmd. The story is downloaded using the Chrome Cache. And it is downloaded correctly (including the image)

JimmXinu commented 1 year ago

The new release refactors the Browser Cache feature significantly:

  • Browser Cache Refactor & open_pages_in_browser feature See PR #905 and this MR post.

It works for with Chrome when I make sure to get all the pages.

Note that you may need the URLs with story title in now: https://www.fanfiction.net/s/14177029/7/A-Young-Girl-s-Weaponization-of-the-Mythos

Twilight666 commented 1 year ago

Ok I tried it a bit more Until now to download the above story, I needed to do 4 things:

  1. Go to https://www.fanfiction.net/s/14177029/7/A-Young-Girl-s-Weaponization-of-the-Mythos (or some variation of https://www.fanfiction.net/s/14177029/7) to get the data for the latest chapter
  2. Go to https://www.fanfiction.net/s/14177029/ to be able to use chapter range
  3. Click the Cover page for it to enter the Cache properly
  4. Go to https://www.fanfiction.net/u/4900616/Zahariel to get the author's cover page too so that if it is the same with 3, it would be skipped because the story's cover is actually the author's

Now it looks like that when I want to use chapter range I have to go to https://www.fanfiction.net/s/14177029/[7-] specifically (so that that url is in the cache) Also it looks like no matter what I do it still gives me the above message for the author page even if I use ctrl+f5 to force a full refresh on it Finally all of that doesn't matter since the story was downloaded successfully when I did the 1-4 steps originally, so FFF actually did find everything to download them in the cache the first time before all the above retries

Twilight666 commented 1 year ago

Also when I tried on my 2nd PC, it looks like I have to also go to https://www.fanfiction.net/s/14177029/ in order to download it. But I still get the following:

b'1/0/_dk_chrome-extension://akiljllkbielkidmammnifcnibaigelm chrome-extension://akiljllkbielkidmammnifcnibaigelm https://www.fanfiction.net/u/4900616/Zahariel' is not in the cache b'1/0/_dk_chrome-extension://akiljllkbielkidmammnifcnibaigelm chrome-extension://akiljllkbielkidmammnifcnibaigelm https://www.fanfiction.net/image/7076598/180/' is not in the cache Downloaded Story: "A Young Girl's Weaponization of the Mythos (Ch 7-7)" by "Zahariel", Chapters: 7, Updated on: "2023-02-02 22:24:49"

But the story is downloaded normally, with the Cover that it explicitly says is missing.

BTW my current settings are: is_adult:true include_tocpage: true include_images:true make_firstimage_cover:false

use_basic_cache:true use_browser_cache: true use_browser_cache_only:true check_next_chapter:false

background_color: none keep_style_attr: true

And I have set my browser path with browser_cache_path: Not putting the path, but since the chapter is downloaded it is obviously working

JimmXinu commented 1 year ago

Those last two messages are just some debug output indicating that it didn't find WebToEpub cached files. FFF looks for both manual and WebToEpub cached files so it can see which is newer. Debug removed: f29f3f973af0de9fa2b012365929f773cb898981

FYI, The only reason you need to hit https://www.fanfiction.net/s/14177029/ is because that's what you're passing the CLI.

I'm honestly surprised that even works. FFF used to use https://www.fanfiction.net/s/XXXX/1/ as the canonical story URL and now uses https://www.fanfiction.net/s/XXXX/1/Story-Title. You don't need to remove the chapter number to use a chapter range.

Twilight666 commented 1 year ago

Ok I tried it with the full URL and it works Saves me from going through extra pages

However I tried this:

https://www.fanfiction.net/s/14027124/334/A-Nascent-Kaleidoscope[330-]

And I used WebtoEpub to load pages 330-333 to cache (334 was already in cache since that's the one I opened WebtoEpub from) And I got this:

b'1/0/_dk_chrome-extension://akiljllkbielkidmammnifcnibaigelm chrome-extension://akiljllkbielkidmammnifcnibaigelm https://www.fanfiction.net/u/15264908/AStoryForOne' is not in the cache b'1/0/_dk_https://fanfiction.net https://fanfiction.net https://www.fanfiction.net/s/14027124/330/A-Nascent-Kaleidoscope' is not in the cache b'1/0/_dk_https://fanfiction.net https://fanfiction.net https://www.fanfiction.net/s/14027124/331/A-Nascent-Kaleidoscope' is not in the cache b'1/0/_dk_https://fanfiction.net https://fanfiction.net https://www.fanfiction.net/s/14027124/333/A-Nascent-Kaleidoscope' is not in the cache Downloaded Story: "A Nascent Kaleidoscope (Ch 330-334)" by "AStoryForOne", Chapters: 334, Updated on: "2023-02-03 16:31:30"

And the chapters were downloaded correctly in FFF WebtoEpub even though I never opened 330-333 (like it happened until now) but I still got the above. On the other hand 334 which was opened manually does not give such an error

Edit: Rereading the errors. Is it saying that the author page isn't in WebtoEpub's cache and 330-333 is not on the web browser's (while 334 is in both)? In that case, yeah ignore the above. It is just FFF saying were is found the pages from

JimmXinu commented 1 year ago

That's the same debug output., just the other way around. Before, I committed the change, but didn't upload a test release. Now I've uploaded a CLI test release to test.pypi.org

mhussaincov93 commented 1 year ago

hi sir jim,

thank you so much for the open in browser feature.

I set sleep time to 20

so as not to many requests hit the servers.

however.

every URL opened via chrome via fanficfare, opens in a new tab.

would it be possible to have fanficfare open the next chapter page in the same tab/window?

instead of opening a new tab for every one?

the more tabbs that are opened the higher the memmery usage becomes.

I have a story with over 100 chapters you see.

thank you again for this feature.

Majid Hussain

On 03/02/2023 18:21, Jim Miller wrote:

That's the same debug output., just the other way around. Before, I committed the change, but didn't upload a test release. Now I've uploaded a CLI test release to |test.pypi.org|

— Reply to this email directly, view it on GitHub https://github.com/JimmXinu/FanFicFare/issues/913#issuecomment-1416238126, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASDFWNYI2C4D7ENABVTI32LWVVEDNANCNFSM6AAAAAAUPQIKLQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

JimmXinu commented 1 year ago

Unfortunately, there isn't a way to target a tab or window. I open a new window before starting a download and then close it (with all the tabs) when I'm done.