From 8cf6f210e6b9a894c837dec96ff9644839cc710e Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Sun, 15 Jun 2014 20:30:35 -0500 Subject: [PATCH] Change to with/without www. code to work with https also. --- fanficdownloader/adapters/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fanficdownloader/adapters/__init__.py b/fanficdownloader/adapters/__init__.py index fd0a80f8..10456af4 100644 --- a/fanficdownloader/adapters/__init__.py +++ b/fanficdownloader/adapters/__init__.py @@ -223,11 +223,11 @@ def getClassFor(url): domain = domain.replace("www.","") #logger.debug("trying site:without www: "+domain) cls = getClassFromList(domain) - fixedurl = fixedurl.replace("http://www.","http://") + fixedurl = re.sub(r"^http(s?)://www\.",r"http\1://",fixedurl) if not cls: #logger.debug("trying site:www."+domain) cls = getClassFromList("www."+domain) - fixedurl = fixedurl.replace("http://","http://www.") + fixedurl = re.sub(r"^http(s?)://",r"http\1://www.",fixedurl) if cls: fixedurl = cls.stripURLParameters(fixedurl)