diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-14 11:07:54 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-03-14 11:07:54 +0100 |
commit | e65d19ee3a1e435bf2896ed829e5581eeef92dd2 (patch) | |
tree | cf5bb073899205a2f00ddeca8df8b9f3944ea835 /module/plugins/hoster/ZippyshareCom.py | |
parent | [HotFolder] Missing exception (diff) | |
download | pyload-e65d19ee3a1e435bf2896ed829e5581eeef92dd2.tar.xz |
Import cleanup for datetime and time modules
Diffstat (limited to 'module/plugins/hoster/ZippyshareCom.py')
-rw-r--r-- | module/plugins/hoster/ZippyshareCom.py | 8 |
1 files changed, 4 insertions, 4 deletions
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 |