summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/RapidgatorNet.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-06 18:57:55 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-07-06 18:57:55 +0200
commit0072668fd976f9ce4dbaac7e807791f21cbe07ed (patch)
tree473ef27784ac8f7f2001bdca159852cf3be74ec2 /module/plugins/hoster/RapidgatorNet.py
parent[UpdateManager] Little code cleanup + improved threading (diff)
downloadpyload-0072668fd976f9ce4dbaac7e807791f21cbe07ed.tar.xz
Compute wait time using secondsToMidnight
Diffstat (limited to 'module/plugins/hoster/RapidgatorNet.py')
-rw-r--r--module/plugins/hoster/RapidgatorNet.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py
index 11950318b..d3399722e 100644
--- a/module/plugins/hoster/RapidgatorNet.py
+++ b/module/plugins/hoster/RapidgatorNet.py
@@ -17,10 +17,13 @@
###############################################################################
import re
+
from pycurl import HTTPHEADER
from module.common.json_layer import json_loads
from module.network.HTTPRequest import BadHeader
+
+from module.plugins.hoster.UnrestrictLi import secondsToMidnight
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
from module.plugins.internal.CaptchaService import ReCaptcha, SolveMedia, AdsCaptcha
@@ -29,7 +32,7 @@ class RapidgatorNet(SimpleHoster):
__name__ = "RapidgatorNet"
__type__ = "hoster"
__pattern__ = r'http://(?:www\.)?(rapidgator\.net|rg\.to)/file/\w+'
- __version__ = "0.21"
+ __version__ = "0.22"
__description__ = """Rapidgator.net hoster plugin"""
__author_name__ = ("zoidberg", "chrox", "stickell", "Walter Purcaro")
__author_mail__ = ("zoidberg@mujmail.cz", "", "l.stickell@yahoo.it", "vuolter@gmail.com")
@@ -182,12 +185,13 @@ class RapidgatorNet(SimpleHoster):
if not found:
return
elif found.group(1) == "daily":
- wait_time = 60
+ self.logWarning("You have reached your daily downloads limit for today")
+ wait_time = secondsToMidnight(gmt=2)
else:
- wait_time = 24 * 60
+ wait_time = 1 * 60 * 60
- self.logDebug("Waiting %d minutes" % wait_time)
- self.wait(wait_time * 60, True)
+ self.logDebug("Waiting %d minutes" % wait_time / 60)
+ self.wait(wait_time, True)
self.retry()
def getJsonResponse(self, url):