summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/AlldebridCom.py8
-rw-r--r--module/plugins/hoster/BasePlugin.py5
-rw-r--r--module/plugins/hoster/BezvadataCz.py3
-rw-r--r--module/plugins/hoster/BitshareCom.py10
-rw-r--r--module/plugins/hoster/CatShareNet.py6
-rw-r--r--module/plugins/hoster/DailymotionCom.py43
-rw-r--r--module/plugins/hoster/DataHu.py2
-rw-r--r--module/plugins/hoster/DebridItaliaCom.py2
-rw-r--r--module/plugins/hoster/DlFreeFr.py92
-rw-r--r--module/plugins/hoster/DodanePl.py2
-rw-r--r--module/plugins/hoster/FastixRu.py7
-rw-r--r--module/plugins/hoster/FastshareCz.py5
-rw-r--r--module/plugins/hoster/FileSharkPl.py4
-rw-r--r--module/plugins/hoster/FileStoreTo.py3
-rw-r--r--module/plugins/hoster/FilecloudIo.py11
-rw-r--r--module/plugins/hoster/FilepostCom.py37
-rw-r--r--module/plugins/hoster/FilerNet.py15
-rw-r--r--module/plugins/hoster/FileserveCom.py10
-rw-r--r--module/plugins/hoster/FilezyNet.py2
-rw-r--r--module/plugins/hoster/FlyFilesNet.py2
-rw-r--r--module/plugins/hoster/FreeWayMe.py4
-rw-r--r--module/plugins/hoster/FreevideoCz.py2
-rw-r--r--module/plugins/hoster/GamefrontCom.py5
-rw-r--r--module/plugins/hoster/GooIm.py3
-rw-r--r--module/plugins/hoster/IfileIt.py27
-rw-r--r--module/plugins/hoster/JumbofilesCom.py3
-rw-r--r--module/plugins/hoster/Keep2shareCc.py25
-rw-r--r--module/plugins/hoster/KingfilesNet.py32
-rw-r--r--module/plugins/hoster/LoadTo.py7
-rw-r--r--module/plugins/hoster/MediafireCom.py8
-rw-r--r--module/plugins/hoster/MegaCoNz.py33
-rw-r--r--module/plugins/hoster/MegaDebridEu.py2
-rw-r--r--module/plugins/hoster/MegasharesCom.py19
-rw-r--r--module/plugins/hoster/MultishareCz.py9
-rw-r--r--module/plugins/hoster/MyvideoDe.py2
-rw-r--r--module/plugins/hoster/NetloadIn.py11
-rw-r--r--module/plugins/hoster/NowDownloadSx.py (renamed from module/plugins/hoster/NowDownloadEu.py)15
-rw-r--r--module/plugins/hoster/NowVideoSx.py (renamed from module/plugins/hoster/NowVideoAt.py)10
-rw-r--r--module/plugins/hoster/OboomCom.py2
-rw-r--r--module/plugins/hoster/OneFichierCom.py2
-rw-r--r--module/plugins/hoster/PornhostCom.py2
-rw-r--r--module/plugins/hoster/PornhubCom.py2
-rw-r--r--module/plugins/hoster/PremiumTo.py8
-rw-r--r--module/plugins/hoster/PremiumizeMe.py9
-rw-r--r--module/plugins/hoster/RPNetBiz.py2
-rw-r--r--module/plugins/hoster/RapidgatorNet.py12
-rw-r--r--module/plugins/hoster/RapidshareCom.py228
-rw-r--r--module/plugins/hoster/RapiduNet.py12
-rw-r--r--module/plugins/hoster/RealdebridCom.py9
-rw-r--r--module/plugins/hoster/RedtubeCom.py2
-rw-r--r--module/plugins/hoster/RehostTo.py5
-rw-r--r--module/plugins/hoster/RgHostNet.py13
-rw-r--r--module/plugins/hoster/SimplyPremiumCom.py2
-rw-r--r--module/plugins/hoster/SimplydebridCom.py9
-rw-r--r--module/plugins/hoster/SoundcloudCom.py2
-rw-r--r--module/plugins/hoster/StreamCz.py4
-rw-r--r--module/plugins/hoster/TusfilesNet.py2
-rw-r--r--module/plugins/hoster/TwoSharedCom.py3
-rw-r--r--module/plugins/hoster/UlozTo.py2
-rw-r--r--module/plugins/hoster/UnrestrictLi.py2
-rw-r--r--module/plugins/hoster/UploadableCh.py4
-rw-r--r--module/plugins/hoster/UploadedTo.py6
-rw-r--r--module/plugins/hoster/UpstoreNet.py6
-rw-r--r--module/plugins/hoster/VeohCom.py5
-rw-r--r--module/plugins/hoster/VimeoCom.py5
-rw-r--r--module/plugins/hoster/Vipleech4uCom.py2
-rw-r--r--module/plugins/hoster/XVideosCom.py2
-rw-r--r--module/plugins/hoster/YoupornCom.py2
-rw-r--r--module/plugins/hoster/YoutubeCom.py47
-rw-r--r--module/plugins/hoster/ZDF.py2
-rw-r--r--module/plugins/hoster/ZeveraCom.py5
71 files changed, 333 insertions, 573 deletions
diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py
index c7240415d..bdd8ccdff 100644
--- a/module/plugins/hoster/AlldebridCom.py
+++ b/module/plugins/hoster/AlldebridCom.py
@@ -45,12 +45,10 @@ class AlldebridCom(Hoster):
self.fail(_("No AllDebrid account provided"))
else:
self.logDebug("Old URL: %s" % pyfile.url)
- password = self.getPassword().splitlines()
- password = "" if not password else password[0]
+ password = self.getPassword().splitlines()[0] or ""
- url = "http://www.alldebrid.com/service.php?link=%s&json=true&pw=%s" % (pyfile.url, password)
- page = self.load(url)
- data = json_loads(page)
+ data = json_loads(self.load("http://www.alldebrid.com/service.php",
+ get={'link': pyfile.url, 'json': "true", 'pw': password}))
self.logDebug("Json data", data)
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py
index 0b1888e3b..7b59303ef 100644
--- a/module/plugins/hoster/BasePlugin.py
+++ b/module/plugins/hoster/BasePlugin.py
@@ -60,7 +60,7 @@ class BasePlugin(Hoster):
self.logDebug("Logging on to %s" % server)
self.req.addAuth(account.accounts[server]['password'])
else:
- for pwd in pyfile.package().password.splitlines():
+ for pwd in self.getPassword().splitlines():
if ":" in pwd:
self.req.addAuth(pwd.strip())
break
@@ -104,3 +104,6 @@ class BasePlugin(Hoster):
self.fail(_("Too many redirects"))
self.download(unquote(url), disposition=True)
+
+
+getInfo = create_getInfo(BasePlugin)
diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py
index d89616c86..3a0b8e58c 100644
--- a/module/plugins/hoster/BezvadataCz.py
+++ b/module/plugins/hoster/BezvadataCz.py
@@ -23,7 +23,8 @@ class BezvadataCz(SimpleHoster):
def setup(self):
- self.multiDL = self.resumeDownload = True
+ self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py
index da393f8fc..17d29680e 100644
--- a/module/plugins/hoster/BitshareCom.py
+++ b/module/plugins/hoster/BitshareCom.py
@@ -31,7 +31,7 @@ class BitshareCom(SimpleHoster):
def setup(self):
- self.multiDL = self.premium
+ self.multiDL = self.premium
self.chunkLimit = 1
@@ -115,10 +115,12 @@ class BitshareCom(SimpleHoster):
# Try up to 3 times
for i in xrange(3):
- challenge, code = recaptcha.challenge()
+ challenge, response = recaptcha.challenge()
res = self.load("http://bitshare.com/files-ajax/" + self.file_id + "/request.html",
- post={"request": "validateCaptcha", "ajaxid": self.ajaxid,
- "recaptcha_challenge_field": challenge, "recaptcha_response_field": code})
+ post={"request" : "validateCaptcha",
+ "ajaxid" : self.ajaxid,
+ "recaptcha_challenge_field": challenge,
+ "recaptcha_response_field" : response})
if self.handleCaptchaErrors(res):
break
diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py
index 63ae2c11c..949a021dd 100644
--- a/module/plugins/hoster/CatShareNet.py
+++ b/module/plugins/hoster/CatShareNet.py
@@ -31,7 +31,7 @@ class CatShareNet(SimpleHoster):
def setup(self):
- self.multiDL = self.premium
+ self.multiDL = self.premium
self.resumeDownload = True
@@ -50,10 +50,10 @@ class CatShareNet(SimpleHoster):
recaptcha = ReCaptcha(self)
- challenge, code = recaptcha.challenge()
+ challenge, response = recaptcha.challenge()
self.html = self.load(self.pyfile.url,
post={'recaptcha_challenge_field': challenge,
- 'recaptcha_response_field': code})
+ 'recaptcha_response_field' : response})
m = re.search(self.LINK_PATTERN, self.html)
if m is None:
diff --git a/module/plugins/hoster/DailymotionCom.py b/module/plugins/hoster/DailymotionCom.py
index 6dd357260..f07a34f8a 100644
--- a/module/plugins/hoster/DailymotionCom.py
+++ b/module/plugins/hoster/DailymotionCom.py
@@ -9,19 +9,17 @@ from module.plugins.Hoster import Hoster
def getInfo(urls):
- result = [] #: [ .. (name, size, status, url) .. ]
- regex = re.compile(DailymotionCom.__pattern__)
- apiurl = "https://api.dailymotion.com/video/"
+ result = []
+ regex = re.compile(DailymotionCom.__pattern__)
+ apiurl = "https://api.dailymotion.com/video/%s"
request = {"fields": "access_error,status,title"}
+
for url in urls:
- id = regex.search(url).group("ID")
- page = getURL(apiurl + id, get=request)
+ id = regex.match(url).group("ID")
+ page = getURL(apiurl % id, get=request)
info = json_loads(page)
- if "title" in info:
- name = info['title'] + ".mp4"
- else:
- name = url
+ name = info['title'] + ".mp4" if "title" in info else url
if "error" in info or info['access_error']:
status = "offline"
@@ -35,16 +33,17 @@ def getInfo(urls):
status = "offline"
result.append((name, 0, statusMap[status], url))
+
return result
class DailymotionCom(Hoster):
__name__ = "DailymotionCom"
__type__ = "hoster"
- __version__ = "0.2"
+ __version__ = "0.20"
- __pattern__ = r'https?://(?:www\.)?dailymotion\.com/.*?video/(?P<ID>[\w^_]+)'
- __config__ = [("quality", "Lowest;LD 144p;LD 240p;SD 384p;HQ 480p;HD 720p;HD 1080p;Highest", "Quality", "Highest")]
+ __pattern__ = r'https?://(?:www\.)?dailymotion\.com/.*video/(?P<ID>[\w^_]+)'
+ __config__ = [("quality", "Lowest;LD 144p;LD 240p;SD 384p;HQ 480p;HD 720p;HD 1080p;Highest", "Quality", "Highest")]
__description__ = """Dailymotion.com hoster plugin"""
__license__ = "GPLv3"
@@ -52,29 +51,36 @@ class DailymotionCom(Hoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
+ self.resumeDownload = True
+ self.multiDL = True
def getStreams(self):
streams = []
+
for result in re.finditer(r"\"(?P<URL>http:\\/\\/www.dailymotion.com\\/cdn\\/H264-(?P<QF>.*?)\\.*?)\"",
self.html):
url = result.group("URL")
- qf = result.group("QF")
- link = url.replace("\\", "")
+ qf = result.group("QF")
+
+ link = url.replace("\\", "")
quality = tuple(int(x) for x in qf.split("x"))
+
streams.append((quality, link))
+
return sorted(streams, key=lambda x: x[0][::-1])
def getQuality(self):
q = self.getConfig("quality")
+
if q == "Lowest":
quality = 0
elif q == "Highest":
quality = -1
else:
quality = int(q.rsplit(" ")[1][:-1])
+
return quality
@@ -91,14 +97,18 @@ class DailymotionCom(Hoster):
idx = quality
s = streams[idx]
+
self.logInfo(_("Download video quality %sx%s") % s[0])
+
return s[1]
def checkInfo(self, pyfile):
pyfile.name, pyfile.size, pyfile.status, pyfile.url = getInfo([pyfile.url])[0]
+
if pyfile.status == 1:
self.offline()
+
elif pyfile.status == 6:
self.tempOffline()
@@ -111,6 +121,5 @@ class DailymotionCom(Hoster):
streams = self.getStreams()
quality = self.getQuality()
- link = self.getLink(streams, quality)
- self.download(link)
+ self.download(self.getLink(streams, quality))
diff --git a/module/plugins/hoster/DataHu.py b/module/plugins/hoster/DataHu.py
index 74d631e7b..437fea7cd 100644
--- a/module/plugins/hoster/DataHu.py
+++ b/module/plugins/hoster/DataHu.py
@@ -28,7 +28,7 @@ class DataHu(SimpleHoster):
def setup(self):
self.resumeDownload = True
- self.multiDL = self.premium
+ self.multiDL = self.premium
def handleFree(self):
diff --git a/module/plugins/hoster/DebridItaliaCom.py b/module/plugins/hoster/DebridItaliaCom.py
index cb5d4c06a..17342b8cd 100644
--- a/module/plugins/hoster/DebridItaliaCom.py
+++ b/module/plugins/hoster/DebridItaliaCom.py
@@ -38,7 +38,7 @@ class DebridItaliaCom(Hoster):
self.fail(_("No DebridItalia account provided"))
else:
- html = self.load("http://www.debriditalia.com/api.php?generate=&link=%s" % pyfile.url)
+ html = self.load("http://www.debriditalia.com/api.php", get={'generate': "", 'link': pyfile.url})
if "ERROR" in html:
self.fail(re.search(r'ERROR:(.*)', html).strip())
diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py
index 8bc883fea..793c81b1c 100644
--- a/module/plugins/hoster/DlFreeFr.py
+++ b/module/plugins/hoster/DlFreeFr.py
@@ -3,9 +3,9 @@
import pycurl
import re
-from module.common.json_layer import json_loads
from module.network.Browser import Browser
from module.network.CookieJar import CookieJar
+from module.plugins.internal.CaptchaService import AdYouLike
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, replace_patterns
@@ -33,87 +33,10 @@ class CustomBrowser(Browser):
return Browser.load(self, *args, **kwargs)
-class AdYouLike:
- """
- Class to support adyoulike captcha service
- """
- ADYOULIKE_INPUT_PATTERN = r'Adyoulike\.create\((.*?)\);'
- ADYOULIKE_CALLBACK = r'Adyoulike\.g\._jsonp_5579316662423138'
- ADYOULIKE_CHALLENGE_PATTERN = ADYOULIKE_CALLBACK + r'\((.*?)\)'
-
-
- def __init__(self, plugin, engine="adyoulike"):
- self.plugin = plugin
- self.engine = engine
-
-
- def challenge(self, html):
- adyoulike_data_string = None
- m = re.search(self.ADYOULIKE_INPUT_PATTERN, html)
- if m:
- adyoulike_data_string = m.group(1)
- else:
- self.plugin.fail("Can't read AdYouLike input data")
-
- # {"adyoulike":{"key":"P~zQ~O0zV0WTiAzC-iw0navWQpCLoYEP"},
- # "all":{"element_id":"ayl_private_cap_92300","lang":"fr","env":"prod"}}
- ayl_data = json_loads(adyoulike_data_string)
-
- res = self.plugin.load(
- r'http://api-ayl.appspot.com/challenge?key=%(ayl_key)s&env=%(ayl_env)s&callback=%(callback)s' % {
- "ayl_key": ayl_data[self.engine]['key'], "ayl_env": ayl_data['all']['env'],
- "callback": self.ADYOULIKE_CALLBACK})
-
- m = re.search(self.ADYOULIKE_CHALLENGE_PATTERN, res)
- challenge_string = None
- if m:
- challenge_string = m.group(1)
- else:
- self.plugin.fail("Invalid AdYouLike challenge")
- challenge_data = json_loads(challenge_string)
-
- return ayl_data, challenge_data
-
-
- def result(self, ayl, challenge):
- """
- Adyoulike.g._jsonp_5579316662423138
- ({"translations":{"fr":{"instructions_visual":"Recopiez « Soonnight » ci-dessous :"}},
- "site_under":true,"clickable":true,"pixels":{"VIDEO_050":[],"DISPLAY":[],"VIDEO_000":[],"VIDEO_100":[],
- "VIDEO_025":[],"VIDEO_075":[]},"medium_type":"image/adyoulike",
- "iframes":{"big":"<iframe src=\"http://www.soonnight.com/campagn.html\" scrolling=\"no\"
- height=\"250\" width=\"300\" frameborder=\"0\"></iframe>"},"shares":{},"id":256,
- "token":"e6QuI4aRSnbIZJg02IsV6cp4JQ9~MjA1","formats":{"small":{"y":300,"x":0,"w":300,"h":60},
- "big":{"y":0,"x":0,"w":300,"h":250},"hover":{"y":440,"x":0,"w":300,"h":60}},
- "tid":"SqwuAdxT1EZoi4B5q0T63LN2AkiCJBg5"})
- """
- response = None
- try:
- instructions_visual = challenge['translations'][ayl['all']['lang']]['instructions_visual']
- m = re.search(u".*«(.*)».*", instructions_visual)
- if m:
- response = m.group(1).strip()
- else:
- self.plugin.fail("Can't parse instructions visual")
- except KeyError:
- self.plugin.fail("No instructions visual")
-
- #TODO: Supports captcha
-
- if not response:
- self.plugin.fail("AdYouLike result failed")
-
- return {"_ayl_captcha_engine": self.engine,
- "_ayl_env": ayl['all']['env'],
- "_ayl_tid": challenge['tid'],
- "_ayl_token_challenge": challenge['token'],
- "_ayl_response": response}
-
-
class DlFreeFr(SimpleHoster):
__name__ = "DlFreeFr"
__type__ = "hoster"
- __version__ = "0.25"
+ __version__ = "0.26"
__pattern__ = r'http://(?:www\.)?dl\.free\.fr/(\w+|getfile\.pl\?file=/\w+)'
@@ -130,9 +53,10 @@ class DlFreeFr(SimpleHoster):
def setup(self):
- self.multiDL = self.resumeDownload = True
- self.limitDL = 5
- self.chunkLimit = 1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.limitDL = 5
+ self.chunkLimit = 1
def init(self):
@@ -168,9 +92,7 @@ class DlFreeFr(SimpleHoster):
action, inputs = self.parseHtmlForm('action="getfile.pl"')
adyoulike = AdYouLike(self)
- ayl, challenge = adyoulike.challenge(self.html)
- result = adyoulike.result(ayl, challenge)
- inputs.update(result)
+ inputs.update(adyoulike.challenge())
self.load("http://dl.free.fr/getfile.pl", post=inputs)
headers = self.getLastHeaders()
diff --git a/module/plugins/hoster/DodanePl.py b/module/plugins/hoster/DodanePl.py
index 58f1c02d8..65d8452fa 100644
--- a/module/plugins/hoster/DodanePl.py
+++ b/module/plugins/hoster/DodanePl.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from module.plugins.internal.DeadHoster import DeadHoster, parseFileInfo
+from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class DodanePl(DeadHoster):
diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py
index 59b4bd24f..1e47638ea 100644
--- a/module/plugins/hoster/FastixRu.py
+++ b/module/plugins/hoster/FastixRu.py
@@ -46,10 +46,13 @@ class FastixRu(Hoster):
self.logDebug("Old URL: %s" % pyfile.url)
api_key = self.account.getAccountData(self.user)
api_key = api_key['api']
- url = "http://fastix.ru/api_v2/?apikey=%s&sub=getdirectlink&link=%s" % (api_key, pyfile.url)
- page = self.load(url)
+
+ page = self.load("http://fastix.ru/api_v2/",
+ get={'apikey': api_key, 'sub': "getdirectlink", 'link': pyfile.url})
data = json_loads(page)
+
self.logDebug("Json data", data)
+
if "error\":true" in page:
self.offline()
else:
diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py
index 1f1e9e6ee..5e2057aa5 100644
--- a/module/plugins/hoster/FastshareCz.py
+++ b/module/plugins/hoster/FastshareCz.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FastshareCz(SimpleHoster):
__name__ = "FastshareCz"
__type__ = "hoster"
- __version__ = "0.24"
+ __version__ = "0.25"
__pattern__ = r'http://(?:www\.)?fastshare\.cz/\d+/.+'
@@ -20,8 +20,7 @@ class FastshareCz(SimpleHoster):
URL_REPLACEMENTS = [("#.*", "")]
- COOKIES = [("fastshare.cz", "lang", "en")]
- CONTENT_DISPOSITION = True
+ COOKIES = [("fastshare.cz", "lang", "en")]
INFO_PATTERN = r'<h1 class="dwp">(?P<N>[^<]+)</h1>\s*<div class="fileinfo">\s*Size\s*: (?P<S>\d+) (?P<U>[\w^_]+),'
OFFLINE_PATTERN = r'>(The file has been deleted|Requested page not found)'
diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py
index ea2b56821..25825a229 100644
--- a/module/plugins/hoster/FileSharkPl.py
+++ b/module/plugins/hoster/FileSharkPl.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FileSharkPl(SimpleHoster):
__name__ = "FileSharkPl"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d{6}/\w{5}'
@@ -20,8 +20,6 @@ class FileSharkPl(SimpleHoster):
("Walter Purcaro", "vuolter@gmail.com")]
- CONTENT_DISPOSITION = True
-
NAME_PATTERN = r'<h2 class="name-file">(?P<N>.+)</h2>'
SIZE_PATTERN = r'<p class="size-file">(.*?)<strong>(?P<S>\d+\.?\d*)\s(?P<U>\w+)</strong></p>'
diff --git a/module/plugins/hoster/FileStoreTo.py b/module/plugins/hoster/FileStoreTo.py
index 8e3ba7177..e1bd8da71 100644
--- a/module/plugins/hoster/FileStoreTo.py
+++ b/module/plugins/hoster/FileStoreTo.py
@@ -23,7 +23,8 @@ class FileStoreTo(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
+ self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py
index 85ea3dae4..cb9782f23 100644
--- a/module/plugins/hoster/FilecloudIo.py
+++ b/module/plugins/hoster/FilecloudIo.py
@@ -34,8 +34,9 @@ class FilecloudIo(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = 1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = 1
def handleFree(self):
@@ -57,9 +58,9 @@ class FilecloudIo(SimpleHoster):
if not self.account:
self.fail(_("User not logged in"))
elif not self.account.logged_in:
- captcha_challenge, captcha_response = recaptcha.challenge(captcha_key)
- self.account.form_data = {"recaptcha_challenge_field": captcha_challenge,
- "recaptcha_response_field": captcha_response}
+ challenge, response = recaptcha.challenge(captcha_key)
+ self.account.form_data = {"recaptcha_challenge_field": challenge,
+ "recaptcha_response_field" : response}
self.account.relogin(self.user)
self.retry(2)
diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py
index db5ea20d3..b94892ef4 100644
--- a/module/plugins/hoster/FilepostCom.py
+++ b/module/plugins/hoster/FilepostCom.py
@@ -92,36 +92,39 @@ class FilepostCom(SimpleHoster):
def getJsonResponse(self, get_dict, post_dict, field):
- json_response = json_loads(self.load('https://filepost.com/files/get/', get=get_dict, post=post_dict))
- self.logDebug(json_response)
+ res = json_loads(self.load('https://filepost.com/files/get/', get=get_dict, post=post_dict))
- if not 'js' in json_response:
+ self.logDebug(res)
+
+ if not 'js' in res:
self.error(_("JSON %s 1") % field)
- # i changed js_answer to json_response['js'] since js_answer is nowhere set.
+ # i changed js_answer to res['js'] since js_answer is nowhere set.
# i don't know the JSON-HTTP specs in detail, but the previous author
- # accessed json_response['js']['error'] as well as js_answer['error'].
+ # accessed res['js']['error'] as well as js_answer['error'].
# see the two lines commented out with "# ~?".
- if 'error' in json_response['js']:
- if json_response['js']['error'] == 'download_delay':
- self.retry(wait_time=json_response['js']['params']['next_download'])
+ if 'error' in res['js']:
+
+ if res['js']['error'] == 'download_delay':
+ self.retry(wait_time=res['js']['params']['next_download'])
# ~? self.retry(wait_time=js_answer['params']['next_download'])
- elif 'Wrong file password' in json_response['js']['error']:
- return None
- elif 'You entered a wrong CAPTCHA code' in json_response['js']['error']:
- return None
- elif 'CAPTCHA Code nicht korrekt' in json_response['js']['error']:
+
+ elif ('Wrong file password' in res['js']['error']
+ or 'You entered a wrong CAPTCHA code' in res['js']['error']
+ or 'CAPTCHA Code nicht korrekt' in res['js']['error']):
return None
- elif 'CAPTCHA' in json_response['js']['error']:
+
+ elif 'CAPTCHA' in res['js']['error']:
self.logDebug("Error response is unknown, but mentions CAPTCHA")
return None
+
else:
- self.fail(json_response['js']['error'])
+ self.fail(res['js']['error'])
- if not 'answer' in json_response['js'] or not field in json_response['js']['answer']:
+ if not 'answer' in res['js'] or not field in res['js']['answer']:
self.error(_("JSON %s 2") % field)
- return json_response['js']['answer'][field]
+ return res['js']['answer'][field]
getInfo = create_getInfo(FilepostCom)
diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py
index c943a076d..5dd72efe7 100644
--- a/module/plugins/hoster/FilerNet.py
+++ b/module/plugins/hoster/FilerNet.py
@@ -15,7 +15,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FilerNet(SimpleHoster):
__name__ = "FilerNet"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.10"
__pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+'
@@ -25,8 +25,6 @@ class FilerNet(SimpleHoster):
("Walter Purcaro", "vuolter@gmail.com")]
- CONTENT_DISPOSITION = True
-
INFO_PATTERN = r'<h1 class="page-header">Free Download (?P<N>\S+) <small>(?P<S>[\w.]+) (?P<U>[\w^_]+)</small></h1>'
OFFLINE_PATTERN = r'Nicht gefunden'
@@ -66,16 +64,17 @@ class FilerNet(SimpleHoster):
if 'location' in header and header['location']:
self.correctCaptcha()
- self.link = urljoin('http://filer.net', header['location'])
+ self.link = header['location']
return
else:
self.invalidCaptcha()
- def handlePremium(self):
- super(FilerNet, self).handlePremium()
- if self.link:
- self.link = urljoin("http://filer.net/", self.link)
+ def downloadLink(self, link):
+ if not link:
+ return
+
+ self.download(urljoin("http://filer.net/", link), disposition=True)
getInfo = create_getInfo(FilerNet)
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index 2266e49b0..871a3dd26 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -59,9 +59,9 @@ class FileserveCom(Hoster):
def setup(self):
self.resumeDownload = self.multiDL = self.premium
-
self.file_id = re.match(self.__pattern__, self.pyfile.url).group('id')
- self.url = "%s%s" % (self.URLS[0], self.file_id)
+ self.url = "%s%s" % (self.URLS[0], self.file_id)
+
self.logDebug("File ID: %s URL: %s" % (self.file_id, self.url))
@@ -159,10 +159,10 @@ class FileserveCom(Hoster):
recaptcha = ReCaptcha(self)
for _i in xrange(5):
- challenge, code = recaptcha.challenge(captcha_key)
+ challenge, response = recaptcha.challenge(captcha_key)
res = json_loads(self.load(self.URLS[2],
- post={'recaptcha_challenge_field': challenge,
- 'recaptcha_response_field': code,
+ post={'recaptcha_challenge_field' : challenge,
+ 'recaptcha_response_field' : response,
'recaptcha_shortencode_field': self.file_id}))
if not res['success']:
self.invalidCaptcha()
diff --git a/module/plugins/hoster/FilezyNet.py b/module/plugins/hoster/FilezyNet.py
index d86ee6157..4197a2858 100644
--- a/module/plugins/hoster/FilezyNet.py
+++ b/module/plugins/hoster/FilezyNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FilezyNet(DeadHoster):
__name__ = "FilezyNet"
__type__ = "hoster"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'http://(?:www\.)?filezy\.net/\w{12}'
diff --git a/module/plugins/hoster/FlyFilesNet.py b/module/plugins/hoster/FlyFilesNet.py
index aa2c3993f..361537927 100644
--- a/module/plugins/hoster/FlyFilesNet.py
+++ b/module/plugins/hoster/FlyFilesNet.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster
class FlyFilesNet(SimpleHoster):
__name__ = "FlyFilesNet"
__type__ = "hoster"
- __version__ = "0.1"
+ __version__ = "0.10"
__pattern__ = r'http://(?:www\.)?flyfiles\.net/.*'
diff --git a/module/plugins/hoster/FreeWayMe.py b/module/plugins/hoster/FreeWayMe.py
index 84a56419b..a27dc04b8 100644
--- a/module/plugins/hoster/FreeWayMe.py
+++ b/module/plugins/hoster/FreeWayMe.py
@@ -17,8 +17,8 @@ class FreeWayMe(Hoster):
def setup(self):
self.resumeDownload = False
- self.chunkLimit = 1
- self.multiDL = self.premium
+ self.multiDL = self.premium
+ self.chunkLimit = 1
def process(self, pyfile):
diff --git a/module/plugins/hoster/FreevideoCz.py b/module/plugins/hoster/FreevideoCz.py
index 8c0df84b2..e56d1a299 100644
--- a/module/plugins/hoster/FreevideoCz.py
+++ b/module/plugins/hoster/FreevideoCz.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FreevideoCz(DeadHoster):
__name__ = "FreevideoCz"
__type__ = "hoster"
- __version__ = "0.3"
+ __version__ = "0.30"
__pattern__ = r'http://(?:www\.)?freevideo\.cz/vase-videa/.+'
diff --git a/module/plugins/hoster/GamefrontCom.py b/module/plugins/hoster/GamefrontCom.py
index 919d40891..c68866f87 100644
--- a/module/plugins/hoster/GamefrontCom.py
+++ b/module/plugins/hoster/GamefrontCom.py
@@ -25,8 +25,9 @@ class GamefrontCom(Hoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = -1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = -1
def process(self, pyfile):
diff --git a/module/plugins/hoster/GooIm.py b/module/plugins/hoster/GooIm.py
index 854e348c8..436d825a9 100644
--- a/module/plugins/hoster/GooIm.py
+++ b/module/plugins/hoster/GooIm.py
@@ -25,7 +25,8 @@ class GooIm(SimpleHoster):
def setup(self):
- self.multiDL = self.resumeDownload = True
+ self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/IfileIt.py b/module/plugins/hoster/IfileIt.py
index b7e37457d..2dae4cd80 100644
--- a/module/plugins/hoster/IfileIt.py
+++ b/module/plugins/hoster/IfileIt.py
@@ -27,27 +27,30 @@ class IfileIt(SimpleHoster):
def handleFree(self):
- ukey = re.match(self.__pattern__, self.pyfile.url).group(1)
- json_url = 'http://ifile.it/new_download-request.json'
+ ukey = re.match(self.__pattern__, self.pyfile.url).group(1)
+ json_url = 'http://ifile.it/new_download-request.json'
post_data = {"ukey": ukey, "ab": "0"}
+ res = json_loads(self.load(json_url, post=post_data))
- json_response = json_loads(self.load(json_url, post=post_data))
- self.logDebug(json_response)
- if json_response['status'] == 3:
+ self.logDebug(res)
+
+ if res['status'] == 3:
self.offline()
- if json_response['captcha']:
+ if res['captcha']:
captcha_key = re.search(self.RECAPTCHA_PATTERN, self.html).group(1)
recaptcha = ReCaptcha(self)
post_data['ctype'] = "recaptcha"
for _i in xrange(5):
- post_data['recaptcha_challenge'], post_data['recaptcha_response'] = recaptcha.challenge(captcha_key)
- json_response = json_loads(self.load(json_url, post=post_data))
- self.logDebug(json_response)
+ challenge, response = recaptcha.challenge(captcha_key)
+ post_data.update({'recaptcha_challenge': challenge,
+ 'recaptcha_response' : response})
+ res = json_loads(self.load(json_url, post=post_data))
+ self.logDebug(res)
- if json_response['retry']:
+ if res['retry']:
self.invalidCaptcha()
else:
self.correctCaptcha()
@@ -55,10 +58,10 @@ class IfileIt(SimpleHoster):
else:
self.fail(_("Incorrect captcha"))
- if not "ticket_url" in json_response:
+ if not "ticket_url" in res:
self.error(_("No download URL"))
- self.download(json_response['ticket_url'])
+ self.download(res['ticket_url'])
getInfo = create_getInfo(IfileIt)
diff --git a/module/plugins/hoster/JumbofilesCom.py b/module/plugins/hoster/JumbofilesCom.py
index d566ec0e2..2df639ac1 100644
--- a/module/plugins/hoster/JumbofilesCom.py
+++ b/module/plugins/hoster/JumbofilesCom.py
@@ -23,7 +23,8 @@ class JumbofilesCom(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
+ self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/Keep2shareCc.py b/module/plugins/hoster/Keep2shareCc.py
index cb5e65a29..d98fa3c09 100644
--- a/module/plugins/hoster/Keep2shareCc.py
+++ b/module/plugins/hoster/Keep2shareCc.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import _isDirectLink, SimpleHoster, cr
class Keep2shareCc(SimpleHoster):
__name__ = "Keep2shareCc"
__type__ = "hoster"
- __version__ = "0.16"
+ __version__ = "0.17"
__pattern__ = r'https?://(?:www\.)?(keep2share|k2s|keep2s)\.cc/file/(?P<ID>\w+)'
@@ -23,8 +23,6 @@ class Keep2shareCc(SimpleHoster):
URL_REPLACEMENTS = [(__pattern__ + ".*", "http://k2s.cc/file/\g<ID>")]
- CONTENT_DISPOSITION = True
-
NAME_PATTERN = r'File: <span>(?P<N>.+)</span>'
SIZE_PATTERN = r'Size: (?P<S>[^<]+)</div>'
@@ -87,13 +85,7 @@ class Keep2shareCc(SimpleHoster):
if m is None:
self.error(_("LINK_FREE_PATTERN not found"))
- self.link = self._getDownloadLink(m.group(1))
-
-
- def handlePremium(self):
- super(Keep2shareCc, self).handlePremium()
- if self.link:
- self.link = self._getDownloadLink(self.link)
+ self.link = m.group(1)
def handleCaptcha(self):
@@ -125,11 +117,16 @@ class Keep2shareCc(SimpleHoster):
self.fail(_("All captcha attempts failed"))
- def _getDownloadLink(self, url):
- p = urlparse(self.pyfile.url)
+ def downloadLink(self, link):
+ if not link:
+ return
+
+ p = urlparse(self.pyfile.url)
base = "%s://%s" % (p.scheme, p.netloc)
- link = _isDirectLink(self, url, self.premium)
- return urljoin(base, link) if link else ""
+ link = _isDirectLink(self, link, self.premium)
+
+ if link:
+ self.download(urljoin(base, link), disposition=True)
getInfo = create_getInfo(Keep2shareCc)
diff --git a/module/plugins/hoster/KingfilesNet.py b/module/plugins/hoster/KingfilesNet.py
index 202ab4a77..13cbf4781 100644
--- a/module/plugins/hoster/KingfilesNet.py
+++ b/module/plugins/hoster/KingfilesNet.py
@@ -30,23 +30,23 @@ class KingfilesNet(SimpleHoster):
def setup(self):
- self.multiDL = True
self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
# Click the free user button
- post_data = {'op': "download1",
- 'usr_login': "",
- 'id': self.info['pattern']['ID'],
- 'fname': self.pyfile.name,
- 'referer': "",
+ post_data = {'op' : "download1",
+ 'usr_login' : "",
+ 'id' : self.info['pattern']['ID'],
+ 'fname' : self.pyfile.name,
+ 'referer' : "",
'method_free': "+"}
self.html = self.load(self.pyfile.url, post=post_data, cookies=True, decode=True)
solvemedia = SolveMedia(self)
- captcha_challenge, captcha_response = solvemedia.challenge()
+ challenge, response = solvemedia.challenge()
# Make the downloadlink appear and load the file
m = re.search(self.RAND_ID_PATTERN, self.html)
@@ -56,15 +56,15 @@ class KingfilesNet(SimpleHoster):
rand = m.group(1)
self.logDebug("rand = ", rand)
- post_data = {'op': "download2",
- 'id': self.info['pattern']['ID'],
- 'rand': rand,
- 'referer': self.pyfile.url,
- 'method_free': "+",
- 'method_premium': "",
- 'adcopy_response': captcha_response,
- 'adcopy_challenge': captcha_challenge,
- 'down_direct': "1"}
+ post_data = {'op' : "download2",
+ 'id' : self.info['pattern']['ID'],
+ 'rand' : rand,
+ 'referer' : self.pyfile.url,
+ 'method_free' : "+",
+ 'method_premium' : "",
+ 'adcopy_response' : response,
+ 'adcopy_challenge': challenge,
+ 'down_direct' : "1"}
self.html = self.load(self.pyfile.url, post=post_data, cookies=True, decode=True)
diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py
index 4e55496c6..0a5b26410 100644
--- a/module/plugins/hoster/LoadTo.py
+++ b/module/plugins/hoster/LoadTo.py
@@ -58,9 +58,12 @@ class LoadTo(SimpleHoster):
if captcha_key is None:
self.download(download_url)
else:
- captcha_challenge, captcha_response = solvemedia.challenge(captcha_key)
- self.download(download_url, post={"adcopy_challenge": captcha_challenge, "adcopy_response": captcha_response})
+ challenge, response = solvemedia.challenge(captcha_key)
+
+ self.download(download_url, post={"adcopy_challenge": challenge, "adcopy_response": response})
+
check = self.checkDownload({'404': re.compile("\A<h1>404 Not Found</h1>"), 'html': re.compile("html")})
+
if check == "404":
self.invalidCaptcha()
self.retry()
diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py
index 3ed1199f6..cdfa410a9 100644
--- a/module/plugins/hoster/MediafireCom.py
+++ b/module/plugins/hoster/MediafireCom.py
@@ -117,6 +117,8 @@ class MediafireCom(SimpleHoster):
def checkCaptcha(self):
solvemedia = SolveMedia(self)
- captcha_challenge, captcha_response = solvemedia.challenge()
- self.html = self.load(self.url, post={"adcopy_challenge": captcha_challenge,
- "adcopy_response": captcha_response}, decode=True)
+ challenge, response = solvemedia.challenge()
+ self.html = self.load(self.url,
+ post={'adcopy_challenge': challenge,
+ 'adcopy_response' : response},
+ decode=True)
diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py
index 2129fbfc8..385295d42 100644
--- a/module/plugins/hoster/MegaCoNz.py
+++ b/module/plugins/hoster/MegaCoNz.py
@@ -14,6 +14,34 @@ from pycurl import SSL_CIPHER_LIST
from module.common.json_layer import json_loads, json_dumps
from module.plugins.Hoster import Hoster
+############################ General errors ###################################
+# EINTERNAL (-1): An internal error has occurred. Please submit a bug report, detailing the exact circumstances in which this error occurred
+# EARGS (-2): You have passed invalid arguments to this command
+# EAGAIN (-3): (always at the request level) A temporary congestion or server malfunction prevented your request from being processed. No data was altered. Retry. Retries must be spaced with exponential backoff
+# ERATELIMIT (-4): You have exceeded your command weight per time quota. Please wait a few seconds, then try again (this should never happen in sane real-life applications)
+#
+############################ Upload errors ####################################
+# EFAILED (-5): The upload failed. Please restart it from scratch
+# ETOOMANY (-6): Too many concurrent IP addresses are accessing this upload target URL
+# ERANGE (-7): The upload file packet is out of range or not starting and ending on a chunk boundary
+# EEXPIRED (-8): The upload target URL you are trying to access has expired. Please request a fresh one
+#
+############################ Stream/System errors #############################
+# ENOENT (-9): Object (typically, node or user) not found
+# ECIRCULAR (-10): Circular linkage attempted
+# EACCESS (-11): Access violation (e.g., trying to write to a read-only share)
+# EEXIST (-12): Trying to create an object that already exists
+# EINCOMPLETE (-13): Trying to access an incomplete resource
+# EKEY (-14): A decryption operation failed (never returned by the API)
+# ESID (-15): Invalid or expired user session, please relogin
+# EBLOCKED (-16): User blocked
+# EOVERQUOTA (-17): Request over quota
+# ETEMPUNAVAIL (-18): Resource temporarily not available, please try again later
+# ETOOMANYCONNECTIONS (-19): Too many connections on this resource
+# EWRITE (-20): Write failed
+# EREAD (-21): Read failed
+# EAPPKEY (-22): Invalid application key; request not processed
+
class MegaCoNz(Hoster):
__name__ = "MegaCoNz"
@@ -26,8 +54,7 @@ class MegaCoNz(Hoster):
__license__ = "GPLv3"
__authors__ = [("RaNaN", "ranan@pyload.org")]
-
- API_URL = "https://g.api.mega.co.nz/cs?id=%d"
+ API_URL = "https://g.api.mega.co.nz/cs"
FILE_SUFFIX = ".crypted"
@@ -48,7 +75,7 @@ class MegaCoNz(Hoster):
# generate a session id, no idea where to obtain elsewhere
uid = random.randint(10 << 9, 10 ** 10)
- res = self.load(self.API_URL % uid, post=json_dumps([kwargs]))
+ res = self.load(self.API_URL, get={'id': uid}, post=json_dumps([kwargs]))
self.logDebug("Api Response: " + res)
return json_loads(res)
diff --git a/module/plugins/hoster/MegaDebridEu.py b/module/plugins/hoster/MegaDebridEu.py
index 4d1e1bcb7..f63a7b3c6 100644
--- a/module/plugins/hoster/MegaDebridEu.py
+++ b/module/plugins/hoster/MegaDebridEu.py
@@ -11,7 +11,7 @@ from module.plugins.Hoster import Hoster
class MegaDebridEu(Hoster):
__name__ = "MegaDebridEu"
__type__ = "hoster"
- __version__ = "0.4"
+ __version__ = "0.40"
__pattern__ = r'^https?://(?:w{3}\d+\.mega-debrid\.eu|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/download/file/[^/]+/.+$'
diff --git a/module/plugins/hoster/MegasharesCom.py b/module/plugins/hoster/MegasharesCom.py
index 6b1472dd8..9d8441c6f 100644
--- a/module/plugins/hoster/MegasharesCom.py
+++ b/module/plugins/hoster/MegasharesCom.py
@@ -36,7 +36,7 @@ class MegasharesCom(SimpleHoster):
def setup(self):
self.resumeDownload = True
- self.multiDL = self.premium
+ self.multiDL = self.premium
def handlePremium(self):
@@ -55,15 +55,18 @@ class MegasharesCom(SimpleHoster):
for _i in xrange(5):
random_num = re.search(self.REACTIVATE_NUM_PATTERN, self.html).group(1)
- verifyinput = self.decryptCaptcha(
- "http://d01.megashares.com/index.php?secgfx=gfx&random_num=%s" % random_num)
+ verifyinput = self.decryptCaptcha("http://d01.megashares.com/index.php",
+ get={'secgfx': "gfx", 'random_num': random_num})
+
self.logInfo(_("Reactivating passport %s: %s %s") % (passport_num, random_num, verifyinput))
- url = ("http://d01.megashares.com%s&rs=check_passport_renewal" % request_uri +
- "&rsargs[]=%s&rsargs[]=%s&rsargs[]=%s" % (verifyinput, random_num, passport_num) +
- "&rsargs[]=replace_sec_pprenewal&rsrnd=%s" % str(int(time() * 1000)))
- self.logDebug(url)
- res = self.load(url)
+ res = self.load("http://d01.megashares.com%s" % request_uri,
+ get={'rs' : "check_passport_renewal",
+ 'rsargs[]': verifyinput,
+ 'rsargs[]': random_num,
+ 'rsargs[]': passport_num,
+ 'rsargs[]': "replace_sec_pprenewal",
+ 'rsrnd[]' : str(int(time() * 1000))})
if 'Thank you for reactivating your passport.' in res:
self.correctCaptcha()
diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py
index 10628149f..fc866e2b1 100644
--- a/module/plugins/hoster/MultishareCz.py
+++ b/module/plugins/hoster/MultishareCz.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class MultishareCz(SimpleHoster):
__name__ = "MultishareCz"
__type__ = "hoster"
- __version__ = "0.34"
+ __version__ = "0.35"
__pattern__ = r'http://(?:www\.)?multishare\.cz/stahnout/(?P<ID>\d+).*'
@@ -19,10 +19,13 @@ class MultishareCz(SimpleHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- INFO_PATTERN = ur'(?:<li>Název|Soubor): <strong>(?P<N>[^<]+)</strong><(?:/li><li|br)>Velikost: <strong>(?P<S>[^<]+)</strong>'
- OFFLINE_PATTERN = ur'<h1>Stáhnout soubor</h1><p><strong>Požadovaný soubor neexistuje.</strong></p>'
SIZE_REPLACEMENTS = [('&nbsp;', '')]
+ MULTI_HOSTER = True
+
+ INFO_PATTERN = ur'(?:<li>Název|Soubor): <strong>(?P<N>[^<]+)</strong><(?:/li><li|br)>Velikost: <strong>(?P<S>[^<]+)</strong>'
+ OFFLINE_PATTERN = ur'<h1>Stáhnout soubor</h1><p><strong>Požadovaný soubor neexistuje.</strong></p>'
+
def process(self, pyfile):
msurl = re.match(self.__pattern__, pyfile.url)
diff --git a/module/plugins/hoster/MyvideoDe.py b/module/plugins/hoster/MyvideoDe.py
index d4a85c8c0..8af4a9a61 100644
--- a/module/plugins/hoster/MyvideoDe.py
+++ b/module/plugins/hoster/MyvideoDe.py
@@ -9,7 +9,7 @@ from module.unescape import unescape
class MyvideoDe(Hoster):
__name__ = "MyvideoDe"
__type__ = "hoster"
- __version__ = "0.9"
+ __version__ = "0.90"
__pattern__ = r'http://(?:www\.)?myvideo\.de/watch/'
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py
index b866b51c5..f5c5ee802 100644
--- a/module/plugins/hoster/NetloadIn.py
+++ b/module/plugins/hoster/NetloadIn.py
@@ -14,7 +14,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha
def getInfo(urls):
## returns list of tupels (name, size (in bytes), status (see FileDatabase), url)
- apiurl = "http://api.netload.in/info.php?auth=Zf9SnQh9WiReEsb18akjvQGqT0I830e8&bz=1&md5=1&file_id="
+ apiurl = "http://api.netload.in/info.php"
id_regex = re.compile(NetloadIn.__pattern__)
urls_per_query = 80
@@ -25,7 +25,12 @@ def getInfo(urls):
if match:
ids = ids + match.group(1) + ";"
- api = getURL(apiurl + ids, decode=True)
+ api = getURL(apiurl,
+ get={'auth' : "Zf9SnQh9WiReEsb18akjvQGqT0I830e8",
+ 'bz' : 1,
+ 'md5' : 1,
+ 'file_id': ids},
+ decode=True)
if api is None or len(api) < 10:
self.logDebug("Prefetch failed")
@@ -91,7 +96,7 @@ class NetloadIn(Hoster):
if self.premium:
self.logDebug("Use Premium Account")
- settings = self.load("http://www.netload.in/index.php?id=2&lang=en")
+ settings = self.load("http://www.netload.in/index.php", get={'id': 2, 'lang': "en"})
if '<option value="2" selected="selected">Direkter Download' in settings:
self.logDebug("Using direct download")
diff --git a/module/plugins/hoster/NowDownloadEu.py b/module/plugins/hoster/NowDownloadSx.py
index 287026460..d2ae08954 100644
--- a/module/plugins/hoster/NowDownloadEu.py
+++ b/module/plugins/hoster/NowDownloadSx.py
@@ -6,14 +6,14 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
from module.utils import fixup
-class NowDownloadEu(SimpleHoster):
- __name__ = "NowDownloadEu"
+class NowDownloadSx(SimpleHoster):
+ __name__ = "NowDownloadSx"
__type__ = "hoster"
__version__ = "0.05"
__pattern__ = r'http://(?:www\.)?nowdownload\.(at|ch|co|eu|sx)/(dl/|download\.php\?id=)\w+'
- __description__ = """NowDownload.at hoster plugin"""
+ __description__ = """NowDownload.sx hoster plugin"""
__license__ = "GPLv3"
__authors__ = [("godofdream", "soilfiction@gmail.com"),
("Walter Purcaro", "vuolter@gmail.com")]
@@ -25,14 +25,15 @@ class NowDownloadEu(SimpleHoster):
TOKEN_PATTERN = r'"(/api/token\.php\?token=\w+)"'
CONTINUE_PATTERN = r'"(/dl2/\w+/\w+)"'
WAIT_PATTERN = r'\.countdown\(\{until: \+(\d+),'
- LINK_PATTERN = r'"(http://f\d+\.nowdownload\.at/dl/\w+/\w+)'
+ LINK_PATTERN = r'(http://s\d+\.coolcdn\.info/nowdownload/.+?)["\']'
NAME_REPLACEMENTS = [("&#?\w+;", fixup), (r'<[^>]*>', '')]
def setup(self):
- self.multiDL = self.resumeDownload = True
- self.chunkLimit = -1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = -1
def handleFree(self):
@@ -60,4 +61,4 @@ class NowDownloadEu(SimpleHoster):
self.download(str(url.group(1)))
-getInfo = create_getInfo(NowDownloadEu)
+getInfo = create_getInfo(NowDownloadSx)
diff --git a/module/plugins/hoster/NowVideoAt.py b/module/plugins/hoster/NowVideoSx.py
index 3d9b706d3..b59bd79da 100644
--- a/module/plugins/hoster/NowVideoAt.py
+++ b/module/plugins/hoster/NowVideoSx.py
@@ -5,14 +5,14 @@ import re
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-class NowVideoAt(SimpleHoster):
- __name__ = "NowVideoAt"
+class NowVideoSx(SimpleHoster):
+ __name__ = "NowVideoSx"
__type__ = "hoster"
__version__ = "0.07"
__pattern__ = r'http://(?:www\.)?nowvideo\.(at|ch|co|eu|sx)/(video|mobile/#/videos)/(?P<ID>\w+)'
- __description__ = """NowVideo.at hoster plugin"""
+ __description__ = """NowVideo.sx hoster plugin"""
__license__ = "GPLv3"
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
@@ -27,8 +27,8 @@ class NowVideoAt(SimpleHoster):
def setup(self):
- self.multiDL = True
self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
@@ -41,4 +41,4 @@ class NowVideoAt(SimpleHoster):
self.download(m.group(1))
-getInfo = create_getInfo(NowVideoAt)
+getInfo = create_getInfo(NowVideoSx)
diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py
index a2a0840c3..588d8f64a 100644
--- a/module/plugins/hoster/OboomCom.py
+++ b/module/plugins/hoster/OboomCom.py
@@ -13,7 +13,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha
class OboomCom(Hoster):
__name__ = "OboomCom"
__type__ = "hoster"
- __version__ = "0.3"
+ __version__ = "0.30"
__pattern__ = r'https?://(?:www\.)?oboom\.com/(#(id=|/)?)?(?P<ID>\w{8})'
diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py
index 977d45b6f..346317271 100644
--- a/module/plugins/hoster/OneFichierCom.py
+++ b/module/plugins/hoster/OneFichierCom.py
@@ -34,7 +34,7 @@ class OneFichierCom(SimpleHoster):
def setup(self):
- self.multiDL = self.premium
+ self.multiDL = self.premium
self.resumeDownload = True
diff --git a/module/plugins/hoster/PornhostCom.py b/module/plugins/hoster/PornhostCom.py
index a6f415043..71342f3e0 100644
--- a/module/plugins/hoster/PornhostCom.py
+++ b/module/plugins/hoster/PornhostCom.py
@@ -8,7 +8,7 @@ from module.plugins.Hoster import Hoster
class PornhostCom(Hoster):
__name__ = "PornhostCom"
__type__ = "hoster"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'http://(?:www\.)?pornhost\.com/(\d+/\d+\.html|\d+)'
diff --git a/module/plugins/hoster/PornhubCom.py b/module/plugins/hoster/PornhubCom.py
index d1b84771f..1bb787f09 100644
--- a/module/plugins/hoster/PornhubCom.py
+++ b/module/plugins/hoster/PornhubCom.py
@@ -8,7 +8,7 @@ from module.plugins.Hoster import Hoster
class PornhubCom(Hoster):
__name__ = "PornhubCom"
__type__ = "hoster"
- __version__ = "0.5"
+ __version__ = "0.50"
__pattern__ = r'http://(?:www\.)?pornhub\.com/view_video\.php\?viewkey=\w+'
diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py
index b4fe327db..9f8037d41 100644
--- a/module/plugins/hoster/PremiumTo.py
+++ b/module/plugins/hoster/PremiumTo.py
@@ -41,9 +41,11 @@ class PremiumTo(Hoster):
#raise timeout to 2min
self.req.setOption("timeout", 120)
- self.download(
- "http://premium.to/api/getfile.php?username=%s&password=%s&link=%s" % (self.account.username, self.account.password, quote(pyfile.url, "")),
- disposition=True)
+ self.download("http://premium.to/api/getfile.php",
+ get={'username': self.account.username,
+ 'password': self.account.password,
+ 'link' : quote(pyfile.url, "")},
+ disposition=True)
check = self.checkDownload({"nopremium": "No premium account available"})
diff --git a/module/plugins/hoster/PremiumizeMe.py b/module/plugins/hoster/PremiumizeMe.py
index 70abdfcc2..bf00325d9 100644
--- a/module/plugins/hoster/PremiumizeMe.py
+++ b/module/plugins/hoster/PremiumizeMe.py
@@ -36,10 +36,11 @@ class PremiumizeMe(Hoster):
(user, data) = self.account.selectAccount()
# Get rewritten link using the premiumize.me api v1 (see https://secure.premiumize.me/?show=api)
- answer = self.load(
- "https://api.premiumize.me/pm-api/v1.php?method=directdownloadlink&params[login]=%s&params[pass]=%s&params[link]=%s" % (
- user, data['password'], pyfile.url))
- data = json_loads(answer)
+ data = json_loads(self.load("https://api.premiumize.me/pm-api/v1.php",
+ get={'method' : "directdownloadlink",
+ 'params[login]': user,
+ 'params[pass]' : data['password'],
+ 'params[link]' : pyfile.url}))
# Check status and decide what to do
status = data['status']
diff --git a/module/plugins/hoster/RPNetBiz.py b/module/plugins/hoster/RPNetBiz.py
index c1e536d39..c4c16cf3c 100644
--- a/module/plugins/hoster/RPNetBiz.py
+++ b/module/plugins/hoster/RPNetBiz.py
@@ -9,7 +9,7 @@ from module.common.json_layer import json_loads
class RPNetBiz(Hoster):
__name__ = "RPNetBiz"
__type__ = "hoster"
- __version__ = "0.1"
+ __version__ = "0.10"
__description__ = """RPNet.biz hoster plugin"""
__license__ = "GPLv3"
diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py
index 6f3f7950a..cc11fa7c7 100644
--- a/module/plugins/hoster/RapidgatorNet.py
+++ b/module/plugins/hoster/RapidgatorNet.py
@@ -55,7 +55,7 @@ class RapidgatorNet(SimpleHoster):
self.premium = True
self.resumeDownload = self.multiDL = self.premium
- self.chunkLimit = 1
+ self.chunkLimit = 1
def api_response(self, cmd):
@@ -129,13 +129,11 @@ class RapidgatorNet(SimpleHoster):
break
else:
captcha, captcha_key = self.getCaptcha()
- captcha_challenge, captcha_response = captcha.challenge(captcha_key)
+ challenge, response = captcha.challenge(captcha_key)
- self.html = self.load(url, post={
- "DownloadCaptchaForm[captcha]": "",
- "adcopy_challenge": captcha_challenge,
- "adcopy_response": captcha_response
- })
+ self.html = self.load(url, post={'DownloadCaptchaForm[captcha]': "",
+ 'adcopy_challenge' : challenge,
+ 'adcopy_response' : response})
if "The verification code is incorrect" in self.html:
self.invalidCaptcha()
diff --git a/module/plugins/hoster/RapidshareCom.py b/module/plugins/hoster/RapidshareCom.py
deleted file mode 100644
index 4ec5af67a..000000000
--- a/module/plugins/hoster/RapidshareCom.py
+++ /dev/null
@@ -1,228 +0,0 @@
-# -*- coding: utf-8 -*-
-
-import re
-
-from module.network.RequestFactory import getURL
-from module.plugins.Hoster import Hoster
-
-
-def getInfo(urls):
- ids = ""
- names = ""
-
- p = re.compile(RapidshareCom.__pattern__)
-
- for url in urls:
- r = p.search(url)
- if r.group("name"):
- ids += "," + r.group("id")
- names += "," + r.group("name")
- elif r.group("name_new"):
- ids += "," + r.group("id_new")
- names += "," + r.group("name_new")
-
- url = "http://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=checkfiles&files=%s&filenames=%s" % (ids[1:], names[1:])
-
- api = getURL(url)
- result = []
- i = 0
- for res in api.split():
- tmp = res.split(",")
- if tmp[4] in ("0", "4", "5"):
- status = 1
- elif tmp[4] == "1":
- status = 2
- else:
- status = 3
-
- result.append((tmp[1], tmp[2], status, urls[i]))
- i += 1
-
- yield result
-
-
-class RapidshareCom(Hoster):
- __name__ = "RapidshareCom"
- __type__ = "hoster"
- __version__ = "1.40"
-
- __pattern__ = r'https?://(?:www\.)?rapidshare\.com/(?:files/(?P<id>\d+)/(?P<name>[^?]+)|#!download\|(?:\w+)\|(?P<id_new>\d+)\|(?P<name_new>[^|]+))'
-
- __description__ = """Rapidshare.com hoster plugin"""
- __license__ = "GPLv3"
- __authors__ = [("spoob", "spoob@pyload.org"),
- ("RaNaN", "ranan@pyload.org"),
- ("mkaay", "mkaay@mkaay.de")]
-
-
- def setup(self):
- self.no_download = True
- self.api_data = None
- self.offset = 0
- self.dl_dict = {}
-
- self.id = None
- self.name = None
-
- self.chunkLimit = -1 if self.premium else 1
- self.multiDL = self.resumeDownload = self.premium
-
-
- def process(self, pyfile):
- self.url = pyfile.url
- self.prepare()
-
-
- def prepare(self):
- m = re.match(self.__pattern__, self.url)
-
- if m.group("name"):
- self.id = m.group("id")
- self.name = m.group("name")
- else:
- self.id = m.group("id_new")
- self.name = m.group("name_new")
-
- self.download_api_data()
- if self.api_data['status'] == "1":
- self.pyfile.name = self.get_file_name()
-
- if self.premium:
- self.handlePremium()
- else:
- self.handleFree()
-
- elif self.api_data['status'] == "2":
- self.logInfo(_("Rapidshare: Traffic Share (direct download)"))
- self.pyfile.name = self.get_file_name()
-
- self.download(self.pyfile.url, get={"directstart": 1})
-
- elif self.api_data['status'] in ("0", "4", "5"):
- self.offline()
- elif self.api_data['status'] == "3":
- self.tempOffline()
- else:
- self.error(_("Unknown response code"))
-
-
- def handleFree(self):
- while self.no_download:
- self.dl_dict = self.freeWait()
-
- #tmp = "#!download|%(server)s|%(id)s|%(name)s|%(size)s"
- download = "http://%(host)s/cgi-bin/rsapi.cgi?sub=download&editparentlocation=0&bin=1&fileid=%(id)s&filename=%(name)s&dlauth=%(auth)s" % self.dl_dict
-
- self.logDebug("RS API Request: %s" % download)
- self.download(download, ref=False)
-
- check = self.checkDownload({"ip": "You need RapidPro to download more files from your IP address",
- "auth": "Download auth invalid"})
- if check == "ip":
- self.setWait(60)
- self.logInfo(_("Already downloading from this ip address, waiting 60 seconds"))
- self.wait()
- self.handleFree()
- elif check == "auth":
- self.logInfo(_("Invalid Auth Code, download will be restarted"))
- self.offset += 5
- self.handleFree()
-
-
- def handlePremium(self):
- info = self.account.getAccountInfo(self.user, True)
- self.logDebug("Use Premium Account")
- url = self.api_data['mirror']
- self.download(url, get={"directstart": 1})
-
-
- def download_api_data(self, force=False):
- """
- http://images.rapidshare.com/apidoc.txt
- """
- if self.api_data and not force:
- return
- api_url_base = "http://api.rapidshare.com/cgi-bin/rsapi.cgi"
- api_param_file = {"sub": "checkfiles", "incmd5": "1", "files": self.id, "filenames": self.name}
- html = self.load(api_url_base, cookies=False, get=api_param_file).strip()
- self.logDebug("RS INFO API: %s" % html)
- if html.startswith("ERROR"):
- return
- fields = html.split(",")
-
- # status codes:
- # 0=File not found
- # 1=File OK (Anonymous downloading)
- # 3=Server down
- # 4=File marked as illegal
- # 5=Anonymous file locked, because it has more than 10 downloads already
- # 50+n=File OK (TrafficShare direct download type "n" without any logging.)
- # 100+n=File OK (TrafficShare direct download type "n" with logging.
- # Read our privacy policy to see what is logged.)
-
- self.api_data = {"fileid": fields[0], "filename": fields[1], "size": int(fields[2]), "serverid": fields[3],
- "status": fields[4], "shorthost": fields[5], "checksum": fields[6].strip().lower()}
-
- if int(self.api_data['status']) > 100:
- self.api_data['status'] = str(int(self.api_data['status']) - 100)
- elif int(self.api_data['status']) > 50:
- self.api_data['status'] = str(int(self.api_data['status']) - 50)
-
- self.api_data['mirror'] = "http://rs%(serverid)s%(shorthost)s.rapidshare.com/files/%(fileid)s/%(filename)s" % self.api_data
-
-
- def freeWait(self):
- """downloads html with the important information
- """
- self.no_download = True
-
- id = self.id
- name = self.name
-
- prepare = "https://api.rapidshare.com/cgi-bin/rsapi.cgi?sub=download&fileid=%(id)s&filename=%(name)s&try=1&cbf=RSAPIDispatcher&cbid=1" % {
- "name": name, "id": id}
-
- self.logDebug("RS API Request: %s" % prepare)
- result = self.load(prepare, ref=False)
- self.logDebug("RS API Result: %s" % result)
-
- between_wait = re.search("You need to wait (\d+) seconds", result)
-
- if "You need RapidPro to download more files from your IP address" in result:
- self.setWait(60)
- self.logInfo(_("Already downloading from this ip address, waiting 60 seconds"))
- self.wait()
- elif ("Too many users downloading from this server right now" in result or
- "All free download slots are full" in result):
- self.setWait(120)
- self.logInfo(_("RapidShareCom: No free slots"))
- self.wait()
- elif "This file is too big to download it for free" in result:
- self.fail(_("You need a premium account for this file"))
- elif "Filename invalid." in result:
- self.fail(_("Filename reported invalid"))
- elif between_wait:
- self.setWait(int(between_wait.group(1)), True)
- self.wait()
- else:
- self.no_download = False
-
- tmp, info = result.split(":")
- data = info.split(",")
-
- dl_dict = {"id": id,
- "name": name,
- "host": data[0],
- "auth": data[1],
- "server": self.api_data['serverid'],
- "size": self.api_data['size']}
- self.setWait(int(data[2]) + 2 + self.offset)
- self.wait()
-
- return dl_dict
-
-
- def get_file_name(self):
- if self.api_data['filename']:
- return self.api_data['filename']
- return self.url.split("/")[-1]
diff --git a/module/plugins/hoster/RapiduNet.py b/module/plugins/hoster/RapiduNet.py
index e14b18a4f..a3b2cffcd 100644
--- a/module/plugins/hoster/RapiduNet.py
+++ b/module/plugins/hoster/RapiduNet.py
@@ -57,12 +57,12 @@ class RapiduNet(SimpleHoster):
recaptcha = ReCaptcha(self)
for _i in xrange(10):
- challenge, code = recaptcha.challenge(self.RECAPTCHA_KEY)
+ challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY)
jsvars = self.getJsonResponse("https://rapidu.net/ajax.php?a=getCheckCaptcha",
{'_go' : None,
'captcha1': challenge,
- 'captcha2': code,
+ 'captcha2': response,
'fileId' : self.info['ID']})
if jsvars['message'] == 'success':
self.download(jsvars['url'])
@@ -70,13 +70,13 @@ class RapiduNet(SimpleHoster):
def getJsonResponse(self, url, post_data):
- response = self.load(url, post=post_data, decode=True)
- if not response.startswith('{'):
+ res = self.load(url, post=post_data, decode=True)
+ if not res.startswith('{'):
self.retry()
- self.logDebug(url, response)
+ self.logDebug(url, res)
- return json_loads(response)
+ return json_loads(res)
getInfo = create_getInfo(RapiduNet)
diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py
index db19a9217..cc6dd49c3 100644
--- a/module/plugins/hoster/RealdebridCom.py
+++ b/module/plugins/hoster/RealdebridCom.py
@@ -52,10 +52,11 @@ class RealdebridCom(Hoster):
else:
password = password[0]
- url = "https://real-debrid.com/ajax/unrestrict.php?lang=en&link=%s&password=%s&time=%s" % (
- quote(pyfile.url, ""), password, int(time() * 1000))
- page = self.load(url)
- data = json_loads(page)
+ data = json_loads(self.load("https://real-debrid.com/ajax/unrestrict.php",
+ get={'lang' : "en",
+ 'link' : quote(pyfile.url, ""),
+ 'password': password,
+ 'time' : int(time() * 1000)}))
self.logDebug("Returned Data: %s" % data)
diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py
index 5bf624273..d68fbe262 100644
--- a/module/plugins/hoster/RedtubeCom.py
+++ b/module/plugins/hoster/RedtubeCom.py
@@ -9,7 +9,7 @@ from module.unescape import unescape
class RedtubeCom(Hoster):
__name__ = "RedtubeCom"
__type__ = "hoster"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'http://(?:www\.)?redtube\.com/\d+'
diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py
index 07755cb9c..7cde01025 100644
--- a/module/plugins/hoster/RehostTo.py
+++ b/module/plugins/hoster/RehostTo.py
@@ -35,9 +35,10 @@ class RehostTo(Hoster):
long_ses = data['long_ses']
self.logDebug("Rehost.to: Old URL: %s" % pyfile.url)
- new_url = "http://rehost.to/process_download.php?user=cookie&pass=%s&dl=%s" % (long_ses, quote(pyfile.url, ""))
#raise timeout to 2min
self.req.setOption("timeout", 120)
- self.download(new_url, disposition=True)
+ self.download("http://rehost.to/process_download.php",
+ get={'user': "cookie", 'pass': long_ses, 'dl': quote(pyfile.url, "")},
+ disposition=True)
diff --git a/module/plugins/hoster/RgHostNet.py b/module/plugins/hoster/RgHostNet.py
index 982e18eda..aa4830563 100644
--- a/module/plugins/hoster/RgHostNet.py
+++ b/module/plugins/hoster/RgHostNet.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class RgHostNet(SimpleHoster):
__name__ = "RgHostNet"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'http://(?:www\.)?rghost\.net/\d+(?:r=\d+)?'
@@ -17,17 +17,10 @@ class RgHostNet(SimpleHoster):
__authors__ = [("z00nx", "z00nx0@gmail.com")]
- INFO_PATTERN = r'<h1>\s+(<a[^>]+>)?(?P<N>[^<]+)(</a>)?\s+<small[^>]+>\s+\((?P<S>[^)]+)\)\s+</small>\s+</h1>'
+ INFO_PATTERN = r'<h1>\s+(<a[^>]+>)?(?P<N>[^<]+)(</a>)?\s+<small[^>]+>\s+\((?P<S>[^)]+)\)\s+</small>\s+</h1>'
OFFLINE_PATTERN = r'File is deleted|this page is not found'
- LINK_PATTERN = r'''<a\s+href="([^"]+)"\s+class="btn\s+large\s+download"[^>]+>Download</a>'''
-
- def handleFree(self):
- m = re.search(self.LINK_PATTERN, self.html)
- if m is None:
- self.error(_("LINK_PATTERN not found"))
- download_link = m.group(1)
- self.download(download_link, disposition=True)
+ LINK_FREE_PATTERN = r'<a\s+href="([^"]+)"\s+class="btn\s+large\s+download"[^>]+>Download</a>'
getInfo = create_getInfo(RgHostNet)
diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py
index 17330c5f9..bc37f45c8 100644
--- a/module/plugins/hoster/SimplyPremiumCom.py
+++ b/module/plugins/hoster/SimplyPremiumCom.py
@@ -34,7 +34,7 @@ class SimplyPremiumCom(Hoster):
else:
self.logDebug("Old URL: %s" % pyfile.url)
for i in xrange(5):
- page = self.load('http://www.simply-premium.com/premium.php?info&link=' + pyfile.url)
+ page = self.load("http://www.simply-premium.com/premium.php", get={'info': "", 'link': pyfile.url})
self.logDebug("JSON data: " + page)
if page != '':
break
diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py
index ac7d7ef9a..0fe4ae0f8 100644
--- a/module/plugins/hoster/SimplydebridCom.py
+++ b/module/plugins/hoster/SimplydebridCom.py
@@ -8,7 +8,7 @@ from module.plugins.Hoster import Hoster
class SimplydebridCom(Hoster):
__name__ = "SimplydebridCom"
__type__ = "hoster"
- __version__ = "0.1"
+ __version__ = "0.10"
__pattern__ = r'http://(?:www\.)?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php/*'
@@ -18,8 +18,9 @@ class SimplydebridCom(Hoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = 1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = 1
def process(self, pyfile):
@@ -46,7 +47,7 @@ class SimplydebridCom(Hoster):
self.logDebug("New URL: %s" % new_url)
if not re.match(self.__pattern__, new_url):
- page = self.load('http://simply-debrid.com/api.php', get={'dl': new_url}) # +'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password'])
+ page = self.load("http://simply-debrid.com/api.php", get={'dl': new_url}) # +'&u='+self.user+'&p='+self.account.getAccountData(self.user)['password'])
if 'tiger Link' in page or 'Invalid Link' in page or ('API' in page and 'ERROR' in page):
self.fail(_("Unable to unrestrict link"))
new_url = page
diff --git a/module/plugins/hoster/SoundcloudCom.py b/module/plugins/hoster/SoundcloudCom.py
index 71cfb6b27..79c8a2f1e 100644
--- a/module/plugins/hoster/SoundcloudCom.py
+++ b/module/plugins/hoster/SoundcloudCom.py
@@ -9,7 +9,7 @@ from module.plugins.Hoster import Hoster
class SoundcloudCom(Hoster):
__name__ = "SoundcloudCom"
__type__ = "hoster"
- __version__ = "0.1"
+ __version__ = "0.10"
__pattern__ = r'https?://(?:www\.)?soundcloud\.com/(?P<UID>.*?)/(?P<SID>.*)'
diff --git a/module/plugins/hoster/StreamCz.py b/module/plugins/hoster/StreamCz.py
index 05f2bdee7..6813271d0 100644
--- a/module/plugins/hoster/StreamCz.py
+++ b/module/plugins/hoster/StreamCz.py
@@ -23,7 +23,7 @@ def getInfo(urls):
class StreamCz(Hoster):
__name__ = "StreamCz"
__type__ = "hoster"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'https?://(?:www\.)?stream\.cz/[^/]+/\d+.*'
@@ -39,8 +39,8 @@ class StreamCz(Hoster):
def setup(self):
- self.multiDL = True
self.resumeDownload = True
+ self.multiDL = True
def process(self, pyfile):
diff --git a/module/plugins/hoster/TusfilesNet.py b/module/plugins/hoster/TusfilesNet.py
index 8c80455b4..f1f8cd90a 100644
--- a/module/plugins/hoster/TusfilesNet.py
+++ b/module/plugins/hoster/TusfilesNet.py
@@ -19,7 +19,7 @@ class TusfilesNet(XFSHoster):
HOSTER_DOMAIN = "tusfiles.net"
INFO_PATTERN = r'\](?P<N>.+) - (?P<S>[\d.,]+) (?P<U>[\w^_]+)\['
- OFFLINE_PATTERN = r'>File Not Found|<Title>TusFiles - Fast Sharing Files!'
+ OFFLINE_PATTERN = r'>File Not Found|<Title>TusFiles - Fast Sharing Files!|The file you are trying to download is no longer available'
def setup(self):
diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py
index 5fed652cb..59a8ce6e1 100644
--- a/module/plugins/hoster/TwoSharedCom.py
+++ b/module/plugins/hoster/TwoSharedCom.py
@@ -25,7 +25,8 @@ class TwoSharedCom(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
+ self.resumeDownload = True
+ self.multiDL = True
def handleFree(self):
diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py
index 294bd8e17..262b37c21 100644
--- a/module/plugins/hoster/UlozTo.py
+++ b/module/plugins/hoster/UlozTo.py
@@ -41,7 +41,7 @@ class UlozTo(SimpleHoster):
def setup(self):
- self.multiDL = self.premium
+ self.multiDL = self.premium
self.resumeDownload = True
diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py
index adfa2eb1f..94ce1b845 100644
--- a/module/plugins/hoster/UnrestrictLi.py
+++ b/module/plugins/hoster/UnrestrictLi.py
@@ -80,7 +80,7 @@ class UnrestrictLi(Hoster):
self.download(new_url, disposition=True)
if self.getConfig("history"):
- self.load("https://unrestrict.li/history/&delete=all")
+ self.load("https://unrestrict.li/history/", get={'delete': "all"})
self.logInfo(_("Download history deleted"))
diff --git a/module/plugins/hoster/UploadableCh.py b/module/plugins/hoster/UploadableCh.py
index 77b3d7d8a..3dd796900 100644
--- a/module/plugins/hoster/UploadableCh.py
+++ b/module/plugins/hoster/UploadableCh.py
@@ -53,13 +53,13 @@ class UploadableCh(SimpleHoster):
recaptcha = ReCaptcha(self)
- challenge, captcha = recaptcha.challenge(self.RECAPTCHA_KEY)
+ challenge, response = recaptcha.challenge(self.RECAPTCHA_KEY)
# Submit the captcha solution
self.load("http://www.uploadable.ch/checkReCaptcha.php",
cookies=True,
post={'recaptcha_challenge_field' : challenge,
- 'recaptcha_response_field' : captcha,
+ 'recaptcha_response_field' : response,
'recaptcha_shortencode_field': self.info['ID']},
decode=True)
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index 40fe768e9..833468a80 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -113,7 +113,7 @@ class UploadedTo(Hoster):
def setup(self):
- self.multiDL = self.resumeDownload = self.premium
+ self.multiDL = self.resumeDownload = self.premium
self.chunkLimit = 1 # critical problems with more chunks
self.fileID = getID(self.pyfile.url)
@@ -206,8 +206,8 @@ class UploadedTo(Hoster):
recaptcha = ReCaptcha(self)
for _i in xrange(5):
- challenge, result = recaptcha.challenge()
- options = {"recaptcha_challenge_field": challenge, "recaptcha_response_field": result}
+ challenge, response = recaptcha.challenge()
+ options = {"recaptcha_challenge_field": challenge, "recaptcha_response_field": response}
self.wait()
result = self.load(url, post=options)
diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py
index 239cc92f5..25c424f1f 100644
--- a/module/plugins/hoster/UpstoreNet.py
+++ b/module/plugins/hoster/UpstoreNet.py
@@ -52,9 +52,9 @@ class UpstoreNet(SimpleHoster):
self.wait(wait_time)
# then, handle the captcha
- challenge, code = recaptcha.challenge()
- post_data['recaptcha_challenge_field'] = challenge
- post_data['recaptcha_response_field'] = code
+ challenge, response = recaptcha.challenge()
+ post_data.update({'recaptcha_challenge_field': challenge,
+ 'recaptcha_response_field' : response})
self.html = self.load(self.pyfile.url, post=post_data, decode=True)
diff --git a/module/plugins/hoster/VeohCom.py b/module/plugins/hoster/VeohCom.py
index 8f434203d..6dbac397b 100644
--- a/module/plugins/hoster/VeohCom.py
+++ b/module/plugins/hoster/VeohCom.py
@@ -27,8 +27,9 @@ class VeohCom(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = -1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = -1
def handleFree(self):
diff --git a/module/plugins/hoster/VimeoCom.py b/module/plugins/hoster/VimeoCom.py
index 025abf15e..9e4abf702 100644
--- a/module/plugins/hoster/VimeoCom.py
+++ b/module/plugins/hoster/VimeoCom.py
@@ -29,8 +29,9 @@ class VimeoCom(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = -1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = -1
def handleFree(self):
diff --git a/module/plugins/hoster/Vipleech4uCom.py b/module/plugins/hoster/Vipleech4uCom.py
index 7499294ed..340a3feaa 100644
--- a/module/plugins/hoster/Vipleech4uCom.py
+++ b/module/plugins/hoster/Vipleech4uCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class Vipleech4uCom(DeadHoster):
__name__ = "Vipleech4uCom"
__type__ = "hoster"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'http://(?:www\.)?vipleech4u\.com/manager\.php'
diff --git a/module/plugins/hoster/XVideosCom.py b/module/plugins/hoster/XVideosCom.py
index f70493d04..d9190805d 100644
--- a/module/plugins/hoster/XVideosCom.py
+++ b/module/plugins/hoster/XVideosCom.py
@@ -10,7 +10,7 @@ from module.plugins.Hoster import Hoster
class XVideosCom(Hoster):
__name__ = "XVideos.com"
__type__ = "hoster"
- __version__ = "0.1"
+ __version__ = "0.10"
__pattern__ = r'http://(?:www\.)?xvideos\.com/video(\d+)/.*'
diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py
index 5eb431ec8..4bb2520e6 100644
--- a/module/plugins/hoster/YoupornCom.py
+++ b/module/plugins/hoster/YoupornCom.py
@@ -8,7 +8,7 @@ from module.plugins.Hoster import Hoster
class YoupornCom(Hoster):
__name__ = "YoupornCom"
__type__ = "hoster"
- __version__ = "0.2"
+ __version__ = "0.20"
__pattern__ = r'http://(?:www\.)?youporn\.com/watch/.+'
diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py
index 565aa63f0..bb0737440 100644
--- a/module/plugins/hoster/YoutubeCom.py
+++ b/module/plugins/hoster/YoutubeCom.py
@@ -16,11 +16,11 @@ def which(program):
Courtesy of http://stackoverflow.com/a/377028/675646"""
-
def is_exe(fpath):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
fpath, fname = os.path.split(program)
+
if fpath:
if is_exe(program):
return program
@@ -60,31 +60,32 @@ class YoutubeCom(Hoster):
invalidChars = u'\u2605:?><"|\\'
# name, width, height, quality ranking, 3D
- formats = {5: (".flv", 400, 240, 1, False),
- 6: (".flv", 640, 400, 4, False),
- 17: (".3gp", 176, 144, 0, False),
- 18: (".mp4", 480, 360, 2, False),
- 22: (".mp4", 1280, 720, 8, False),
- 43: (".webm", 640, 360, 3, False),
- 34: (".flv", 640, 360, 4, False),
- 35: (".flv", 854, 480, 6, False),
- 36: (".3gp", 400, 240, 1, False),
- 37: (".mp4", 1920, 1080, 9, False),
- 38: (".mp4", 4096, 3072, 10, False),
- 44: (".webm", 854, 480, 5, False),
- 45: (".webm", 1280, 720, 7, False),
- 46: (".webm", 1920, 1080, 9, False),
- 82: (".mp4", 640, 360, 3, True),
- 83: (".mp4", 400, 240, 1, True),
- 84: (".mp4", 1280, 720, 8, True),
- 85: (".mp4", 1920, 1080, 9, True),
- 100: (".webm", 640, 360, 3, True),
- 101: (".webm", 640, 360, 4, True),
- 102: (".webm", 1280, 720, 8, True)}
+ formats = {5 : (".flv" , 400 , 240 , 1 , False),
+ 6 : (".flv" , 640 , 400 , 4 , False),
+ 17 : (".3gp" , 176 , 144 , 0 , False),
+ 18 : (".mp4" , 480 , 360 , 2 , False),
+ 22 : (".mp4" , 1280, 720 , 8 , False),
+ 43 : (".webm", 640 , 360 , 3 , False),
+ 34 : (".flv" , 640 , 360 , 4 , False),
+ 35 : (".flv" , 854 , 480 , 6 , False),
+ 36 : (".3gp" , 400 , 240 , 1 , False),
+ 37 : (".mp4" , 1920, 1080, 9 , False),
+ 38 : (".mp4" , 4096, 3072, 10, False),
+ 44 : (".webm", 854 , 480 , 5 , False),
+ 45 : (".webm", 1280, 720 , 7 , False),
+ 46 : (".webm", 1920, 1080, 9 , False),
+ 82 : (".mp4" , 640 , 360 , 3 , True ),
+ 83 : (".mp4" , 400 , 240 , 1 , True ),
+ 84 : (".mp4" , 1280, 720 , 8 , True ),
+ 85 : (".mp4" , 1920, 1080, 9 , True ),
+ 100: (".webm", 640 , 360 , 3 , True ),
+ 101: (".webm", 640 , 360 , 4 , True ),
+ 102: (".webm", 1280, 720 , 8 , True )}
def setup(self):
- self.resumeDownload = self.multiDL = True
+ self.resumeDownload = True
+ self.multiDL = True
def process(self, pyfile):
diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py
index 04a395e1e..8d3de5b26 100644
--- a/module/plugins/hoster/ZDF.py
+++ b/module/plugins/hoster/ZDF.py
@@ -11,7 +11,7 @@ from module.plugins.Hoster import Hoster
class ZDF(Hoster):
__name__ = "ZDF Mediathek"
__type__ = "hoster"
- __version__ = "0.8"
+ __version__ = "0.80"
__pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/\D*(\d+)\D*'
diff --git a/module/plugins/hoster/ZeveraCom.py b/module/plugins/hoster/ZeveraCom.py
index 61470f903..fa2f6edb3 100644
--- a/module/plugins/hoster/ZeveraCom.py
+++ b/module/plugins/hoster/ZeveraCom.py
@@ -16,8 +16,9 @@ class ZeveraCom(Hoster):
def setup(self):
- self.resumeDownload = self.multiDL = True
- self.chunkLimit = 1
+ self.resumeDownload = True
+ self.multiDL = True
+ self.chunkLimit = 1
def process(self, pyfile):