summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hooks/PremiumizeMeHook.py4
-rw-r--r--module/plugins/hoster/PremiumizeMe.py4
-rw-r--r--module/plugins/hoster/UploadedTo.py35
-rw-r--r--module/plugins/internal/SimpleHoster.py8
4 files changed, 16 insertions, 35 deletions
diff --git a/module/plugins/hooks/PremiumizeMeHook.py b/module/plugins/hooks/PremiumizeMeHook.py
index e081fb389..f13520323 100644
--- a/module/plugins/hooks/PremiumizeMeHook.py
+++ b/module/plugins/hooks/PremiumizeMeHook.py
@@ -7,7 +7,7 @@ from module.plugins.internal.MultiHook import MultiHook
class PremiumizeMeHook(MultiHook):
__name__ = "PremiumizeMeHook"
__type__ = "hook"
- __version__ = "0.17"
+ __version__ = "0.18"
__config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"),
("pluginlist" , "str" , "Plugin list (comma separated)" , "" ),
@@ -26,7 +26,7 @@ class PremiumizeMeHook(MultiHook):
# Get supported hosters list from premiumize.me using the
# json API v1 (see https://secure.premiumize.me/?show=api)
- answer = self.getURL("https://api.premiumize.me/pm-api/v1.php",
+ answer = self.getURL("http://api.premiumize.me/pm-api/v1.php",
get={'method': "hosterlist", 'params[login]': user, 'params[pass]': data['password']})
data = json_loads(answer)
diff --git a/module/plugins/hoster/PremiumizeMe.py b/module/plugins/hoster/PremiumizeMe.py
index 3227fb001..181c08b7a 100644
--- a/module/plugins/hoster/PremiumizeMe.py
+++ b/module/plugins/hoster/PremiumizeMe.py
@@ -7,7 +7,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class PremiumizeMe(MultiHoster):
__name__ = "PremiumizeMe"
__type__ = "hoster"
- __version__ = "0.16"
+ __version__ = "0.17"
__pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -32,7 +32,7 @@ class PremiumizeMe(MultiHoster):
user, data = self.account.selectAccount()
# Get rewritten link using the premiumize.me api v1 (see https://secure.premiumize.me/?show=api)
- data = json_loads(self.load("https://api.premiumize.me/pm-api/v1.php",
+ data = json_loads(self.load("http://api.premiumize.me/pm-api/v1.php",
get={'method' : "directdownloadlink",
'params[login]': user,
'params[pass]' : data['password'],
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index 16966a23d..eb4c8cf04 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -2,6 +2,7 @@
import re
import time
+import urlparse
from module.network.RequestFactory import getURL
from module.plugins.internal.ReCaptcha import ReCaptcha
@@ -11,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UploadedTo(SimpleHoster):
__name__ = "UploadedTo"
__type__ = "hoster"
- __version__ = "0.89"
+ __version__ = "0.91"
__pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -21,7 +22,8 @@ class UploadedTo(SimpleHoster):
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
- DISPOSITION = False
+ CHECK_TRAFFIC = True
+ DISPOSITION = False
API_KEY = "lhF2IeeprweDfu9ccWlxXVVypA5nA3EL"
@@ -29,10 +31,7 @@ class UploadedTo(SimpleHoster):
TEMP_OFFLINE_PATTERN = r'<title>uploaded\.net - Maintenance'
- LINK_PREMIUM_PATTERN = r'<div class="tfree".*\s*<form method="post" action="(.+?)"'
-
WAIT_PATTERN = r'Current waiting period: <span>(\d+)'
- DL_LIMIT_ERROR = r'You have reached the max. number of possible free downloads for this hour'
@classmethod
@@ -58,7 +57,7 @@ class UploadedTo(SimpleHoster):
def setup(self):
- self.multiDL = self.resumeDownload = self.premium
+ self.multiDL = self.resumeDownload = self.premium
self.chunkLimit = 1 # critical problems with more chunks
@@ -67,27 +66,11 @@ class UploadedTo(SimpleHoster):
self.logError(_("Free-download capacities exhausted"))
self.retry(24, 5 * 60)
- elif "limit-size" in self.html:
- self.fail(_("File too big for free download"))
-
- elif "limit-slot" in self.html: # Temporary restriction so just wait a bit
- self.wait(30 * 60, True)
- self.retry()
-
- elif "limit-parallel" in self.html:
- self.fail(_("Cannot download in parallel"))
+ return super(UploadedTo, self).checkErrors()
- elif "limit-dl" in self.html or self.DL_LIMIT_ERROR in self.html: # limit-dl
- self.wait(3 * 60 * 60, True)
- self.retry()
- elif '"err":"captcha"' in self.html:
- self.invalidCaptcha()
-
- else:
- m = re.search(self.WAIT_PATTERN, self.html)
- if m:
- self.wait(m.group(1))
+ def handlePremium(self, pyfile):
+ self.link = urlparse.urljoin(pyfile.url, "/ddl?pw=" + self.getPassword())
def handleFree(self, pyfile):
@@ -110,8 +93,6 @@ class UploadedTo(SimpleHoster):
except Exception:
pass
- self.checkErrors()
-
def checkFile(self, rules={}):
if self.checkDownload({'limit-dl': self.DL_LIMIT_ERROR}):
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 33e7d3674..4c1441e4b 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -239,7 +239,7 @@ def secondsToMidnight(gmt=0):
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "1.53"
+ __version__ = "1.54"
__pattern__ = r'^unmatchable$'
__config__ = [("use_premium", "bool", "Use premium account if available" , True),
@@ -615,7 +615,7 @@ class SimpleHoster(Hoster):
self.info['error'] = re.sub(r'<.*?>', " ", errmsg)
self.logWarning(self.info['error'])
- if re.search('limit|wait', errmsg, re.I):
+ if re.search('limit|wait|slot', errmsg, re.I):
if re.search("da(il)?y|today", errmsg):
wait_time = secondsToMidnight(gmt=2)
else:
@@ -633,12 +633,12 @@ class SimpleHoster(Hoster):
self.retry(10, reason=_("Wrong captcha"))
elif re.search('countdown|expired', errmsg, re.I):
- self.retry(wait_time=60, reason=_("Link expired"))
+ self.retry(10, wait_time=60, reason=_("Link expired"))
elif re.search('maintenance|maintainance|temp', errmsg, re.I):
self.tempOffline()
- elif re.search('up to', errmsg, re.I):
+ elif re.search('up to|size', errmsg, re.I):
self.fail(_("File too large for free download"))
elif re.search('offline|delet|remov|not? (found|(longer)? available)', errmsg, re.I):