diff options
-rw-r--r-- | module/plugins/Plugin.py | 5 | ||||
-rw-r--r-- | module/plugins/hoster/ShragleCom.py | 2 | ||||
-rw-r--r-- | module/plugins/hoster/Xdcc.py | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py index 8d9d8b35d..488d05432 100644 --- a/module/plugins/Plugin.py +++ b/module/plugins/Plugin.py @@ -27,6 +27,7 @@ from os import remove from os import makedirs from os import chmod from os import stat +from os import name as os_name from os.path import exists from os.path import join @@ -348,6 +349,10 @@ class Plugin(object): self.log.warning(_("Setting User and Group failed: %s") % str(e)) name = self.pyfile.name + if os_name == 'nt': + #delete illegal characters + name = name.translate(None, '/\\?%*:|"<>') + filename = save_join(location, name) try: newname = self.req.httpDownload(url, filename, get=get, post=post, ref=ref, chunks=self.getChunkCount(), resume=self.resumeDownload, progressNotify=self.pyfile.progress.setValue) diff --git a/module/plugins/hoster/ShragleCom.py b/module/plugins/hoster/ShragleCom.py index f45c94e96..c1cef9f3e 100644 --- a/module/plugins/hoster/ShragleCom.py +++ b/module/plugins/hoster/ShragleCom.py @@ -58,7 +58,7 @@ class ShragleCom(Hoster): if self.html is None: self.download_html() - file_name_pattern = r"<\/div><h2>(.+)<\/h2" + file_name_pattern = r'You want to download \xc2\xbb<strong>(.*?)</strong>\xc2\xab' return re.search(file_name_pattern, self.html).group(1) def file_exists(self): diff --git a/module/plugins/hoster/Xdcc.py b/module/plugins/hoster/Xdcc.py index 5dc1aafb8..7c81ccbe0 100644 --- a/module/plugins/hoster/Xdcc.py +++ b/module/plugins/hoster/Xdcc.py @@ -58,7 +58,8 @@ class Xdcc(Hoster): self.pyfile = pyfile
for i in range(0,3):
try:
- self.doDownload(pyfile.url)
+ nmn = self.doDownload(pyfile.url)
+ self.log.debug("%s: Download of %s finished." % (self.__name__, nmn))
return
except socket.error, e:
if hasattr(e, "errno"):
|