From 2b3baa733ee388507d132466f34305b35f82681e Mon Sep 17 00:00:00 2001
From: zoidberg10 <zoidberg@mujmail.cz>
Date: Sat, 28 Apr 2012 01:32:35 +0200
Subject: plugin updates: closed #592, #565; closed #591

---
 module/plugins/hoster/BitshareCom.py   | 13 ++++++++++---
 module/plugins/hoster/CzshareCom.py    |  4 ++--
 module/plugins/hoster/EasybytezCom.py  |  6 +++---
 module/plugins/hoster/RapidgatorNet.py |  5 ++++-
 4 files changed, 19 insertions(+), 9 deletions(-)

(limited to 'module/plugins')

diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py
index ba90f3ddc..6d6b9c26d 100644
--- a/module/plugins/hoster/BitshareCom.py
+++ b/module/plugins/hoster/BitshareCom.py
@@ -46,7 +46,7 @@ class BitshareCom(Hoster):
     __name__ = "BitshareCom"
     __type__ = "hoster"
     __pattern__ = r"http://(www\.)?bitshare\.com/(files/(?P<id1>[a-zA-Z0-9]+)(/(?P<name>.*?)\.html)?|\?f=(?P<id2>[a-zA-Z0-9]+))"
-    __version__ = "0.43"
+    __version__ = "0.44"
     __description__ = """Bitshare.Com File Download Hoster"""
     __author_name__ = ("paulking", "fragonib")
     __author_mail__ = (None, "fragonib[AT]yahoo[DOT]es")
@@ -118,8 +118,13 @@ class BitshareCom(Hoster):
         # Waiting
         if wait > 0:
             self.logDebug("Waiting %d seconds." % wait)
-            self.setWait(wait, True)
-            self.wait()
+            if wait < 120:
+                self.setWait(wait, False)
+                self.wait()
+            else:
+                self.setWait(wait - 55, True)
+                self.wait()
+                self.retry()  
             
         # Resolve captcha
         if captcha == 1:
@@ -158,5 +163,7 @@ class BitshareCom(Hoster):
         if "SUCCESS" in response:
             self.correctCaptcha()
             return True
+        elif "ERROR:SESSION ERROR" in response:
+            self.retry()
         self.logDebug("Wrong captcha")
         self.invalidCaptcha()
\ No newline at end of file
diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py
index 0ef9c267c..71c698811 100644
--- a/module/plugins/hoster/CzshareCom.py
+++ b/module/plugins/hoster/CzshareCom.py
@@ -45,7 +45,7 @@ class CzshareCom(SimpleHoster):
     __name__ = "CzshareCom"
     __type__ = "hoster"
     __pattern__ = r"http://(\w*\.)*czshare\.(com|cz)/(\d+/|download.php\?).*"
-    __version__ = "0.86"
+    __version__ = "0.87"
     __description__ = """CZshare.com"""
     __author_name__ = ("zoidberg")
 
@@ -149,7 +149,7 @@ class CzshareCom(SimpleHoster):
         check = self.checkDownload({
             "tempoffline": re.compile(r"^Soubor je do.asn. nedostupn.$"),
             "multi_dl": re.compile(self.MULTIDL_PATTERN),
-            "captcha_err": re.compile(self.FREE_FORM_PATTERN)
+            "captcha_err": "<li>Zadaný ověřovací kód nesouhlasí!</li>"
             })
 
         if check == "tempoffline":
diff --git a/module/plugins/hoster/EasybytezCom.py b/module/plugins/hoster/EasybytezCom.py
index 49214ba99..5b9925e97 100644
--- a/module/plugins/hoster/EasybytezCom.py
+++ b/module/plugins/hoster/EasybytezCom.py
@@ -24,7 +24,7 @@ class EasybytezCom(XFileSharingPro):
     __name__ = "EasybytezCom"
     __type__ = "hoster"
     __pattern__ = r"http://(?:\w*\.)?easybytez.com/(\w+).*"
-    __version__ = "0.08"
+    __version__ = "0.09"
     __description__ = """easybytez.com"""
     __author_name__ = ("zoidberg")
     __author_mail__ = ("zoidberg@mujmail.cz")
@@ -49,7 +49,7 @@ class EasybytezCom(XFileSharingPro):
         self.startDownload(found.group(1))
 
     def handleOverriden(self):
-        self.html = self.load(self.HOSTER_URL)
+        self.html = self.load(self.HOSTER_NAME)
         action, inputs =  self.parseHtmlForm('')
         upload_id = "%012d" % int(random()*10**12)
         action += upload_id + "&js_on=1&utype=prem&upload_type=url"
@@ -73,4 +73,4 @@ class EasybytezCom(XFileSharingPro):
         self.pyfile.url = found.group(1)
         self.retry()
 
-getInfo = create_getInfo(EasybytezCom)
+getInfo = create_getInfo(EasybytezCom)
\ No newline at end of file
diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py
index a8c55f0ba..e4424809c 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.01"
+    __version__ = "0.02"
     __description__ = """rapidgator.net"""
     __author_name__ = ("zoidberg")
   
@@ -39,6 +39,9 @@ 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":
+            self.fail("File too large for free download")
+        
         self.checkWait()  
     
         jsvars = dict(re.findall(self.JSVARS_PATTERN, self.html))
-- 
cgit v1.2.3