mirror of
https://github.com/wassname/FanFicFare.git
synced 2026-09-12 12:02:50 +08:00
Exit on ff.net error downloading chapter. Replace ':' with '_' in file name for html output, too.
This commit is contained in:
@@ -133,6 +133,8 @@ class FFNet(FanfictionSiteAdapter):
|
||||
soup = None
|
||||
div = soup.find('div', {'id' : 'storytext'})
|
||||
if None == div:
|
||||
logging.error("Error downloading Chapter: %s" % url)
|
||||
exit(1)
|
||||
return '<html/>'
|
||||
|
||||
return div.prettify()
|
||||
|
||||
@@ -59,7 +59,7 @@ class HTMLWriter(FanficWriter):
|
||||
|
||||
def __init__(self, base, name, author, inmemory=False, compress=False):
|
||||
self.basePath = base
|
||||
self.name = name.replace(" ", "_")
|
||||
self.name = name.replace(" ", "_").replace(":","_")
|
||||
self.storyTitle = name
|
||||
self.fileName = self.basePath + '/' + self.name + '.html'
|
||||
self.authorName = author
|
||||
|
||||
Reference in New Issue
Block a user