summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster/YourfilesTo.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 21:20:06 +0200
commitaaaf5a4cddec894aacd7400c59a9f2f5e710362f (patch)
tree9d9e89aff86598b3ffcc86117abd554b193e28b5 /pyload/plugins/hoster/YourfilesTo.py
parentimplemented media type filter (diff)
downloadpyload-aaaf5a4cddec894aacd7400c59a9f2f5e710362f.tar.xz
Fixed PEP 8 violations in Hosters
(cherry picked from commit 2edeee0532ec6d6b4b26fd045a5971f67ca455da) Conflicts: pyload/plugins/hoster/BasePlugin.py pyload/plugins/hoster/MultishareCz.py pyload/plugins/hoster/NetloadIn.py pyload/plugins/hoster/PremiumizeMe.py pyload/plugins/hoster/RapidshareCom.py
Diffstat (limited to 'pyload/plugins/hoster/YourfilesTo.py')
-rw-r--r--pyload/plugins/hoster/YourfilesTo.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/pyload/plugins/hoster/YourfilesTo.py b/pyload/plugins/hoster/YourfilesTo.py
index 4a192b32a..8c0784205 100644
--- a/pyload/plugins/hoster/YourfilesTo.py
+++ b/pyload/plugins/hoster/YourfilesTo.py
@@ -5,6 +5,7 @@ import re
import urllib
from module.plugins.Hoster import Hoster
+
class YourfilesTo(Hoster):
__name__ = "YourfilesTo"
__type__ = "hoster"
@@ -18,35 +19,35 @@ class YourfilesTo(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 = self.pyfile.url
self.html = self.load(url)
@@ -61,7 +62,7 @@ class YourfilesTo(Hoster):
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()
@@ -73,11 +74,8 @@ class YourfilesTo(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
-
-
-