From 1a4b272d8d4ad5c87e1c2fbc319cd465e1c9d47f Mon Sep 17 00:00:00 2001 From: mkaay Date: Wed, 18 Aug 2010 01:55:27 +0200 Subject: fixed SerienjunkiesOrg error on bad formated season pages --- module/plugins/crypter/SerienjunkiesOrg.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/module/plugins/crypter/SerienjunkiesOrg.py b/module/plugins/crypter/SerienjunkiesOrg.py index b746da6bc..6a7d976ab 100644 --- a/module/plugins/crypter/SerienjunkiesOrg.py +++ b/module/plugins/crypter/SerienjunkiesOrg.py @@ -51,12 +51,17 @@ class SerienjunkiesOrg(Crypter): opts = {"Dauer": "", "Uploader": "", "Sprache": "", "Format": "", u"Größe": ""} for v in var: n = unescape(v.string) + n = n.strip() + n = re.sub(r"^([:]?)(.*?)([:]?)$", r'\2', n) + if not opts.has_key(n.strip()): + continue val = v.nextSibling + if not val: + continue + print type(val), val val = val.encode("utf-8") val = unescape(val) val = val.replace("|", "").strip() - n = n.strip() - n = re.sub(r"^([:]?)(.*?)([:]?)$", r'\2', n) val = val.strip() val = re.sub(r"^([:]?)(.*?)([:]?)$", r'\2', val) opts[n.strip()] = val.strip() -- cgit v1.2.3