summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/ShareplaceCom.py
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-07-22 20:50:34 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-07-22 20:50:34 +0200
commit2edeee0532ec6d6b4b26fd045a5971f67ca455da (patch)
tree8d656afc9c18f7dba7c05d6635f898fdf58d66d6 /module/plugins/hoster/ShareplaceCom.py
parentFixed PEP 8 violations in Crypters (diff)
downloadpyload-2edeee0532ec6d6b4b26fd045a5971f67ca455da.tar.xz
Fixed PEP 8 violations in Hosters
Diffstat (limited to 'module/plugins/hoster/ShareplaceCom.py')
-rw-r--r--module/plugins/hoster/ShareplaceCom.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/module/plugins/hoster/ShareplaceCom.py b/module/plugins/hoster/ShareplaceCom.py
index c55f6703a..5f23f9708 100644
--- a/module/plugins/hoster/ShareplaceCom.py
+++ b/module/plugins/hoster/ShareplaceCom.py
@@ -5,6 +5,7 @@ import re
import urllib
from module.plugins.Hoster import Hoster
+
class ShareplaceCom(Hoster):
__name__ = "ShareplaceCom"
__type__ = "hoster"
@@ -18,35 +19,35 @@ class ShareplaceCom(Hoster):
self.html = None
self.multiDL = True
- def process(self,pyfile):
+ def process(self, pyfile):
self.pyfile = pyfile
self.prepare()
self.download(self.get_file_url())
-
+
def prepare(self):
if not self.file_exists():
self.offline()
self.pyfile.name = self.get_file_name()
-
+
wait_time = self.get_waiting_time()
self.setWait(wait_time)
- self.logDebug("%s: Waiting %d seconds." % (self.__name__,wait_time))
+ self.logDebug("%s: Waiting %d seconds." % (self.__name__, wait_time))
self.wait()
def get_waiting_time(self):
if self.html is None:
self.download_html()
-
+
#var zzipitime = 15;
m = re.search(r'var zzipitime = (\d+);', self.html)
if m:
sec = int(m.group(1))
else:
sec = 0
-
+
return sec
-
+
def download_html(self):
url = re.sub("shareplace.com\/\?", "shareplace.com//index1.php/?a=", self.pyfile.url)
self.html = self.load(url, decode=True)
@@ -57,12 +58,14 @@ class ShareplaceCom(Hoster):
url = re.search(r"var beer = '(.*?)';", self.html)
if url:
url = url.group(1)
- url = urllib.unquote(url.replace("http://http:/", "").replace("vvvvvvvvv", "").replace("lllllllll", "").replace("teletubbies", ""))
+ url = urllib.unquote(
+ url.replace("http://http:/", "").replace("vvvvvvvvv", "").replace("lllllllll", "").replace(
+ "teletubbies", ""))
self.logDebug("URL: %s" % url)
return url
else:
self.fail("absolute filepath could not be found. offline? ")
-
+
def get_file_name(self):
if self.html is None:
self.download_html()
@@ -74,11 +77,8 @@ class ShareplaceCom(Hoster):
"""
if self.html is None:
self.download_html()
-
+
if re.search(r"HTTP Status 404", self.html) is not None:
return False
else:
return True
-
-
-