ncisfiction.com -> ncisfiction.net

This commit is contained in:
Jim Miller 2012-10-28 12:22:10 -05:00
parent 10423af8ff
commit 5ca8ef00f0
4 changed files with 28 additions and 8 deletions

View file

@ -1043,7 +1043,7 @@ extracategories:Queer as Folk
## cover image. This lets you exclude them.
cover_exclusion_regexp:/stories/999/images/.*?_trophy.png
[www.ncisfiction.com]
[www.ncisfiction.net]
## Site dedicated to these categories/characters/ships
extracategories:NCIS
@ -1238,4 +1238,3 @@ extracategories:Stargate: Atlantis
## extratags params in all other sections. Only commandline options
## beat overrides.
#extratags:fanficdownloader

View file

@ -75,7 +75,7 @@ import adapter_storiesofardacom
import adapter_yourfanfictioncom
import adapter_samdeanarchivenu
import adapter_destinysgatewaycom
import adapter_ncisfictioncom
import adapter_ncisfictionnet
import adapter_stargateatlantisorg
import adapter_thealphagatecom
import adapter_fanfiktionde

View file

@ -28,15 +28,20 @@ from .. import exceptions as exceptions
from base_adapter import BaseSiteAdapter, makeDate
def getClass():
return NCISFictionComAdapter
return NCISFictionNetAdapter
# Class name has to be unique. Our convention is camel case the
# sitename with Adapter at the end. www is skipped.
class NCISFictionComAdapter(BaseSiteAdapter):
class NCISFictionNetAdapter(BaseSiteAdapter):
def __init__(self, config, url):
BaseSiteAdapter.__init__(self, config, url)
# ncisfiction.net blocks IPs the default user-agent. However,
# when asked, they said it was just general anti-spam, not
# targeted at us. That lets me do this in good conscience:
self.opener.addheaders = [('User-agent', 'FFDL/1.6')]
self.decode = ["iso-8859-1",
"Windows-1252"] # 1252 is a superset of iso-8859-1.
# Most sites that claim to be
@ -64,13 +69,21 @@ class NCISFictionComAdapter(BaseSiteAdapter):
@staticmethod # must be @staticmethod, don't remove it.
def getSiteDomain():
# The site domain. Does have www here, if it uses it.
return 'www.ncisfiction.com'
return 'www.ncisfiction.net'
## Changed from www.ncisfiction.com to www.ncisfiction.net Oct
## 2012 due to the ncisfiction.com domain expiring. Still accept
## .com domains for existing updates, etc.
@classmethod
def getAcceptDomains(cls):
return ['www.ncisfiction.net','www.ncisfiction.com']
def getSiteExampleURLs(self):
return "http://"+self.getSiteDomain()+"/story.php?stid=01234 http://"+self.getSiteDomain()+"/chapters.php?stid=1234"
def getSiteURLPattern(self):
return "http://"+self.getSiteDomain()+r'/(chapters|story)?.php\?stid=\d+'
return r'http://www\.ncisfiction\.(net|com)/(chapters|story)?.php\?stid=\d+'
## Getting the chapter list and the meta data, plus 'is adult' checking.

View file

@ -659,6 +659,10 @@ extracharacters:Hermione Granger
## Site dedicated to these categories/characters/ships
extracategories:Highlander
[indeath.net]
## Site dedicated to these categories/characters/ships
extracategories:In Death
[ksarchive.com]
## Site dedicated to these categories/characters/ships
extracategories:Star Trek
@ -999,6 +1003,10 @@ extraships:InuYasha/Kagome
## personal.ini, not defaults.ini.
#is_adult:true
[www.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
@ -1023,7 +1031,7 @@ extracategories:Queer as Folk
## cover image. This lets you exclude them.
cover_exclusion_regexp:/stories/999/images/.*?_trophy.png
[www.ncisfiction.com]
[www.ncisfiction.net]
## Site dedicated to these categories/characters/ships
extracategories:NCIS