Integrate new adapters, Fix twcs for poor summary html, bump versions.

This commit is contained in:
Jim Miller
2012-06-28 13:56:17 -05:00
parent 80a34d6274
commit 0e31282368
8 changed files with 71 additions and 8 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+14
View File
@@ -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]
+3
View File
@@ -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
@@ -165,7 +165,13 @@ class TheWritersCoffeeShopComSiteAdapter(BaseSiteAdapter):
svalue = ""
while not defaultGetattr(value,'class') == 'label':
svalue += str(value)
value = value.nextSibling
# poor HTML(unclosed <p> for one) can cause run on
# over the next label.
if '<span class="label">' in svalue:
svalue = svalue[0:svalue.find('<span class="label">')]
break
else:
value = value.nextSibling
self.setDescription(url,svalue)
if 'Rated' in label:
+2 -1
View File
@@ -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])
+29 -4
View File
@@ -54,13 +54,17 @@
much easier. </p>
</div>
<!-- put announcements here, h3 is a good title size. -->
<h3>fanfiction.net Fixed</h3>
<p>
Fixes are in place now for the latest round of fanfiction.net changes (as of Jun 28, 2012).
</p>
<h3>New Sites</h3>
<p>
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.
<br />Thanks, Ida!
</p>
<p>
@@ -421,6 +425,27 @@
Or use the URL of the story's chapter list, such as
<br /><a href="http://www.ncisfiction.com/chapters.php?stid=1234">http://www.ncisfiction.com/chapters.php?stid=1234</a>
</dd>
<dt>www.fanfiktion.de</dt>
<dd>
Use the URL of the story's first chapter, such as
<br /><a href="http://www.fanfiktion.de/s/46ccbef30000616306614050">http://www.fanfiktion.de/s/46ccbef30000616306614050</a>
</dd>
<dt>ponyfictionarchive.net</dt>
<dd>
Use the URL of the story's first chapter, such as
<br /><a href="http://ponyfictionarchive.net/viewstory.php?sid=1234">http://ponyfictionarchive.net/viewstory.php?sid=1234</a>
<br />Or:
<br /><a href="http://explicit.ponyfictionarchive.net/viewstory.php?sid=1234">http://explicit.ponyfictionarchive.net/viewstory.php?sid=1234</a>
</dd>
<dt>sg1-heliopolis.com</dt>
<dd>
Use the URL of the story's first chapter, such as
<br /><a href="http://sg1-heliopolis.com/archive/viewstory.php?sid=1234">http://sg1-heliopolis.com/archive/viewstory.php?sid=1234</a>
<br />Or:
<br /><a href="http://sg1-heliopolis.com/adult/viewstory.php?sid=1234">http://sg1-heliopolis.com/adult/viewstory.php?sid=1234</a>
<br />Or:
<br /><a href="http://sg1-heliopolis.com/atlantis/viewstory.php?sid=1234">http://sg1-heliopolis.com/atlantis/viewstory.php?sid=1234</a>
</dd>
</dl>
<p>
A few additional things to know, which will make your life substantially easier:
+14
View File
@@ -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]