From e65d19ee3a1e435bf2896ed829e5581eeef92dd2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 14 Mar 2015 11:07:54 +0100 Subject: Import cleanup for datetime and time modules --- module/plugins/hoster/ZippyshareCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/hoster/ZippyshareCom.py') diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py index d9d1db1be..f9e112aed 100644 --- a/module/plugins/hoster/ZippyshareCom.py +++ b/module/plugins/hoster/ZippyshareCom.py @@ -63,15 +63,15 @@ class ZippyshareCom(SimpleHoster): def replElementById(element): id = element.group(1) # id might be either 'x' (a real id) or x (a variable) attr = element.group(4) # attr might be None - + varName = re.sub(r'-', '', 'GVAR[%s+"_%s"]' %(id, attr)) - + realid = id.strip('"\'') - if id != realid: #id is not a variable, so look for realid.attr in the html + if id != realid: #id is not a variable, so look for realid.attr in the html initValues = filter(None, [elt.get(attr, None) for elt in soup.findAll(id=realid)]) initValue = '"%s"' % initValues[-1] if initValues else 'null' initScripts.add('%s = %s;' % (varName, initValue)) - + return varName # handle all getElementById -- cgit v1.2.3