[go: up one dir, main page]

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

fix: Sakuranovel #560

Merged
merged 1 commit into from
Feb 22, 2023
Merged

fix: Sakuranovel #560

merged 1 commit into from
Feb 22, 2023

Conversation

K1ngfish3r
Copy link
Contributor

fixes LNReader/lnreader-plugins#456 (comment)

images don't appear consistently, but I think that's more on the source's side.

@@ -91,12 +91,12 @@ class WPMangaStreamScraper {
novel.genre = loadedCheerio('.genxed').text().trim().replace(/\s/g, ',');

novel.summary = loadedCheerio('.entry-content')
.find('h3')
.find('h3 , p.a')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked on the source sites, wouldn't div[itemprop="description"] be a better selector?

novel.summary = loadedCheerio('div[itemprop="description"]').text()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I basically want to make the summary look cleaner by removing those within the box
Screenshot from 2023-02-22 12-14-33

so with this
novel.summary = loadedCheerio('div[itemprop="description"]').text()
it looks like this
Screenshot from 2023-02-22 12-26-16

so I try to rectify it (somewhat, I wish I could do better) with this,
novel.summary = loadedCheerio('.entry-content') .find('h3 , p.a') .remove() .end() .prop('innerHTML') .replace(/(<.*?>)/g, ' ') .replace(/(&.*;)/g, '\n');

so it looks something like this,
Screenshot from 2023-02-22 12-30-15

@rajarsheechatterjee rajarsheechatterjee merged commit b40e933 into LNReader:main Feb 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(SakuraNovel) doesn't work
2 participants