summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/ZippyshareCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-14 11:07:54 +0100
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-14 11:07:54 +0100
commite65d19ee3a1e435bf2896ed829e5581eeef92dd2 (patch)
treecf5bb073899205a2f00ddeca8df8b9f3944ea835 /module/plugins/hoster/ZippyshareCom.py
parent[HotFolder] Missing exception (diff)
downloadpyload-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.py8
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