Turn on ficbook.net and allow chapter URLs in fbn.

This commit is contained in:
Jim Miller 2012-02-15 09:20:36 -06:00
parent 56157546be
commit 6134ba7e79
4 changed files with 23 additions and 8 deletions

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, 4, 2)
version = (1, 4, 3)
minimum_calibre_version = (0, 8, 30)
#: This field defines the GUI plugin class that contains all the code

View file

@ -44,6 +44,7 @@ import adapter_twiwritenet
import adapter_whoficcom
import adapter_siyecouk
import adapter_archiveofourownorg
import adapter_ficbooknet
## This bit of complexity allows adapters to be added by just adding
## importing. It eliminates the long if/else clauses we used to need

View file

@ -70,7 +70,7 @@ class FicBookNetAdapter(BaseSiteAdapter):
return "http://"+self.getSiteDomain()+"/readfic/12345"
def getSiteURLPattern(self):
return re.escape("http://"+self.getSiteDomain()+"/readfic/")+r"\d+$"
return re.escape("http://"+self.getSiteDomain()+"/readfic/")+r"\d+"
## Getting the chapter list and the meta data, plus 'is adult' checking.
def extractChapterUrlsAndMetadata(self):
@ -218,4 +218,4 @@ class FicBookNetAdapter(BaseSiteAdapter):
if None == chapter:
raise exceptions.FailedToDownload("Error downloading Chapter: %s! Missing required element!" % url)
return utf8FromSoup(chapter)
return utf8FromSoup(chapter)

View file

@ -54,11 +54,18 @@
much easier. </p>
</div>
<!-- put announcements here, h3 is a good title size. -->
<h3>Support for Custom CSS</h3>
<h3>New Russian Language Site ficbook.net</h3>
<p>
Thanks to Ida Leter's hard work, we now support <a href="http://ficbook.net">ficbook.net</a>, a Russian language fanfiction site.
</p>
<h3>Support for Language, Custom CSS and Replacement of Metadata</h3>
<p>
There's now a 'Language' metadata field that can be filled, if the site supports different languages. Currently, it's only used
with fanfiction.net and ficbook.net.
</p>
<p>
The CSS included in the HTML and EPUB output formats is now a customizable parameter.
</p>
<h3>Support for Custom Replacement of Metadata</h3>
<p>
There's now a customizable parameter to include a list of regular expressions to replace metadata as you see fit.
</p>
@ -240,9 +247,16 @@
<br /><a href="http://archiveofourown.org/works/76366/chapters/101584">http://archiveofourown.org/works/76366/chapters/101584</a>.
</dd>
</dl>
A few additional things to know, which will make your life substantially easier:
<dt>ficbook.net(Russian)</dt>
<dd>
Use the URL of the story, or one of it's chapters, such as
<br /><a href="http://ficbook.net/readfic/93626">http://ficbook.net/readfic/93626</a>.
<br /><a href="http://ficbook.net/readfic/93626/246417#part_content">http://ficbook.net/readfic/93626/246417#part_content</a>.
</dd>
</dl>
<p>
A few additional things to know, which will make your life substantially easier:
</p>
<ol>
<li>
First thing to know: I do not use your Google login and password. In fact, all I know about it is your ID &ndash; password