From dbec6c95b2ae5bdd31b22f55bb41508d59a21a52 Mon Sep 17 00:00:00 2001 From: wsuetholz Date: Fri, 12 Nov 2010 21:51:46 -0600 Subject: [PATCH] Changed to deal with somebody putting in the mobile url for fanfiction.net... ie will get changed to --- ffnet.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ffnet.py b/ffnet.py index d0eff9e..7a201e2 100644 --- a/ffnet.py +++ b/ffnet.py @@ -86,7 +86,13 @@ class FFNet(FanfictionSiteAdapter): logging.debug('self.path=%s' % self.path) - logging.debug('self.storyId=%s, chapter=%s' % (self.storyId, chapter)) + if self.host is not None and self.host == "m.fanfiction.net": + self.host = "www.fanfiction.net" + logging.debug('self.host=%s' % self.host) + self.url = "http://" + self.host + "/" + self.path + logging.debug('self.url=%s' % self.url) + + logging.debug('self.storyId=%s' % self.storyId) if not self.appEngine: self.opener = u2.build_opener(u2.HTTPCookieProcessor()) else: