summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-09 21:56:55 +0100
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-09 21:56:55 +0100
commitcb03eda650527a868ef99afde981aa065dfc51ce (patch)
tree13adf09ab3472b1580985fe5851f8cd7990067f6
parentRename fileUrl to getFileURL (diff)
parent[ZippyShare] Bug #1238 correction (diff)
downloadpyload-cb03eda650527a868ef99afde981aa065dfc51ce.tar.xz
Merge pull request #1239 from sebdelsol/patch-3
[ZippyShare] Bug #1238 correction
-rw-r--r--module/plugins/hoster/ZippyshareCom.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py
index 9d7c6949f..f2c99de7b 100644
--- a/module/plugins/hoster/ZippyshareCom.py
+++ b/module/plugins/hoster/ZippyshareCom.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class ZippyshareCom(SimpleHoster):
__name__ = "ZippyshareCom"
__type__ = "hoster"
- __version__ = "0.74"
+ __version__ = "0.75"
__pattern__ = r'http://www\d{0,2}\.zippyshare\.com/v(/|iew\.jsp.*key=)(?P<KEY>[\w^_]+)'
@@ -64,7 +64,7 @@ class ZippyshareCom(SimpleHoster):
id = element.group(1)
attr = element.group(4) #: attr might be None
- varName = '%s_%s' % (id, attr)
+ varName = '%s_%s' % (re.sub(r'\W', '', id), attr)
initValues = filter(None, [elt.get(attr, None) for elt in soup.findAll(id=id)])
initValue = '"%s"' % initValues[-1] if initValues else 'null'
@@ -72,7 +72,7 @@ class ZippyshareCom(SimpleHoster):
return varName
# handle all getElementById
- reVar = r'document.getElementById\([\'"](\w+)[\'"]\)(\.)?(getAttribute\([\'"])?(\w+)?([\'"]\))?'
+ reVar = r'document.getElementById\([\'"](.+)[\'"]\)(\.)?(getAttribute\([\'"])?(\w+)?([\'"]\))?'
scripts = [re.sub(reVar, replElementById, script) for script in scripts]
# add try/catch in JS to handle deliberate errors