mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-06 08:52:55 +01:00
whoficcom only - viewstory.php url can appear descs, look for reviews.php.
This commit is contained in:
parent
141ed90d74
commit
a3402170ad
2 changed files with 7 additions and 5 deletions
|
|
@ -112,11 +112,13 @@ class WhoficComSiteAdapter(BaseSiteAdapter):
|
|||
logging.debug("Author URL: "+self.story.getMetadata('authorUrl'))
|
||||
soup = bs.BeautifulStoneSoup(self._fetchUrl(self.story.getMetadata('authorUrl')),
|
||||
selfClosingTags=('br')) # normalize <br> tags to <br />
|
||||
|
||||
# find this story in the list, parse it's metadata based on
|
||||
# lots of assumptions about the html, since there's little
|
||||
# tagging.
|
||||
a = soup.find('a', href=re.compile(r'viewstory.php\?sid='+self.story.getMetadata('storyId')))
|
||||
# Found a story once that had the story URL in the desc for a
|
||||
# series on the same author's page. Now using the reviews
|
||||
# link instead to find the appropriate metadata.
|
||||
a = soup.find('a', href=re.compile(r'reviews.php\?sid='+self.story.getMetadata('storyId')))
|
||||
metadata = a.findParent('td')
|
||||
metadatachunks = utf8FromSoup(metadata).split('<br />')
|
||||
# process metadata for this story.
|
||||
|
|
@ -156,7 +158,6 @@ class WhoficComSiteAdapter(BaseSiteAdapter):
|
|||
for g in genre.split(r', '):
|
||||
self.story.addToList('genre',g)
|
||||
|
||||
|
||||
# the next line is stuff with ' - ' separators *and* names--with tags.
|
||||
moremeta = metadatachunks[5]
|
||||
moremeta = re.sub(r'<[^>]+>','',moremeta) # strip tags.
|
||||
|
|
|
|||
|
|
@ -53,18 +53,19 @@
|
|||
<p>Hi, {{ nickname }}! This is a fan fiction downloader, which makes reading stories from various websites
|
||||
much easier. </p>
|
||||
</div>
|
||||
<!-- put announcements here, h3 is a good title size. -->
|
||||
<!-- put announcements here, h3 is a good title size.
|
||||
<p>
|
||||
<b>New Site:</b> Now supporting fimfiction.net. Many
|
||||
thanks to our latest developer, althaine, for this new
|
||||
adapter.
|
||||
</p>
|
||||
-->
|
||||
<p>
|
||||
If you have any problems with this application, please
|
||||
report them in
|
||||
the <a href="http://groups.google.com/group/fanfic-downloader">Fanfiction
|
||||
Downloader Google Group</a>. The
|
||||
<a href="http://4-0-5.fanfictionloader.appspot.com">Previous
|
||||
<a href="http://4-0-6.fanfictionloader.appspot.com">Previous
|
||||
Version</a> is also available for you to use if necessary.
|
||||
</p>
|
||||
<div id='error'>
|
||||
|
|
|
|||
Loading…
Reference in a new issue