Bump vers for AO3 adapter, category->genre in fimfic, adult check for AO3.

This commit is contained in:
Jim Miller 2012-01-30 20:35:45 -06:00
parent 1a71a43ca8
commit beae2b560f
6 changed files with 23 additions and 15 deletions

View file

@ -1,6 +1,6 @@
# ffd-retief-hrd fanfictiondownloader
application: fanfictiondownloader
version: 4-3-0
version: 4-3-1
runtime: python27
api_version: 1
threadsafe: true

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

View file

@ -83,6 +83,10 @@ class ArchiveOfOurOwnOrgAdapter(BaseSiteAdapter):
try:
data = self._fetchUrl(url)
meta = self._fetchUrl(meta)
if "This work could have adult content. If you proceed you have agreed that you are willing to see such content." in meta:
raise exceptions.AdultCheckRequired(self.url)
except urllib2.HTTPError, e:
if e.code == 404:
raise exceptions.StoryDoesNotExist(self.meta)
@ -261,4 +265,4 @@ class ArchiveOfOurOwnOrgAdapter(BaseSiteAdapter):
if None == soup:
raise exceptions.FailedToDownload("Error downloading Chapter: %s! Missing required element!" % url)
return utf8FromSoup(chapter)
return utf8FromSoup(chapter)

View file

@ -107,7 +107,7 @@ class FimFictionNetSiteAdapter(BaseSiteAdapter):
for character in [character_icon['title'] for character_icon in soup.findAll("a", {"class":"character_icon"})]:
self.story.addToList("characters", character)
for category in [category.text for category in soup.find("div", {"class":"categories"}).findAll("a")]:
self.story.addToList("category", category)
self.story.addToList("genre", category)
self.story.addToList("category", "My Little Pony")

View file

@ -25,7 +25,7 @@ class Story:
try:
self.metadata = {'version':os.environ['CURRENT_VERSION_ID']}
except:
self.metadata = {'version':'4.2'}
self.metadata = {'version':'4.3'}
self.chapters = [] # chapters will be tuples of (title,html)
self.listables = {} # some items (extratags, category, warnings & genres) are also kept as lists.

View file

@ -54,15 +54,8 @@
much easier. </p>
</div>
<!-- put announcements here, h3 is a good title size. -->
<h3>This is the Official Multithreading Version</h3>
<h3>Support for 'Series'</h3>
<p>
This version of the application uses Python 2.7 and
multithreading to try and reduce our usage. Google
considers Python 2.7 Experimental still, so there may be issues.
</p>
<p>
<b>Support for 'Series'</b>
<br /><br />
We now collect 'Series' name and number for the sites:
harrypotterfanfiction.com,
potionsandsnitches.net,
@ -75,15 +68,20 @@
twilighted.net*,
twilighted.net* and
thewriterscoffeeshop.com*.
<br /><br />
</p>
<p>
* The last three use series as reading lists and stories collections as much as true story series,
so they default to <i>not</i> collect series info. You can turn it on in your User Configuration if you want.
</p>
<h3>New Site: <a href="http://archiveofourown.org">archiveofourown.org</a></h3>
<p>
Thanks to Ida Leter for writing the code to support a new site: <a href="http://archiveofourown.org">archiveofourown.org</a>.
</p>
<p>
If you have any problems with this application, please
report them in
the <a href="http://groups.google.com/group/fanfic-downloader">FanFictionDownLoader Google Group</a>. The
<a href="http://4-2-1.fanfictiondownloader.appspot.com">Previous Version</a> is also available for you to use if necessary.
<a href="http://4-3-0.fanfictiondownloader.appspot.com">Previous Version</a> is also available for you to use if necessary.
</p>
<div id='error'>
{{ error_message }}
@ -246,6 +244,12 @@
Use the URL of the story's chapter list, such as
<br /><a href="http://www.siye.co.uk/siye/viewstory.php?sid=123">http://www.siye.co.uk/siye/viewstory.php?sid=123</a>.
</dd>
<dt>archiveofourown.org</dt>
<dd>
Use the URL of the story, or one of it's chapters, such as
<br /><a href="http://archiveofourown.org/works/76366">http://archiveofourown.org/works/76366</a>.
<br /><a href="http://archiveofourown.org/works/76366/chapters/101584">http://archiveofourown.org/works/76366/chapters/101584</a>.
</dd>
</dl>