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

More customizations for literotica (Language & Beta) #588

Closed
T-Man2000 opened this issue Nov 8, 2020 · 6 comments
Closed

More customizations for literotica (Language & Beta) #588

T-Man2000 opened this issue Nov 8, 2020 · 6 comments

Comments

@T-Man2000
Copy link

literotica offers stories in several languages. By default, however, English is always passed to Calibre as the language. Is it possible that FFF, or the adapter, recognizes the correct language and transfers it to Calibre?

literotica has provided a public beta for the new design. Can the new design already be considered?

@JimmXinu
Copy link
Owner

JimmXinu commented Nov 8, 2020

I don't read that site and remember very little about it. I also don't read other languages very well. Please provide some example story URLs and point out where the language is shown.

I'm not very interested in supporting more than one version of the same site. Generally, we don't even support different themes/skins if they change the HTML parsing. But it looks like it possible to just remove /beta/ from given story URLs and go on.

@T-Man2000
Copy link
Author

As far as I can see, the only way to see this is through the link.

Examples:
German: https://german.literotica.com/s/verhext-03
English: https://www.literotica.com/s/the-christmas-market
Spanish: https://spanish.literotica.com/s/somos-felices-las-tres-capitulo-20
Frensh: https://french.literotica.com/s/lamante-des-marees
Italian: https://italian.literotica.com/s/hot-wife-new-life

The beta currently only works for the subpages of the story. Not for collections and the author overview.

@JimmXinu
Copy link
Owner

Ugh. adapter_literotica.py has been touched by at least 5 different developers over the years and parts of it are a real mess. And the site is no grand model of organization, either.

Theoretically, literotica story URLs all get normalized to www.literotica.com. Except that multi-'chapter' stories are also 'normalized' to the first 'chapter'. ('Chapters' on literotica.com are stories that are all part of the same 'series' on the author's page.) That first chapter normalization doesn't change german/spanish, etc to www. I believe that the site changed from using relative to absolute chapter links at some point, which is probably why that mismatch wasn't noticed.

So in practice, only 'single chapter' stories have been 'properly' normalizing.

Changing FFF to preserve the language in the storyURL changes the storyURL (obviously) and chapter URLs in some existing epubs. Changing FFF to always normalize to www, again, will change storyURL and chapter URLs in some existing epubs. In both cases, FFF PI would be prompting you about change story URLs (if turned on), and potentially re-downloading existing chapters due to chapter URL changes.

That's a much bigger issue than the one you raised about languages, and I need to think about it for a bit before deciding which way to go.

A basic change(31b2c75) to accept /beta/ URLs is already in the latest test version. Literally all it does accept story URLs with /beta/ and then /beta/ from the story URL.

@T-Man2000
Copy link
Author

It would be a small relief. But depending on the effort for the implementation it makes no sense to spend too much time on it. Most of the users will use the English text anyway.

Maybe you can keep the topic in mind. If one has to make major adjustments anyway, then a few thoughts about the implementation would be nice. And with the redesign adjustments will be necessary.

@JimmXinu
Copy link
Owner

I've uploaded test versions that I believe will keep the language domains in all cases and use that to set language.

@JimmXinu
Copy link
Owner

I'm going to assume this is working okay. You can re-open this if you find a problem.

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

No branches or pull requests

2 participants