From 4b0d5f395a84e703c7d1945e3fe76e0cac7a3979 Mon Sep 17 00:00:00 2001 From: zoidberg10 Date: Mon, 30 Apr 2012 00:12:49 +0200 Subject: update stahnu.to, turbobit.net - closed #594 --- module/plugins/hoster/RapidgatorNet.py | 4 ++-- module/plugins/hoster/ShareonlineBiz.py | 4 ++-- module/plugins/hoster/StahnuTo.py | 27 +++++++++++++++------------ module/plugins/hoster/TurbobitNet.py | 4 ++-- 4 files changed, 21 insertions(+), 18 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py index e4424809c..8a6ab6150 100644 --- a/module/plugins/hoster/RapidgatorNet.py +++ b/module/plugins/hoster/RapidgatorNet.py @@ -27,7 +27,7 @@ class RapidgatorNet(SimpleHoster): __name__ = "RapidgatorNet" __type__ = "hoster" __pattern__ = r"http://(?:www\.)?(rapidgator.net)/file/(\d+)" - __version__ = "0.02" + __version__ = "0.03" __description__ = """rapidgator.net""" __author_name__ = ("zoidberg") @@ -39,7 +39,7 @@ class RapidgatorNet(SimpleHoster): RECAPTCHA_KEY_PATTERN = r'"http://api.recaptcha.net/challenge?k=(.*?)"' def handleFree(self): - if "You can download files up to 500 MB in free mode": + if "You can download files up to 500 MB in free mode" in self.html: self.fail("File too large for free download") self.checkWait() diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index cb624e7a2..8517d441d 100644 --- a/module/plugins/hoster/ShareonlineBiz.py +++ b/module/plugins/hoster/ShareonlineBiz.py @@ -43,7 +43,7 @@ class ShareonlineBiz(Hoster): __name__ = "ShareonlineBiz" __type__ = "hoster" __pattern__ = r"http://[\w\.]*?(share\-online\.biz|egoshare\.com)/(download.php\?id\=|dl/)[\w]+" - __version__ = "0.27" + __version__ = "0.28" __description__ = """Shareonline.biz Download Hoster""" __author_name__ = ("spoob", "mkaay", "zoidberg") __author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de", "zoidberg@mujmail.cz") @@ -129,7 +129,7 @@ class ShareonlineBiz(Hoster): self.download(download_url) def handleAPIPremium(self): #should be working better - self.account.getAccountInfo(self.user) + self.account.getAccountInfo(self.user, True) src = self.load("http://api.share-online.biz/account.php?username=%s&password=%s&act=download&lid=%s" % (self.user, self.account.accounts[self.user]["password"], self.file_id), post={}) self.api_data = dlinfo = {} for line in src.splitlines(): diff --git a/module/plugins/hoster/StahnuTo.py b/module/plugins/hoster/StahnuTo.py index a78615dba..354a99b1a 100644 --- a/module/plugins/hoster/StahnuTo.py +++ b/module/plugins/hoster/StahnuTo.py @@ -32,29 +32,32 @@ def getInfo(urls): class StahnuTo(SimpleHoster): __name__ = "StahnuTo" __type__ = "hoster" - __pattern__ = r"http://(\w*\.)?stahnu.to/(files/get/|.*\?file=)([^/]+).*" - __version__ = "0.12" + __pattern__ = r"http://(?:\w*\.)?stahnu.to/(?:files/get/|.*\?file=)(?P[^/]+).*" + __version__ = "0.14" __description__ = """stahnu.to""" __author_name__ = ("zoidberg") - FILE_NAME_PATTERN = r"

(?[^<]+)

" - FILE_SIZE_PATTERN = r'Velikost souboru
(?[^<]+)\s*(?[kKMG])i?[Bb]' + FILE_NAME_PATTERN = r"Název souboru
(?P[^<]+)" + FILE_SIZE_PATTERN = r'Velikost souboru
(?P[^<]+)\s*(?P[kKMG])i?[Bb]' FILE_OFFLINE_PATTERN = r'\s*' - #FILE_OFFLINE_PATTERN = r'

Tento soubor neexistuje nebo byl odstraněn!

' - CAPTCHA_PATTERN = r'' def setup(self): self.multiDL = True def process(self, pyfile): + if not self.account: + self.fail("Please enter your stahnu.to account") + found = re.search(self.__pattern__, pyfile.url) - file_id = found.group(3) + file_id = found.group(1) - self.html = self.load("http://stahnu.to/?file=" + file_id, decode=True) + self.html = self.load("http://www.stahnu.to/getfile.php?file=%s" % file_id, decode=True) self.getFileInfo() + + if "K stažení souboru se musíte zdarma přihlásit!" in self.html: + self.account.relogin(self.user) + self.retry() - self.download("http://stahnu.to/files/gen/" + file_id, post={ - "file": file_id, - "user": "Anonym", - "commenttext": "" + self.download("http://www.stahnu.to/files/gen/" + file_id, post={ + "downloadbutton": u"STÁHNOUT" }) diff --git a/module/plugins/hoster/TurbobitNet.py b/module/plugins/hoster/TurbobitNet.py index 95fcae7f2..f4626f49a 100644 --- a/module/plugins/hoster/TurbobitNet.py +++ b/module/plugins/hoster/TurbobitNet.py @@ -27,7 +27,7 @@ class TurbobitNet(SimpleHoster): __name__ = "TurbobitNet" __type__ = "hoster" __pattern__ = r"http://(?:\w*\.)?turbobit.net/(?:download/free/)?(?P\w+).*" - __version__ = "0.03" + __version__ = "0.04" __description__ = """Turbobit.net plugin""" __author_name__ = ("zoidberg") __author_mail__ = ("zoidberg@mujmail.cz") @@ -40,7 +40,7 @@ class TurbobitNet(SimpleHoster): CAPTCHA_KEY_PATTERN = r'src="http://api\.recaptcha\.net/challenge\?k=([^"]+)"' DOWNLOAD_URL_PATTERN = r'(?P/download/redirect/[^"\']+)' - LIMIT_WAIT_PATTERN = r'
\s*.*?(\d+) seconds' + LIMIT_WAIT_PATTERN = r'
\s*.*?(\d+)' CAPTCHA_SRC_PATTERN = r'