Skip to content

Commit

Permalink
fix kakuyomu novel title fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
safirex committed Nov 12, 2022
1 parent e98fedd commit f6f12d1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Downloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,12 @@ def setUrl(self):
self.url = 'https://kakuyomu.jp/works/%s' % self.code

def parseTitle(self, TocHTML):
chapter_title = re.findall(
'<p class="widget-episodeTitle js-vertical-composition-item">(.*?)<', TocHTML)[0]
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 f6f12d1

Please sign in to comment.