diff --git a/fanficdownloader/adapters/adapter_thehexfilesnet.py b/fanficdownloader/adapters/adapter_thehexfilesnet.py index 2012368..ad74ce3 100644 --- a/fanficdownloader/adapters/adapter_thehexfilesnet.py +++ b/fanficdownloader/adapters/adapter_thehexfilesnet.py @@ -69,13 +69,15 @@ class TheHexFilesNetAdapter(BaseSiteAdapter): # The site domain. Does have www here, if it uses it. return 'thehexfiles.net' + @classmethod + def getAcceptDomains(cls): + return ['www.thehexfiles.net','thehexfiles.net'] + def getSiteExampleURLs(self): return "http://"+self.getSiteDomain()+"/viewstory.php?sid=1234" def getSiteURLPattern(self): - return re.escape("http://"+self.getSiteDomain()+"/viewstory.php?sid=")+r"\d+$" - - + return re.escape("http://")+"(www\.)?"+re.escape(self.getSiteDomain()+"/viewstory.php?sid=")+r"\d+$" ## Getting the chapter list and the meta data, plus 'is adult' checking. def extractChapterUrlsAndMetadata(self): @@ -196,4 +198,4 @@ class TheHexFilesNetAdapter(BaseSiteAdapter): if None == soup: raise exceptions.FailedToDownload("Error downloading Chapter: %s! Missing required element!" % url) - return self.utf8FromSoup(url,soup) \ No newline at end of file + return self.utf8FromSoup(url,soup)