From 8c621d6a59136f28ca69ae26c80d423c3a0671da Mon Sep 17 00:00:00 2001 From: sigizmund Date: Thu, 17 Dec 2009 13:44:07 +0000 Subject: [PATCH] Small bug in ff.net parsing was fixed --- ffnet.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ffnet.py b/ffnet.py index bc2f7a2e..faf7b334 100644 --- a/ffnet.py +++ b/ffnet.py @@ -32,7 +32,13 @@ class FFNet: self.host = parsedUrl.netloc self.path = parsedUrl.path - (empty, s, self.storyId, chapter) = self.path.split('/') + if self.path.startswith('/'): + self.path = self.path[1:] + + if self.path.endswith('/'): + self.path = self.path[:-1] + + (s, self.storyId, chapter) = self.path.split('/') logging.debug('self.storyId=%s, chapter=%s' % (self.storyId, chapter))