Closed lukeovalle closed 4 years ago
Hi,
Seems like nhentai changed a bit their design, so that break lots of things, but thanks for being aware!
Your fix is a bit incorrect since the number in the link don't match with the real number of page Example with 316579:
Pages: <span class="tags"><a class="tag" href="/search/?q=pages%3A%3E32+pages%3A%3C48"><span class="name">40</span></a></span></div><div class="tag-container field-name">
It will take '32' but the real number of pages is 40.
A correct fix can be
@client.body.match(/Pages:\s*.*>([0-9]+)</)[1].to_i
(or maybe better, I'm far away from being a pro a Regex)
I'll change for code to match with the new design this week end
Hi, and sorry for the delay
I've been playing a little with the code and there are a few other things broken. i've managed to fix the Doujinshi class but the others are still broken...
I'll send a PR with what i've done.
Ok so I correct things in the last commit ( 2f93cb1 ) Sorry for the really long delay, got some hard job to do.
I hope everything will go as normal now, and thanks again for the report :)
It fails with any ID i've tried
i think it can be fixed by changing the regexp in line 23 from
@count_pages = @client.body.match(/([0-9]+) pages/)[1].to_i
to@count_pages = @client.body.match(/([0-9]+)\+pages/)[1].to_i