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

Update wtrlab.py #2346

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sources/multi/wtrlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def read_novel_info(self):
chap_id = 1 + idx
vol_id = 1 + len(self.chapters) // 100
vol_title = f"Volume {vol_id}"
url = f"{self.host}{lang}/serie-{serie_id}/{novel_slug}/chapter-{chapter['slug']}"
url = f"{self.host}{lang}/serie-{serie_id}/{novel_slug}/chapter-{chapter['order']}"
if chap_id % 100 == 1:
self.volumes.append(
Volume(
Expand All @@ -85,9 +85,9 @@ def download_chapter_body(self, chapter):
assert chapter_json

logger.info("chapeter %s", chapter_json)

chapter_details = chapter_json['props']['pageProps']['serie']['chapter']
# adjust chapter title as the one from the overview usually lacks details
chapter.title = chapter_json['props']['pageProps']['serie']['chapter_data']['data']['title']
chapter.title = chapter_details['code'] + " " + chapter_details['title']
# get all text
text_lines = chapter_json['props']['pageProps']['serie']['chapter_data']['data']['body']

Expand Down
Loading