diff --git a/calibre-plugin/__init__.py b/calibre-plugin/__init__.py index 4673ca16..bf78347c 100644 --- a/calibre-plugin/__init__.py +++ b/calibre-plugin/__init__.py @@ -27,7 +27,7 @@ class FanFictionDownLoaderBase(InterfaceActionBase): description = 'UI plugin to download FanFiction stories from various sites.' supported_platforms = ['windows', 'osx', 'linux'] author = 'Jim Miller' - version = (1, 5, 8) + version = (1, 5, 9) minimum_calibre_version = (0, 8, 30) #: This field defines the GUI plugin class that contains all the code diff --git a/calibre-plugin/about.txt b/calibre-plugin/about.txt index 2dbfe0be..9174f8b1 100644 --- a/calibre-plugin/about.txt +++ b/calibre-plugin/about.txt @@ -18,3 +18,11 @@ group for the downloader. That covers the web application and CLI, too. The source for this plugin is available at it's project home. +
+ +

+See the list of supported sites. +

+

+Read the FAQs. +

diff --git a/calibre-plugin/config.py b/calibre-plugin/config.py index cf46574b..04f74f87 100644 --- a/calibre-plugin/config.py +++ b/calibre-plugin/config.py @@ -126,6 +126,10 @@ class ConfigWidget(QWidget): self.l = QVBoxLayout() self.setLayout(self.l) + label = QLabel('List of Supported Sites -- FAQs') + label.setOpenExternalLinks(True) + self.l.addWidget(label) + tab_widget = QTabWidget(self) self.l.addWidget(tab_widget) diff --git a/defaults.ini b/defaults.ini index c543396f..cf95d156 100644 --- a/defaults.ini +++ b/defaults.ini @@ -330,6 +330,12 @@ extratags: FanFiction,Testing,HTML #username:YourName #password:yourpassword +[nfacommunity.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + ## Some sites also require the user to confirm they are adult for ## adult content. In commandline version, this should go in your ## personal.ini, not defaults.ini. @@ -396,8 +402,6 @@ extratags: ## when a password is required rather than prompting every time. #fail_on_password: false -[www.gayauthors.org] - [www.harrypotterfanfiction.com] ## Some sites do not require a login, but do require the user to ## confirm they are adult for adult content. In commandline version, @@ -412,6 +416,12 @@ extratags: [www.mediaminer.org] +[www.midnightwhispers.ca] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + [www.potionsandsnitches.net] [www.siye.co.uk] diff --git a/fanficdownloader/adapters/adapter_midnightwhispersca.py b/fanficdownloader/adapters/adapter_midnightwhispersca.py index d638ecc0..8e48fb08 100644 --- a/fanficdownloader/adapters/adapter_midnightwhispersca.py +++ b/fanficdownloader/adapters/adapter_midnightwhispersca.py @@ -274,12 +274,16 @@ class MidnightwhispersCaAdapter(BaseSiteAdapter): # XXX logging.debug('Getting chapter text from: %s' % url) - soup = bs.BeautifulStoneSoup(self._fetchUrl(url), + data = self._fetchUrl(url) + soup = bs.BeautifulStoneSoup(data, selfClosingTags=('br','hr')) # otherwise soup eats the br/hr tags. div = soup.find('div', {'id' : 'story'}) if None == div: - raise exceptions.FailedToDownload("Error downloading Chapter: %s! Missing required element!" % url) + if "A fatal MySQL error was encountered" in data: + raise exceptions.FailedToDownload("Error downloading Chapter: %s! Database error on the site reported!" % url) + else: + raise exceptions.FailedToDownload("Error downloading Chapter: %s! Missing required element!" % url) return self.utf8FromSoup(url,div) diff --git a/plugin-defaults.ini b/plugin-defaults.ini index 12030e38..9c12edb5 100644 --- a/plugin-defaults.ini +++ b/plugin-defaults.ini @@ -302,6 +302,12 @@ extratags: FanFiction,Testing,HTML #username:YourName #password:yourpassword +[nfacommunity.com] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + ## Some sites also require the user to confirm they are adult for ## adult content. In commandline version, this should go in your ## personal.ini, not defaults.ini. @@ -365,8 +371,6 @@ extratags: ## when a password is required rather than prompting every time. #fail_on_password: false -[www.gayauthors.org] - [www.harrypotterfanfiction.com] ## Some sites do not require a login, but do require the user to ## confirm they are adult for adult content. In commandline version, @@ -381,6 +385,12 @@ extratags: [www.mediaminer.org] +[www.midnightwhispers.ca] +## Some sites do not require a login, but do require the user to +## confirm they are adult for adult content. In commandline version, +## this should go in your personal.ini, not defaults.ini. +#is_adult:true + [www.potionsandsnitches.net] [www.siye.co.uk] diff --git a/readme.txt b/readme.txt index a6e59751..b602c53d 100644 --- a/readme.txt +++ b/readme.txt @@ -10,5 +10,10 @@ python downloader.py http://www.fanfiction.net/s/5192986/1/A_Fox_in_Tokyo Do 'python downloader.py -h' for more options. -This tool uses Python 2.5.2, but should work with newer versions of Python. +This tool uses Python 2.7, but should work with newer versions of Python. +For more information, see: + +http://code.google.com/p/fanficdownloader/wiki/FanFictionDownloaderSupportedsites + +http://code.google.com/p/fanficdownloader/wiki/FanFictionDownloaderFAQs