diff options
Diffstat (limited to 'module/plugins/hoster/ShareonlineBiz.py')
-rw-r--r-- | module/plugins/hoster/ShareonlineBiz.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py index cb624e7a2..719235565 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.29" __description__ = """Shareonline.biz Download Hoster""" __author_name__ = ("spoob", "mkaay", "zoidberg") __author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de", "zoidberg@mujmail.cz") @@ -73,6 +73,10 @@ class ShareonlineBiz(Hoster): if self.premium: self.account.getAccountInfo(self.user, True) self.retry(reason=_("Invalid download ticket")) + + self.logDebug('DOWNLOAD SIZE: %d B (%d expected)' % (self.pyfile.size , self.exp_size)) + if self.pyfile.size != self.exp_size: + self.retry(reason="Incorrect file size: %d B" % self.pyfile.size) def downloadAPIData(self): api_url_base = "http://api.share-online.biz/linkcheck.php?md5=1" @@ -91,7 +95,7 @@ class ShareonlineBiz(Hoster): def handleFree(self): self.downloadAPIData() self.pyfile.name = self.api_data["filename"] - self.pyfile.size = self.api_data["size"] + self.pyfile.size = self.exp_size = int(self.api_data["size"]) self.html = self.load(self.pyfile.url, cookies = True) #refer, stuff self.setWait(3) @@ -129,7 +133,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(): @@ -141,7 +145,7 @@ class ShareonlineBiz(Hoster): self.offline() self.pyfile.name = dlinfo["name"] - self.pyfile.size = dlinfo["size"] + self.pyfile.size = self.exp_size = int(dlinfo["size"]) dlLink = dlinfo["url"] if dlLink == "server_under_maintenance": |