getChapterLink

This commit is contained in:
2026-05-21 12:37:32 +02:00
parent 2bee0bc362
commit 99aec503a7
2 changed files with 11 additions and 3 deletions
+3
View File
@@ -2,3 +2,6 @@
*test*.py *test*.py
test.* test.*
*.log *.log
.vscode
.venv
*pycache*
+7 -2
View File
@@ -34,7 +34,12 @@ class OniichanyameteWebScrapper(WebScrapper):
links =soup.select("p[style*='padding-left:60px'] > a") links =soup.select("p[style*='padding-left:60px'] > a")
pprint(links) pprint(links)
currChapterNumber = fromChapter
for link in links: for link in links:
chapterNumber = re.search(r'\d+', link.text).group() tmpChapterNumber = re.search(r'\d+', link.text).group()
chapterNumber += 1
if tmpChapterNumber != str(currChapterNumber):
continue
yield chapterNumber, urljoin(self.baseLink, link["href"]) yield chapterNumber, urljoin(self.baseLink, link["href"])