summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-05-30 23:27:43 +0200
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-05-30 23:27:43 +0200
commit48d0567f9ed9cf926e0b3eeb5b910812894551e6 (patch)
treeb82bdc7c2926daf02a9fe97c8666a5620f4aa425 /module/plugins/hoster
parentsimple checksum and download scheduler hooks; keep config options ordered (diff)
downloadpyload-48d0567f9ed9cf926e0b3eeb5b910812894551e6.tar.xz
Backed out changeset: 240404fc2b83
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/ShareonlineBiz.py13
-rw-r--r--module/plugins/hoster/XFileSharingPro.py13
2 files changed, 10 insertions, 16 deletions
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py
index fbec82b7e..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.30"
+ __version__ = "0.29"
__description__ = """Shareonline.biz Download Hoster"""
__author_name__ = ("spoob", "mkaay", "zoidberg")
__author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de", "zoidberg@mujmail.cz")
@@ -57,8 +57,6 @@ class ShareonlineBiz(Hoster):
self.resumeDownload = self.multiDL = self.premium
#self.chunkLimit = 1
-
- self.file_check = None
def process(self, pyfile):
if self.premium:
@@ -76,8 +74,9 @@ class ShareonlineBiz(Hoster):
self.account.getAccountInfo(self.user, True)
self.retry(reason=_("Invalid download ticket"))
- if self.api_data:
- self.file_check = {"size": int(self.api_data['size']), "md5": self.api_data['md5']}
+ 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"
@@ -96,7 +95,7 @@ class ShareonlineBiz(Hoster):
def handleFree(self):
self.downloadAPIData()
self.pyfile.name = self.api_data["filename"]
- self.pyfile.size = int(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)
@@ -146,7 +145,7 @@ class ShareonlineBiz(Hoster):
self.offline()
self.pyfile.name = dlinfo["name"]
- self.pyfile.size = int(dlinfo["size"])
+ self.pyfile.size = self.exp_size = int(dlinfo["size"])
dlLink = dlinfo["url"]
if dlLink == "server_under_maintenance":
diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py
index ad96cc3b0..6b98b4d08 100644
--- a/module/plugins/hoster/XFileSharingPro.py
+++ b/module/plugins/hoster/XFileSharingPro.py
@@ -33,8 +33,8 @@ class XFileSharingPro(SimpleHoster):
"""
__name__ = "XFileSharingPro"
__type__ = "hoster"
- __pattern__ = r"^unmatchable$"
- __version__ = "0.07"
+ __pattern__ = r"http://(?:\w*\.)*((aieshare|amonshare|asixfiles|azsharing|banashare|batubia|bebasupload|boosterking|buckshare|bulletupload|crocshare|ddlanime|divxme|dopeshare|downupload|eyesfile|eyvx|fik1|file(4safe|4sharing|band|beep|bit|box|dove|fat|forth|made|mak|planet|playgroud|race|rio|strack|upper|velocity)|fooget|4bytez|freefilessharing|glumbouploads|grupload|heftyfile|hipfile|host4desi|hulkshare.com|idupin|imageporter|isharefast|jalurcepat|kingsupload|laoupload|linkzhost|loombo|maknyos|migahost|mlfat4arab|movreel|netuploaded|ok2upload|180upload|1hostclick|ovfile|putshare|pyramidfiles|q4share|queenshare|ravishare|rockdizfile|sendmyway|share(76|beast|hut|run|swift)|sharingonline|6ybh-upload|skipfile|spaadyshare|space4file|speedoshare|upload(baz|boost|c|dot|floor|ic|dville)|uptobox|vidbull|zalaa|zomgupload)\.com|(kupload|movbay|multishare|omegave|toucansharing|uflinq)\.org|(annonhost|fupload|muchshare|supashare|tusfiles|usershare|xuploading)\.net|(banicrazy|flowhot|upbrasil)\.info|(shareyourfilez)|.biz|(bzlink|)\.us|(cloudcache|fileserver)\.cc|(farshare|kingshare)\.to|(filemaze|filehost)\.ws|(goldfile|xfileshare)\.eu|(filestock|moidisk)\.ru|4up\.me|kfiles\.kz|odsiebie\.pl|upchi\.co\.il|upit\.in|verzend\.be)/\w{12}"
+ __version__ = "0.05"
__description__ = """XFileSharingPro common hoster base"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
@@ -86,11 +86,6 @@ class XFileSharingPro(SimpleHoster):
self.handleFree()
def handleFree(self):
- url = self.getDownloadLink()
- self.logDebug("Download URL: %s" % url)
- self.startDownload(url)
-
- def getDownloadLink(self):
for i in range(5):
data = self.getPostParameters()
@@ -109,7 +104,7 @@ class XFileSharingPro(SimpleHoster):
else: self.fail("No valid captcha code entered")
- return found.group(1)
+ self.startDownload(found.group(1))
def handlePremium(self):
self.html = self.load(self.pyfile.url, post = self.getPostParameters())
@@ -151,7 +146,7 @@ class XFileSharingPro(SimpleHoster):
found = re.search(self.ERROR_PATTERN, self.html)
if found:
self.errmsg = found.group(1)
- self.logWarning(re.sub(self.errmsg, "<.*?>"," "))
+ self.logWarning(self.errmsg)
if 'wait' in self.errmsg:
wait_time = sum([int(v) * {"hour": 3600, "minute": 60, "second": 1}[u] for v, u in re.findall('(\d+)\s*(hour|minute|second)?', self.errmsg)])