summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
authorGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-05-30 23:43:01 +0200
committerGravatar zoidberg10 <zoidberg@mujmail.cz> 2012-05-30 23:43:01 +0200
commit0dc4237338b87169e29a8277607d313341773afa (patch)
treec37911035f4ee74f6194ac318b808b4f635f57de /module/plugins/hoster
parentBacked out changeset: 240404fc2b83 (diff)
downloadpyload-0dc4237338b87169e29a8277607d313341773afa.tar.xz
commit plugins only
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, 16 insertions, 10 deletions
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py
index 719235565..187ee062d 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.29"
+ __version__ = "0.30"
__description__ = """Shareonline.biz Download Hoster"""
__author_name__ = ("spoob", "mkaay", "zoidberg")
__author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de", "zoidberg@mujmail.cz")
@@ -57,6 +57,8 @@ class ShareonlineBiz(Hoster):
self.resumeDownload = self.multiDL = self.premium
#self.chunkLimit = 1
+
+ self.check_data = None
def process(self, pyfile):
if self.premium:
@@ -74,9 +76,8 @@ class ShareonlineBiz(Hoster):
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)
+ if self.api_data:
+ self.check_data = {"size": int(self.api_data['size']), "md5": self.api_data['md5']}
def downloadAPIData(self):
api_url_base = "http://api.share-online.biz/linkcheck.php?md5=1"
@@ -95,7 +96,7 @@ class ShareonlineBiz(Hoster):
def handleFree(self):
self.downloadAPIData()
self.pyfile.name = self.api_data["filename"]
- self.pyfile.size = self.exp_size = int(self.api_data["size"])
+ self.pyfile.size = int(self.api_data["size"])
self.html = self.load(self.pyfile.url, cookies = True) #refer, stuff
self.setWait(3)
@@ -145,7 +146,7 @@ class ShareonlineBiz(Hoster):
self.offline()
self.pyfile.name = dlinfo["name"]
- self.pyfile.size = self.exp_size = int(dlinfo["size"])
+ self.pyfile.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 6b98b4d08..ad96cc3b0 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"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"
+ __pattern__ = r"^unmatchable$"
+ __version__ = "0.07"
__description__ = """XFileSharingPro common hoster base"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
@@ -86,6 +86,11 @@ 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()
@@ -104,7 +109,7 @@ class XFileSharingPro(SimpleHoster):
else: self.fail("No valid captcha code entered")
- self.startDownload(found.group(1))
+ return found.group(1)
def handlePremium(self):
self.html = self.load(self.pyfile.url, post = self.getPostParameters())
@@ -146,7 +151,7 @@ class XFileSharingPro(SimpleHoster):
found = re.search(self.ERROR_PATTERN, self.html)
if found:
self.errmsg = found.group(1)
- self.logWarning(self.errmsg)
+ self.logWarning(re.sub(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)])