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

[bato] wrong chapter number #5562

Open
dajotim937 opened this issue May 7, 2024 · 7 comments
Open

[bato] wrong chapter number #5562

dajotim937 opened this issue May 7, 2024 · 7 comments

Comments

@dajotim937
Copy link

dajotim937 commented May 7, 2024

https://bato.to/title/130973-philomel-the-fake

Season 1 Finale and Hiatus Announcement has wrong chapter number. By gallery-dl they consider as chapter 1 and chapter 0 respectively. And which means that with dir template as c{chapter:>03} {title} Season 1 is downloaded to real chapter 1 folder.
Also "Season 1 Finale" doesn't count as title in metadata. Fixed in 2024.08.13 build.

@dajotim937
Copy link
Author

dajotim937 commented Aug 13, 2024

Related: #5988 (comment)
For side storied chapter number is also 0, and 6 of 7 side stories are download to the same folder with c{chapter:>03} {title} dir template.

https://bato.to/title/89188
For season 2 episode chapter num is always 2.

Solution: extract chapter num from the end of url.
Problem:
Sometimes chapter num from url doesn't match with actual chapter number.
https://bato.to/title/140652 - season 2(almost all chapters) and 3(all chapters) has ch_51 at the end of url, season 4 - ch_54.
Or https://bato.to/title/115494 - finally found same situation as while before. After ch29 url chapter num is +1 bigger than actual chapter number in chapter list.

@mikf
Copy link
Owner

mikf commented Aug 13, 2024

At the moment when the chapter info string (chapter_string) doesn't contain a chapter number, chapter is set to 0 i.e. not defined. I guess the real chapter number could alternatively be extracted from the end part of a full chapter URL like https://bato.to/title/97023-depths-of-malice/2446471-ch_91

@dajotim937
Copy link
Author

I guess the real chapter number could alternatively be extracted from the end part of a full chapter URL like

Yeah, but need to take in to account that it also not permanent solution, unfortunately. Check my comment above after editing.

mikf added a commit that referenced this issue Aug 14, 2024
i.e. the chapter number found in the full chapter URL
@mikf
Copy link
Owner

mikf commented Aug 14, 2024

The URL chapter numbers are now available as chapter_url (f0de168).

There've also been some improvements regarding volume and chapter number extraction (802d74b), as well as title (3b0753f).

@dajotim937
Copy link
Author

Do you, by any chance, need powershell scripts (I mean, I can just send you what and how you can get info and fields for requests and you can change them to whatever you want) with graphql requests to bato? I didn't look much into chapter requests (there isn't graphql requests when you open manga page), but there is requests to get manga (there wasn't request in "network" tab but I figure out it from js scripts on site) info and to get last 3 (max 5 I think) info about chapters. And you can use pagination to get next 3-5 chap info.

@dajotim937
Copy link
Author

dajotim937 commented Sep 3, 2024

chapter_url is wrong.
gallery-dl version is 1.27.4-dev:2024.09.01
https://bato.to/title/109109-rosalyn-vogart-official/2944018-ch_95.5

chapter
  0
chapter_id
  2944018
chapter_minor

chapter_string
  Creator's Note
chapter_url
  0

mikf added a commit that referenced this issue Sep 6, 2024
don't try to parse it as integer
@mikf
Copy link
Owner

mikf commented Sep 6, 2024

chapter_url is wrong.

32d2e68

chapter_url
  95.5

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

No branches or pull requests

2 participants