Open Saylux opened 8 months ago
The website loads the english translations as the users scroll the screen (they make Google Translate API calls for that). Mocking that behaviour in the app wouldn't be possible as it scrapes once on initial page load.
@rajarsheechatterjee couldn't you just add a wait() there for a few seconds or something? And then let it scrape?
There are several stories that only appear there, and letting it download in the background would be fine.
@rajarsheechatterjee couldn't you just add a wait() there for a few seconds or something? And then let it scrape?
I don't think it's possible as user has to scroll the entire page for it to be completely translated.
Source information
Comrade Mao
Steps to reproduce
Expected behavior
English should be shown or downloaded for each chapter just like in the browser on a laptop or chrome browser on the phone. It defaults to chinese and then after a slight delay switches to english. It even does this in web view.
Actual behavior
Chinese is displayed or downloaded.
LNReader version
1.1.18
Android version
Android 14
Other details
Location of Code: https://github.com/LNReader/lnreader/blob/main/src/sources/en/comrademao.js#L130 I believe that the title needs to be specified for cheerio to choose the right one, as the order of the two anchored links/hrefs may have changed if this was working before.
Acknowledgements