summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/YourfilesTo.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster/YourfilesTo.py')
-rw-r--r--module/plugins/hoster/YourfilesTo.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py
index 4a192b32a..8c0784205 100644
--- a/module/plugins/hoster/YourfilesTo.py
+++ b/module/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
-
-
-