diff options
author | Stefano <l.stickell@yahoo.it> | 2013-08-25 21:31:50 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-09-07 20:27:29 +0200 |
commit | 4cb354ca13eab18d8b43da5a9aa4636ce2e05b81 (patch) | |
tree | a8b38175e8fd7bf84b02722c9cbcd9a7f9e40df3 /pyload/plugins/hoster/UnrestrictLi.py | |
parent | Depositfiles: fixed file size detect (diff) | |
download | pyload-4cb354ca13eab18d8b43da5a9aa4636ce2e05b81.tar.xz |
UnrestrictLi: fix for #238
(cherry picked from commit 9dda14ce2aab0541c52d830ffdf0851b8cf40497)
Diffstat (limited to 'pyload/plugins/hoster/UnrestrictLi.py')
-rw-r--r-- | pyload/plugins/hoster/UnrestrictLi.py | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/pyload/plugins/hoster/UnrestrictLi.py b/pyload/plugins/hoster/UnrestrictLi.py index ec7bfe591..0e64a4697 100644 --- a/pyload/plugins/hoster/UnrestrictLi.py +++ b/pyload/plugins/hoster/UnrestrictLi.py @@ -35,7 +35,7 @@ def secondsToMidnight(): class UnrestrictLi(Hoster): __name__ = "UnrestrictLi" - __version__ = "0.09" + __version__ = "0.10" __type__ = "hoster" __config__ = [("activated", "bool", "Activated", "False"), ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"), @@ -67,16 +67,24 @@ class UnrestrictLi(Hoster): self.logDebug("JSON data: " + page) if page != '': break - if "File offline" in page: + else: + self.logInfo("Unable to get API data, waiting 1 minute and retry") + self.retry(5, 60, "Unable to get API data") + + if 'Expired session' in page or ("You are not allowed to " + "download from this host" in page and self.premium): + self.account.relogin(self.user) + self.retry() + elif "File offline" in page: self.offline() - elif "ERROR_HOSTER_TEMPORARILY_UNAVAILABLE" in page: - self.logInfo("Hoster temporarily unavailable, waiting 1 minute and retry") - self.retry(5, 60, "Hoster is temporarily unavailable") elif "You are not allowed to download from this host" in page: self.fail("You are not allowed to download from this host") elif "You have reached your daily limit for this host" in page: self.logInfo("Reached daily limit for this host. Waiting until 00:10 GMT+2") self.retry(5, secondsToMidnight(), "Daily limit for this host reached") + elif "ERROR_HOSTER_TEMPORARILY_UNAVAILABLE" in page: + self.logInfo("Hoster temporarily unavailable, waiting 1 minute and retry") + self.retry(5, 60, "Hoster is temporarily unavailable") page = json_loads(page) new_url = page.keys()[0] self.api_data = page[new_url] |