Mildy better 'not found' check for ffnet, minor plugin tweak.

This commit is contained in:
Jim Miller 2012-02-20 17:29:53 -06:00
parent f17d837fc8
commit 2d7790fc83
2 changed files with 7 additions and 4 deletions

View file

@ -435,7 +435,9 @@ class OtherTab(QWidget):
and dynamic[key] is False:
dynamic[key] = True
info_dialog(self, _('Done'),
_('Confirmation dialogs have all been reset'), show=True)
_('Confirmation dialogs have all been reset'),
show=True,
show_copy_button=False)
permitted_values = {
'int' : ['numWords','numChapters'],

View file

@ -83,8 +83,9 @@ class FanFictionNetSiteAdapter(BaseSiteAdapter):
if "Unable to locate story with id of " in data:
raise exceptions.StoryDoesNotExist(url)
if "Chapter not found. Please check to see you are not using an outdated url." in data:
# some times "Chapter not found...", sometimes "Chapter text not found..."
if "not found. Please check to see you are not using an outdated url." in data:
raise exceptions.FailedToDownload("Error downloading Chapter: %s! 'Chapter not found. Please check to see you are not using an outdated url.'" % url)
try:
@ -102,7 +103,7 @@ class FanFictionNetSiteAdapter(BaseSiteAdapter):
chapcount+1)
print('=Trying newer chapter: %s' % tryurl)
newdata = self._fetchUrl(tryurl)
if "Chapter not found. Please check to see you are not using an outdated url." \
if "not found. Please check to see you are not using an outdated url." \
not in newdata:
print('=======Found newer chapter: %s' % tryurl)
soup = bs.BeautifulSoup(newdata)