diff options
Diffstat (limited to 'module/plugins/hoster/LoadTo.py')
-rw-r--r-- | module/plugins/hoster/LoadTo.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py index 82966acb7..66bc6f407 100644 --- a/module/plugins/hoster/LoadTo.py +++ b/module/plugins/hoster/LoadTo.py @@ -42,14 +42,14 @@ def getInfo(urls): class LoadTo(Hoster): __name__ = "LoadTo" __type__ = "hoster" - __pattern__ = "http://(.*\.)*load.to/.*" - __version__ = "0.1001" + __pattern__ = r"http://(www.*?\.)?load\.to/.{7,10}?/.*" + __version__ = "0.1002" __description__ = """load.to""" __author_name__ = ("halfman") __author_mail__ = ("Pulpan3@gmail.com") - FILE_NAME_PATTERN = r'<div class="toolarge"><h1>([^<]+)</h1></div>' - URL_PATTERN = r'<form method="post" action="([^"]+)"' + FILE_NAME_PATTERN = r'<div class="toolarge"><h1>(.+?)</h1></div>' + URL_PATTERN = r'<form method="post" action="(.+?)"' SIZE_PATTERN = r'<div class="download_table_right">(\d+) Bytes</div>' FILE_OFFLINE_PATTERN = r'Can\'t find file. Please check URL.<br />' WAIT_PATTERN = r'type="submit" value="Download \((\d+)\)"' @@ -64,11 +64,6 @@ class LoadTo(Hoster): if re.search(self.FILE_OFFLINE_PATTERN, self.html): self.offline() - timmy = re.search(self.WAIT_PATTERN, self.html) - if timmy: - self.setWait(timmy.group(1)) - self.wait() - found = re.search(self.FILE_NAME_PATTERN, self.html) if found is None: self.fail("Parse error (NAME)") @@ -78,5 +73,10 @@ class LoadTo(Hoster): if found is None: self.fail("Parse error (URL)") download_url = found.group(1) + + timmy = re.search(self.WAIT_PATTERN, self.html) + if timmy: + self.setWait(timmy.group(1)) + self.wait() self.download(download_url) |