diff --git a/defaults.ini b/defaults.ini index 9e0db4dc..10e490a2 100644 --- a/defaults.ini +++ b/defaults.ini @@ -164,8 +164,8 @@ extratags: FanFiction ## Two, three or five part lines. Two part effect everything. ## Three part effect only those key(s) lists. ## *Five* part lines. Effect only when trailing conditional key=>regexp matches -## metakey[,metakey]=>pattern=>replacement[&&conditionalkey=>regexp] -## Note that if metakey == conditionalkey the conditional is ignored. +## metakey[,metakey]=>pattern=>replacement[&&conditionalkey=>regexp] +## Note that if metakey == conditionalkey the conditional is ignored. #replace_metadata: # genre,category=>Sci-Fi=>SF # Puella Magi Madoka Magica.* => Madoka @@ -672,10 +672,6 @@ extracategories:Highlander ## Site dedicated to these categories/characters/ships extracategories:In Death -[jlaunlimited.com] -## Site dedicated to these categories/characters/ships -extracategories:JLA - [ksarchive.com] ## Site dedicated to these categories/characters/ships extracategories:Star Trek @@ -959,15 +955,15 @@ extra_valid_entries:reviews,favs,follows [www.fimfiction.net] ## Site dedicated to these categories/characters/ships extracategories:My Little Pony: Friendship is Magic - -## Extra metadata that this adapter knows about. See [dramione.org] -## for examples of how to use them. -extra_valid_entries:likes,dislikes,views,total_views,short_description -likes_label:Likes -dislikes_label:Dislikes -views_label:Highest Single Chapter Views -total_views_label:Total Views -short_description_label:Short Summary + +## Extra metadata that this adapter knows about. See [dramione.org] +## for examples of how to use them. +extra_valid_entries:likes,dislikes,views,total_views,short_description +likes_label:Likes +dislikes_label:Dislikes +views_label:Highest Single Chapter Views +total_views_label:Total Views +short_description_label:Short Summary ## Some sites do not require a login, but do require the user to ## confirm they are adult for adult content. In commandline version, @@ -1019,6 +1015,10 @@ extraships:InuYasha/Kagome ## personal.ini, not defaults.ini. #is_adult:true +[jlaunlimited.com] +## Site dedicated to these categories/characters/ships +extracategories:JLA + [www.libraryofmoria.com] ## Site dedicated to these categories/characters/ships extracategories:Lord of the Rings @@ -1238,3 +1238,4 @@ extracategories:Stargate: Atlantis ## extratags params in all other sections. Only commandline options ## beat overrides. #extratags:fanficdownloader + diff --git a/fanficdownloader/adapters/adapter_indeathnet.py b/fanficdownloader/adapters/adapter_indeathnet.py index b1281499..808314ec 100644 --- a/fanficdownloader/adapters/adapter_indeathnet.py +++ b/fanficdownloader/adapters/adapter_indeathnet.py @@ -16,7 +16,7 @@ # import time -import logging +import logging logger = logging.getLogger(__name__) import re import urllib2 @@ -176,3 +176,4 @@ class InDeathNetAdapter(BaseSiteAdapter): raise exceptions.FailedToDownload("Error downloading Chapter: %s! Missing required element!" % url) return self.utf8FromSoup(url,chapter) + diff --git a/fanficdownloader/adapters/adapter_jlaunlimitedcom.py b/fanficdownloader/adapters/adapter_jlaunlimitedcom.py index ccba6c8e..ded95dc1 100644 --- a/fanficdownloader/adapters/adapter_jlaunlimitedcom.py +++ b/fanficdownloader/adapters/adapter_jlaunlimitedcom.py @@ -16,7 +16,7 @@ # import time -import logging +import logging logger = logging.getLogger(__name__) import re import urllib2 @@ -97,7 +97,7 @@ class JLAUnlimitedComAdapter(BaseSiteAdapter): raise exceptions.StoryDoesNotExist(self.url) else: raise e - + # Assume that if there is a url with 'warning=#' in the page then it is a 'check' page m = re.search(r"'viewstory.php\?sid=\d+((?:&ageconsent=ok)?&warning=\d+)",data) if m != None: @@ -119,7 +119,7 @@ class JLAUnlimitedComAdapter(BaseSiteAdapter): else: raise e else: - raise exceptions.AdultCheckRequired(self.url) + raise exceptions.AdultCheckRequired(self.url) # use BeautifulSoup HTML parser to make everything easier to find. soup = bs.BeautifulSoup(data) @@ -256,3 +256,4 @@ class JLAUnlimitedComAdapter(BaseSiteAdapter): raise exceptions.FailedToDownload("Error downloading Chapter: %s! Missing required element!" % url) return self.utf8FromSoup(url,div) +