summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/LoadTo.py
diff options
context:
space:
mode:
authorGravatar Jeix <devnull@localhost> 2012-04-16 14:40:31 +0200
committerGravatar Jeix <devnull@localhost> 2012-04-16 14:40:31 +0200
commit8390d009b6fb338d900e1f6f205ad8e08fce9670 (patch)
tree551df2c98a042e16b2d4a9b4af603c85b994b461 /module/plugins/hoster/LoadTo.py
parentNetloadin Login Cookie fix (diff)
downloadpyload-8390d009b6fb338d900e1f6f205ad8e08fce9670.tar.xz
closed #579
Diffstat (limited to 'module/plugins/hoster/LoadTo.py')
-rw-r--r--module/plugins/hoster/LoadTo.py18
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)