diff --git a/app.yaml b/app.yaml index 6a182e1..492bbf0 100644 --- a/app.yaml +++ b/app.yaml @@ -1,6 +1,6 @@ # ffd-retief-hrd fanfictiondownloader application: fanfictiondownloader -version: 4-4-16 +version: 4-4-17 runtime: python27 api_version: 1 threadsafe: true diff --git a/calibre-plugin/__init__.py b/calibre-plugin/__init__.py index 315f454..46c3190 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, 37) + version = (1, 5, 38) minimum_calibre_version = (0, 8, 30) #: This field defines the GUI plugin class that contains all the code diff --git a/defaults.ini b/defaults.ini index 00c4903..566581e 100644 --- a/defaults.ini +++ b/defaults.ini @@ -425,8 +425,20 @@ cover_exclusion_regexp:/images/.*?ribbon.gif ## personal.ini, not defaults.ini. #is_adult:true +[ponyfictionarchive.net] +## 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 + [samdean.archive.nu] +[sg1-heliopolis.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 + [stargate-atlantis.org] [thehexfiles.net] @@ -479,6 +491,8 @@ cover_exclusion_regexp:/images/.*?ribbon.gif ## Comment this out or change it to false to use them anyway. never_make_cover: true +[www.fanfiktion.de] + [www.ficbook.net] [www.fictionalley.org] diff --git a/fanficdownloader/adapters/__init__.py b/fanficdownloader/adapters/__init__.py index f2e72ee..e59e42c 100644 --- a/fanficdownloader/adapters/__init__.py +++ b/fanficdownloader/adapters/__init__.py @@ -76,6 +76,9 @@ import adapter_destinysgatewaycom import adapter_ncisfictioncom import adapter_stargateatlantisorg import adapter_thealphagatecom +import adapter_fanfiktionde +import adapter_ponyfictionarchivenet +import adapter_sg1heliopoliscom ## This bit of complexity allows adapters to be added by just adding ## importing. It eliminates the long if/else clauses we used to need diff --git a/fanficdownloader/adapters/adapter_thewriterscoffeeshopcom.py b/fanficdownloader/adapters/adapter_thewriterscoffeeshopcom.py index fcd6f7a..2337019 100644 --- a/fanficdownloader/adapters/adapter_thewriterscoffeeshopcom.py +++ b/fanficdownloader/adapters/adapter_thewriterscoffeeshopcom.py @@ -165,7 +165,13 @@ class TheWritersCoffeeShopComSiteAdapter(BaseSiteAdapter): svalue = "" while not defaultGetattr(value,'class') == 'label': svalue += str(value) - value = value.nextSibling + # poor HTML(unclosed
for one) can cause run on + # over the next label. + if '' in svalue: + svalue = svalue[0:svalue.find('')] + break + else: + value = value.nextSibling self.setDescription(url,svalue) if 'Rated' in label: diff --git a/fanficdownloader/adapters/base_adapter.py b/fanficdownloader/adapters/base_adapter.py index be06130..b3fdb87 100644 --- a/fanficdownloader/adapters/base_adapter.py +++ b/fanficdownloader/adapters/base_adapter.py @@ -134,9 +134,10 @@ class BaseSiteAdapter(Configurable): code=detected['encoding'] else: continue + logging.debug("try code:"+code) return data.decode(code) except: - logging.debug("code failed:"+code) + logging.info("code failed:"+code) pass logging.info("Could not decode story, tried:%s Stripping non-ASCII."%decode) return "".join([x for x in data if ord(x) < 128]) diff --git a/index.html b/index.html index c0a10ee..4b9eac9 100644 --- a/index.html +++ b/index.html @@ -54,13 +54,17 @@ much easier.
++ + Fixes are in place now for the latest round of fanfiction.net changes (as of Jun 28, 2012). + +
- New sites samdean.archive.nu, www.yourfanfiction.com,
- www.destinysgateway.com, www.thealphagate.com,
- stargate-atlantis.org and www.ncisfiction.com added.
- That's 51 different supported sites now. Thanks, Ida!
+ New sites www.fanfiktion.de, ponyfictionarchive.net and sg1-heliopolis.com added.
+
Thanks, Ida!
@@ -421,6 +425,27 @@
Or use the URL of the story's chapter list, such as
http://www.ncisfiction.com/chapters.php?stid=1234
+
A few additional things to know, which will make your life substantially easier: diff --git a/plugin-defaults.ini b/plugin-defaults.ini index 7885303..eab030e 100644 --- a/plugin-defaults.ini +++ b/plugin-defaults.ini @@ -411,8 +411,20 @@ cover_exclusion_regexp:/images/.*?ribbon.gif ## personal.ini, not defaults.ini. #is_adult:true +[ponyfictionarchive.net] +## 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 + [samdean.archive.nu] +[sg1-heliopolis.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 + [stargate-atlantis.org] [thehexfiles.net] @@ -465,6 +477,8 @@ cover_exclusion_regexp:/images/.*?ribbon.gif ## Comment this out or change it to false to use them anyway. never_make_cover: true +[www.fanfiktion.de] + [www.ficbook.net] [www.fictionalley.org]