mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-09 05:21:13 +02:00
fix chapter names in www.novelall.com
This commit is contained in:
parent
7d3e1ccc95
commit
a2a3efce52
2 changed files with 5 additions and 5 deletions
|
|
@ -70,8 +70,8 @@ class WWWNovelAllComAdapter(BaseSiteAdapter):
|
||||||
|
|
||||||
# normalized story URL.
|
# normalized story URL.
|
||||||
self._setURL("https://"+self.getSiteDomain()
|
self._setURL("https://"+self.getSiteDomain()
|
||||||
+"/novel/"+self.story.getMetadata('storyId')
|
+ "/novel/"+self.story.getMetadata('storyId')
|
||||||
+".html")
|
+ ".html")
|
||||||
else:
|
else:
|
||||||
raise exceptions.InvalidStoryURL(url,
|
raise exceptions.InvalidStoryURL(url,
|
||||||
self.getSiteDomain(),
|
self.getSiteDomain(),
|
||||||
|
|
@ -155,7 +155,7 @@ class WWWNovelAllComAdapter(BaseSiteAdapter):
|
||||||
self.story.setMetadata('released', released.find_next_sibling('a').string.strip())
|
self.story.setMetadata('released', released.find_next_sibling('a').string.strip())
|
||||||
|
|
||||||
## getting follows
|
## getting follows
|
||||||
follows = soup.find('num', {"id":"follow_num"})
|
follows = soup.find('num', {"id": "follow_num"})
|
||||||
if follows:
|
if follows:
|
||||||
self.story.setMetadata('follows', follows.string)
|
self.story.setMetadata('follows', follows.string)
|
||||||
|
|
||||||
|
|
@ -202,7 +202,7 @@ class WWWNovelAllComAdapter(BaseSiteAdapter):
|
||||||
cdates.append(makeDate(dt, '%b %d, %Y'))
|
cdates.append(makeDate(dt, '%b %d, %Y'))
|
||||||
# <a href="https://www.novelall.com/chapter/Stellar-Transformation-Volume-18-Chapter-45-part2/616971/" title="Stellar Transformation Volume 18 Chapter 45 part2">
|
# <a href="https://www.novelall.com/chapter/Stellar-Transformation-Volume-18-Chapter-45-part2/616971/" title="Stellar Transformation Volume 18 Chapter 45 part2">
|
||||||
a = li.find('a')
|
a = li.find('a')
|
||||||
ctitle = a['title'].replace(title, '').strip()
|
ctitle = re.sub(r"^%s(.+)$" % re.escape(title), r"\1", a['title'], 0, re.UNICODE | re.IGNORECASE).strip()
|
||||||
self.chapterUrls.append((ctitle, a['href']))
|
self.chapterUrls.append((ctitle, a['href']))
|
||||||
|
|
||||||
cdates.sort()
|
cdates.sort()
|
||||||
|
|
|
||||||
|
|
@ -437,7 +437,7 @@ def do_download(arg,
|
||||||
call(string.Template(adapter.getConfig('pre_process_cmd')).substitute(metadata), shell=True)
|
call(string.Template(adapter.getConfig('pre_process_cmd')).substitute(metadata), shell=True)
|
||||||
|
|
||||||
output_filename = write_story(configuration, adapter, options.format, options.metaonly)
|
output_filename = write_story(configuration, adapter, options.format, options.metaonly)
|
||||||
|
|
||||||
if options.metaonly:
|
if options.metaonly:
|
||||||
metadata['output_filename'] = output_filename
|
metadata['output_filename'] = output_filename
|
||||||
if options.jsonmeta:
|
if options.jsonmeta:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue