Skip to content

Commit

Permalink
fix bad change TOC resume parser
Browse files Browse the repository at this point in the history
  • Loading branch information
safirex committed Dec 30, 2024
1 parent c60a006 commit d368be1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Downloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def processTocResume(self,html):
self.createFile(0, 'TOC', resume)

def parseTocResume(self, html):
soup = BeautifulSoup(html, 'html.parser').find("h1")
soup = BeautifulSoup(html, 'html.parser').find("div", id="novel_ex")
print("soup ",soup.text)
return soup.text if soup else ""
# resume=re.findall('<div id="novel_ex">'+'(.*?)'+'</div>',html,re.S)[0]
Expand Down Expand Up @@ -431,10 +431,6 @@ def setUrl(self):
def parseTitle(self, TocHTML):
soup = BeautifulSoup(TocHTML,'html.parser')
chapter_title =soup.find('h1',id='workTitle').text
# print(soup.find('h1',class_='workTitle'))

# chapter_title = re.findall(
# '<p class="widget-episodeTitle js-vertical-composition-item">(.*?)<', TocHTML)[0]
return chapter_title

def parseOnlineChapterList(self, html) -> list:
Expand Down

0 comments on commit d368be1

Please sign in to comment.