diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-09-07 23:40:50 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-09-14 10:58:42 +0200 |
commit | 887ad58e4c6c20b992311bbdf931bcd18e73d384 (patch) | |
tree | f31beb241bacca0bfea4c1acc4e9ace813755cef /module/plugins/hoster/ShareplaceCom.py | |
parent | [AccountManager] Fixed #733 (diff) | |
parent | [File4safe] distributing LINK_PATTERN (diff) | |
download | pyload-887ad58e4c6c20b992311bbdf931bcd18e73d384.tar.xz |
Merge branch 'stable' into 0.4.10
Conflicts:
module/plugins/Account.py
module/plugins/AccountManager.py
module/plugins/Hook.py
module/plugins/OCR.py
module/plugins/Plugin.py
module/plugins/PluginManager.py
module/plugins/ReCaptcha.py
module/plugins/accounts/Ftp.py
module/plugins/accounts/Http.py
module/plugins/internal/MultiHoster.py
module/plugins/ocr/GigasizeCom.py
module/plugins/ocr/LinksaveIn.py
module/plugins/ocr/NetloadIn.py
module/plugins/ocr/ShareonlineBiz.py
Diffstat (limited to 'module/plugins/hoster/ShareplaceCom.py')
-rw-r--r-- | module/plugins/hoster/ShareplaceCom.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/module/plugins/hoster/ShareplaceCom.py b/module/plugins/hoster/ShareplaceCom.py index ba1b40fb7..0d236fe30 100644 --- a/module/plugins/hoster/ShareplaceCom.py +++ b/module/plugins/hoster/ShareplaceCom.py @@ -1,18 +1,23 @@ # -*- coding: utf-8 -*- import re -import urllib + +from urllib import unquote + from module.plugins.Hoster import Hoster class ShareplaceCom(Hoster): __name__ = "ShareplaceCom" __type__ = "hoster" - __pattern__ = r'(http://)?(?:www\.)?shareplace\.(com|org)/\?[a-zA-Z0-9]+' __version__ = "0.11" + + __pattern__ = r'(http://)?(?:www\.)?shareplace\.(com|org)/\?[a-zA-Z0-9]+' + __description__ = """Shareplace.com hoster plugin""" __author_name__ = "ACCakut" - __author_mail__ = "" + __author_mail__ = None + def process(self, pyfile): self.pyfile = pyfile @@ -31,7 +36,7 @@ class ShareplaceCom(Hoster): self.wait() def get_waiting_time(self): - if self.html is None: + if not self.html: self.download_html() #var zzipitime = 15; @@ -53,7 +58,7 @@ class ShareplaceCom(Hoster): url = re.search(r"var beer = '(.*?)';", self.html) if url: url = url.group(1) - url = urllib.unquote( + url = unquote( url.replace("http://http:/", "").replace("vvvvvvvvv", "").replace("lllllllll", "").replace( "teletubbies", "")) self.logDebug("URL: %s" % url) @@ -62,7 +67,7 @@ class ShareplaceCom(Hoster): self.fail("absolute filepath could not be found. offline? ") def get_file_name(self): - if self.html is None: + if not self.html: self.download_html() return re.search("<title>\s*(.*?)\s*</title>", self.html).group(1) @@ -70,7 +75,7 @@ class ShareplaceCom(Hoster): def file_exists(self): """ returns True or False """ - if self.html is None: + if not self.html: self.download_html() if re.search(r"HTTP Status 404", self.html) is not None: |