summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/CloudzillaTo.py6
-rw-r--r--module/plugins/hoster/CrockoCom.py2
-rw-r--r--module/plugins/hoster/EuroshareEu.py6
-rw-r--r--module/plugins/hoster/FastshareCz.py4
-rw-r--r--module/plugins/hoster/FileSharkPl.py8
-rw-r--r--module/plugins/hoster/FileboomMe.py2
-rw-r--r--module/plugins/hoster/FilefactoryCom.py4
-rw-r--r--module/plugins/hoster/FileserveCom.py6
-rw-r--r--module/plugins/hoster/HighWayMe.py4
-rw-r--r--module/plugins/hoster/Keep2ShareCc.py6
-rw-r--r--module/plugins/hoster/LuckyShareNet.py4
-rw-r--r--module/plugins/hoster/MediafireCom.py4
-rw-r--r--module/plugins/hoster/MegaRapidCz.py4
-rw-r--r--module/plugins/hoster/MegasharesCom.py6
-rw-r--r--module/plugins/hoster/NarodRu.py2
-rw-r--r--module/plugins/hoster/OboomCom.py4
-rw-r--r--module/plugins/hoster/OneFichierCom.py61
-rw-r--r--module/plugins/hoster/OpenloadIo.py12
-rw-r--r--module/plugins/hoster/PremiumizeMe.py8
-rw-r--r--module/plugins/hoster/ShareonlineBiz.py10
-rw-r--r--module/plugins/hoster/SimplyPremiumCom.py4
-rw-r--r--module/plugins/hoster/UlozTo.py13
-rw-r--r--module/plugins/hoster/UloziskoSk.py2
-rw-r--r--module/plugins/hoster/UnibytesCom.py2
-rw-r--r--module/plugins/hoster/UploadedTo.py4
-rw-r--r--module/plugins/hoster/UploadheroCom.py4
-rw-r--r--module/plugins/hoster/UserscloudCom.py37
-rw-r--r--module/plugins/hoster/YibaishiwuCom.py2
-rw-r--r--module/plugins/hoster/YoutubeCom.py30
29 files changed, 172 insertions, 89 deletions
diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py
index 60c66960d..d9466c954 100644
--- a/module/plugins/hoster/CloudzillaTo.py
+++ b/module/plugins/hoster/CloudzillaTo.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class CloudzillaTo(SimpleHoster):
__name__ = "CloudzillaTo"
__type__ = "hoster"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P<ID>[\w^_]+)'
@@ -34,7 +34,7 @@ class CloudzillaTo(SimpleHoster):
self.fail(_("Missing password"))
if re.search(self.PASSWORD_PATTERN, self.html):
- self.retry(reason="Wrong password")
+ self.retry(msg="Wrong password")
else:
return super(CloudzillaTo, self).check_errors()
@@ -49,7 +49,7 @@ class CloudzillaTo(SimpleHoster):
if 'error' in ticket:
if "File is password protected" in ticket['error']:
- self.retry(reason="Wrong password")
+ self.retry(msg="Wrong password")
else:
self.fail(ticket['error'])
diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py
index 8f092ad0c..17e3ee93c 100644
--- a/module/plugins/hoster/CrockoCom.py
+++ b/module/plugins/hoster/CrockoCom.py
@@ -40,7 +40,7 @@ class CrockoCom(SimpleHoster):
for _i in xrange(5):
m = re.search(self.CAPTCHA_PATTERN, self.html)
if m:
- url = urlparse.urljoin("http://crocko.com", m.group(1))
+ url = urlparse.urljoin("http://crocko.com/", m.group(1))
self.wait(m.group(2))
self.html = self.load(url)
else:
diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py
index 53ac9ff06..70df8e354 100644
--- a/module/plugins/hoster/EuroshareEu.py
+++ b/module/plugins/hoster/EuroshareEu.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class EuroshareEu(SimpleHoster):
__name__ = "EuroshareEu"
__type__ = "hoster"
- __version__ = "0.30"
+ __version__ = "0.31"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|hu|pl)/file/.+'
@@ -33,7 +33,7 @@ class EuroshareEu(SimpleHoster):
def handle_premium(self, pyfile):
if self.ERROR_PATTERN in self.html:
self.account.relogin(self.user)
- self.retry(reason=_("User not logged in"))
+ self.retry(msg=_("User not logged in"))
self.link = pyfile.url.rstrip('/') + "/download/"
@@ -42,7 +42,7 @@ class EuroshareEu(SimpleHoster):
if check == "login" or (check == "json" and self.last_check.group(1) == "Access token expired"):
self.account.relogin(self.user)
- self.retry(reason=_("Access token expired"))
+ self.retry(msg=_("Access token expired"))
elif check == "json":
self.fail(self.last_check.group(1))
diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py
index 485d69d15..62cf3889b 100644
--- a/module/plugins/hoster/FastshareCz.py
+++ b/module/plugins/hoster/FastshareCz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FastshareCz(SimpleHoster):
__name__ = "FastshareCz"
__type__ = "hoster"
- __version__ = "0.32"
+ __version__ = "0.33"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?fastshare\.cz/\d+/.+'
@@ -70,7 +70,7 @@ class FastshareCz(SimpleHoster):
self.retry(6, 10 * 60, _("Paralell download"))
elif check == "wrong captcha":
- self.retry(max_tries=5, reason=_("Wrong captcha"))
+ self.retry(max_tries=5, msg=_("Wrong captcha"))
elif check == "credit":
self.restart(nopremium=True)
diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py
index 62a7a553f..94e2d25ab 100644
--- a/module/plugins/hoster/FileSharkPl.py
+++ b/module/plugins/hoster/FileSharkPl.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FileSharkPl(SimpleHoster):
__name__ = "FileSharkPl"
__type__ = "hoster"
- __version__ = "0.13"
+ __version__ = "0.14"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+'
@@ -78,7 +78,7 @@ class FileSharkPl(SimpleHoster):
if m is None:
self.error(_("Download url not found"))
- link = urlparse.urljoin("http://fileshark.pl", m.group(1))
+ link = urlparse.urljoin("http://fileshark.pl/", m.group(1))
self.html = self.load(link)
@@ -92,13 +92,13 @@ class FileSharkPl(SimpleHoster):
m = re.search(self.TOKEN_PATTERN, self.html)
if m is None:
- self.retry(reason=_("Captcha form not found"))
+ self.retry(msg=_("Captcha form not found"))
inputs['form[_token]'] = m.group(1)
m = re.search(self.CAPTCHA_PATTERN, self.html)
if m is None:
- self.retry(reason=_("Captcha image not found"))
+ self.retry(msg=_("Captcha image not found"))
inputs['form[captcha]'] = self.captcha._decrypt(m.group(1).decode('base64'), input_type='jpeg')
inputs['form[start]'] = ""
diff --git a/module/plugins/hoster/FileboomMe.py b/module/plugins/hoster/FileboomMe.py
index 2798d9eda..3c11f1d16 100644
--- a/module/plugins/hoster/FileboomMe.py
+++ b/module/plugins/hoster/FileboomMe.py
@@ -37,7 +37,7 @@ class FileboomMe(SimpleHoster):
def handle_free(self, pyfile):
- post_url = urljoin(pyfile.url, "/file/" + self.info['pattern']['ID'])
+ post_url = urljoin(pyfile.url, "file/" + self.info['pattern']['ID'])
m = re.search(r'data-slow-id="(\w+)"', self.html)
if m:
diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py
index 325b4bb27..aa8ea2343 100644
--- a/module/plugins/hoster/FilefactoryCom.py
+++ b/module/plugins/hoster/FilefactoryCom.py
@@ -20,7 +20,7 @@ def get_info(urls):
class FilefactoryCom(SimpleHoster):
__name__ = "FilefactoryCom"
__type__ = "hoster"
- __version__ = "0.57"
+ __version__ = "0.58"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?filefactory\.com/(file|trafficshare/\w+)/\w+'
@@ -66,7 +66,7 @@ class FilefactoryCom(SimpleHoster):
if check == "multiple":
self.log_debug("Parallel downloads detected; waiting 15 minutes")
- self.retry(wait_time=15 * 60, reason=_("Parallel downloads"))
+ self.retry(wait_time=15 * 60, msg=_("Parallel downloads"))
elif check == "error":
self.error(_("Unknown error"))
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index a74589cff..12f5bf2c3 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -33,7 +33,7 @@ def check_file(plugin, urls):
class FileserveCom(Hoster):
__name__ = "FileserveCom"
__type__ = "hoster"
- __version__ = "0.58"
+ __version__ = "0.59"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?fileserve\.com/file/(?P<ID>[^/]+)'
@@ -94,7 +94,7 @@ class FileserveCom(Hoster):
elif action['fail'] == "parallelDownload":
self.log_warning(_("Parallel download error, now waiting 60s"))
- self.retry(wait_time=60, reason=_("parallelDownload"))
+ self.retry(wait_time=60, msg=_("parallelDownload"))
else:
self.fail(_("Download check returned: %s") % action['fail'])
@@ -206,7 +206,7 @@ class FileserveCom(Hoster):
if not premium_url and self.check_download({'login': re.compile(self.NOT_LOGGED_IN_PATTERN)}):
self.account.relogin(self.user)
- self.retry(reason=_("Not logged in"))
+ self.retry(msg=_("Not logged in"))
def get_info(urls):
diff --git a/module/plugins/hoster/HighWayMe.py b/module/plugins/hoster/HighWayMe.py
index 119ddb70e..f8dc27eec 100644
--- a/module/plugins/hoster/HighWayMe.py
+++ b/module/plugins/hoster/HighWayMe.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import seconds_to_midnight
class HighWayMe(MultiHoster):
__name__ = "HighWayMe"
__type__ = "hoster"
- __version__ = "0.13"
+ __version__ = "0.14"
__status__ = "testing"
__pattern__ = r'https?://.+high-way\.my'
@@ -39,7 +39,7 @@ class HighWayMe(MultiHoster):
elif "trafficlimit" in self.html:
self.log_warning(_("Reached daily limit"))
- self.retry(wait_time=seconds_to_midnight(gmt=2), reason="Daily limit for this host reached")
+ self.retry(wait_time=seconds_to_midnight(gmt=2), msg="Daily limit for this host reached")
elif "<code>8</code>" in self.html:
self.log_warning(_("Hoster temporarily unavailable, waiting 1 minute and retry"))
diff --git a/module/plugins/hoster/Keep2ShareCc.py b/module/plugins/hoster/Keep2ShareCc.py
index bf4b157cb..b8275e84b 100644
--- a/module/plugins/hoster/Keep2ShareCc.py
+++ b/module/plugins/hoster/Keep2ShareCc.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class Keep2ShareCc(SimpleHoster):
__name__ = "Keep2ShareCc"
__type__ = "hoster"
- __version__ = "0.24"
+ __version__ = "0.25"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(keep2share|k2s|keep2s)\.cc/file/(?P<ID>\w+)'
@@ -45,7 +45,7 @@ class Keep2ShareCc(SimpleHoster):
if m:
self.info['error'] = m.group(1)
self.wantReconnect = True
- self.retry(wait_time=30 * 60, reason=m.group(0))
+ self.retry(wait_time=30 * 60, msg=m.group(0))
m = re.search(self.ERROR_PATTERN, self.html)
if m:
@@ -61,7 +61,7 @@ class Keep2ShareCc(SimpleHoster):
wait_time = sum(a * b for a, b in zip(ftr, map(int, m.group(1).split(':'))))
self.wantReconnect = True
- self.retry(wait_time=wait_time, reason="Please wait to download this file")
+ self.retry(wait_time=wait_time, msg="Please wait to download this file")
self.info.pop('error', None)
diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py
index 788c1aca8..5d9bf52c0 100644
--- a/module/plugins/hoster/LuckyShareNet.py
+++ b/module/plugins/hoster/LuckyShareNet.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class LuckyShareNet(SimpleHoster):
__name__ = "LuckyShareNet"
__type__ = "hoster"
- __version__ = "0.08"
+ __version__ = "0.09"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?luckyshare\.net/(?P<ID>\d{10,})'
@@ -36,7 +36,7 @@ class LuckyShareNet(SimpleHoster):
else:
self.error(_("Unable to detect wait time between free downloads"))
elif 'Hash expired' in rep:
- self.retry(reason=_("Hash expired"))
+ self.retry(msg=_("Hash expired"))
return json_loads(rep)
diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py
index 3ba191160..21e643171 100644
--- a/module/plugins/hoster/MediafireCom.py
+++ b/module/plugins/hoster/MediafireCom.py
@@ -8,10 +8,10 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class MediafireCom(SimpleHoster):
__name__ = "MediafireCom"
__type__ = "hoster"
- __version__ = "0.90"
+ __version__ = "0.91"
__status__ = "testing"
- __pattern__ = r'https?://(?:www\.)?mediafire\.com/(file/|view/\??|download(\.php\?|/)|\?)(?P<ID>\w{15})'
+ __pattern__ = r'https?://(?:www\.)?mediafire\.com/(file/|view/\??|download(\.php\?|/)|\?)(?P<ID>\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Mediafire.com hoster plugin"""
diff --git a/module/plugins/hoster/MegaRapidCz.py b/module/plugins/hoster/MegaRapidCz.py
index 13f462585..4d6d0171a 100644
--- a/module/plugins/hoster/MegaRapidCz.py
+++ b/module/plugins/hoster/MegaRapidCz.py
@@ -22,7 +22,7 @@ def get_info(urls):
class MegaRapidCz(SimpleHoster):
__name__ = "MegaRapidCz"
__type__ = "hoster"
- __version__ = "0.57"
+ __version__ = "0.58"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(share|mega)rapid\.cz/soubor/\d+/.+'
@@ -59,7 +59,7 @@ class MegaRapidCz(SimpleHoster):
else:
if re.search(self.ERR_LOGIN_PATTERN, self.html):
self.relogin(self.user)
- self.retry(wait_time=60, reason=_("User login failed"))
+ self.retry(wait_time=60, msg=_("User login failed"))
elif re.search(self.ERR_CREDIT_PATTERN, self.html):
self.fail(_("Not enough credit left"))
diff --git a/module/plugins/hoster/MegasharesCom.py b/module/plugins/hoster/MegasharesCom.py
index b6692263f..8b87dbd68 100644
--- a/module/plugins/hoster/MegasharesCom.py
+++ b/module/plugins/hoster/MegasharesCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class MegasharesCom(SimpleHoster):
__name__ = "MegasharesCom"
__type__ = "hoster"
- __version__ = "0.29"
+ __version__ = "0.30"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(d\d{2}\.)?megashares\.com/((index\.php)?\?d\d{2}=|dl/)\w+'
@@ -82,7 +82,7 @@ class MegasharesCom(SimpleHoster):
time = [int(x) for x in m.groups()]
renew = time[0] + (time[1] * 60) + (time[2] * 60)
self.log_debug("Waiting %d seconds for a new passport" % renew)
- self.retry(wait_time=renew, reason=_("Passport renewal"))
+ self.retry(wait_time=renew, msg=_("Passport renewal"))
#: Check traffic left on passport
m = re.search(self.PASSPORT_LEFT_PATTERN, self.html, re.M | re.S)
@@ -94,7 +94,7 @@ class MegasharesCom(SimpleHoster):
self.log_info(_("Data left: %s %s (%d MB needed)") % (m.group(2), m.group(3), self.pyfile.size / 1048576))
if not data_left:
- self.retry(wait_time=600, reason=_("Passport renewal"))
+ self.retry(wait_time=600, msg=_("Passport renewal"))
self.handle_download(False)
diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py
index b0d4a4960..a20c23954 100644
--- a/module/plugins/hoster/NarodRu.py
+++ b/module/plugins/hoster/NarodRu.py
@@ -49,7 +49,7 @@ class NarodRu(SimpleHoster):
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m:
- self.link = urlparse.urljoin("http://narod.ru", m.group(1))
+ self.link = urlparse.urljoin("http://narod.ru/", m.group(1))
self.captcha.correct()
break
diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py
index 8420c6f02..1ee342de5 100644
--- a/module/plugins/hoster/OboomCom.py
+++ b/module/plugins/hoster/OboomCom.py
@@ -13,7 +13,7 @@ from module.plugins.captcha.ReCaptcha import ReCaptcha
class OboomCom(Hoster):
__name__ = "OboomCom"
__type__ = "hoster"
- __version__ = "0.36"
+ __version__ = "0.37"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?oboom\.com/(?:#(?:id=|/)?)?(?P<ID>\w{8})'
@@ -141,6 +141,6 @@ class OboomCom(Hoster):
self.download_domain = result[1]
self.download_ticket = result[2]
elif result[0] == 421:
- self.retry(wait_time=result[2] + 60, reason=_("Connection limit exceeded"))
+ self.retry(wait_time=result[2] + 60, msg=_("Connection limit exceeded"))
else:
self.fail(_("Could not retrieve download ticket. Error code: %s") % result[0])
diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py
index c564dc677..70229a6ef 100644
--- a/module/plugins/hoster/OneFichierCom.py
+++ b/module/plugins/hoster/OneFichierCom.py
@@ -2,13 +2,14 @@
import re
+from module.network.RequestFactory import getURL as get_url
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class OneFichierCom(SimpleHoster):
__name__ = "OneFichierCom"
__type__ = "hoster"
- __version__ = "0.86"
+ __version__ = "0.90"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(?:(?P<ID1>\w+)\.)?(?P<HOST>1fichier\.com|alterupload\.com|cjoint\.net|d(es)?fichiers\.com|dl4free\.com|megadl\.fr|mesfichiers\.org|piecejointe\.net|pjointe\.com|tenvoi\.com)(?:/\?(?P<ID2>\w+))?'
@@ -28,7 +29,9 @@ class OneFichierCom(SimpleHoster):
COOKIES = [("1fichier.com", "LG", "en")]
- NAME_PATTERN = r'>FileName :</td>\s*<td.*>(?P<N>.+?)<'
+ DIRECT_LINK = True
+
+ NAME_PATTERN = r'>File\s*Name :</td>\s*<td.*>(?P<N>.+?)<'
SIZE_PATTERN = r'>Size :</td>\s*<td.*>(?P<S>[\d.,]+) (?P<U>[\w^_]+)'
OFFLINE_PATTERN = r'File not found !\s*<'
@@ -40,7 +43,61 @@ class OneFichierCom(SimpleHoster):
self.resume_download = True
+ @classmethod
+ def get_info(cls, url="", html=""):
+ redirect = url
+ for i in xrange(10):
+ try:
+ headers = dict(re.findall(r"(?P<name>.+?): (?P<value>.+?)\r?\n", get_url(redirect, just_header=True).lower()))
+ if 'location' in headers and headers['location']:
+ redirect = headers['location']
+ else:
+ if 'content-type' in headers and headers['content-type'] == "application/octet-stream":
+ if "filename=" in headers.get('content-disposition'):
+ name = dict(_i.split("=") for _i in map(str.strip, headers['content-disposition'].split(";"))[1:])['filename'].strip("\"'")
+ else:
+ name = url
+
+ info = {'name' : name,
+ 'size' : long(headers.get('content-length')),
+ 'status': 3,
+ 'url' : url}
+
+ else:
+ info = super(OneFichierCom, cls).get_info(url, html)
+
+ break
+
+ except Exception, e:
+ info = {'status' : 8,
+ 'error' : e.message}
+
+ else:
+ info = {'status' : 8,
+ 'error' : _("Too many redirects")}
+
+ return info
+
+
+ def handle_direct(self, pyfile):
+ redirect = pyfile.url
+ for i in xrange(self.get_config("maxredirs", plugin="UserAgentSwitcher")):
+
+ headers = self.load(redirect, just_header=True)
+ if 'location' in headers and headers['location']:
+ self.log_debug("Redirect #%d to: %s" % (i, redirect))
+ redirect = headers['location']
+ else:
+ if 'content-type' in headers and headers['content-type'] == "application/octet-stream":
+ self.link = pyfile.url
+ break
+ else:
+ self.fail(_("Too many redirects"))
+
+
def handle_free(self, pyfile):
+ self.check_errors()
+
id = self.info['pattern']['ID1'] or self.info['pattern']['ID2']
url, inputs = self.parse_html_form('action="https://1fichier.com/\?%s' % id)
diff --git a/module/plugins/hoster/OpenloadIo.py b/module/plugins/hoster/OpenloadIo.py
index c46462344..372ce28f9 100644
--- a/module/plugins/hoster/OpenloadIo.py
+++ b/module/plugins/hoster/OpenloadIo.py
@@ -6,25 +6,25 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class OpenloadIo(SimpleHoster):
__name__ = "OpenloadIo"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__status__ = "testing"
- __pattern__ = r'https?://(?:www\.)?openload\.io/f/[\w_-]{11}'
+ __pattern__ = r'https?://(?:www\.)?openload\.(co|io)/f/[\w-]+'
- __description__ = """Openload.io hoster plugin"""
+ __description__ = """Openload.co hoster plugin"""
__license__ = "GPLv3"
__authors__ = [(None, None)]
NAME_PATTERN = r'<span id="filename">(?P<N>.+?)</'
- SIZE_PATTERN = r'<span class="count">(?P<S>[\d.,]+) (?P<U>[\w^_]+)<'
+ SIZE_PATTERN = r'<span class="count">(?P<S>[\d.,]+) (?P<U>[\w^_]+)'
OFFLINE_PATTERN = r">(We can't find the file you are looking for)"
- LINK_FREE_PATTERN = r'id="real\w*download"><a href="(https?://[\w\.]+\.openload\.io/dl/.*?)"'
+ LINK_FREE_PATTERN = r'id="real\w*download"><a href="(https?://[\w\.]+\.openload\.co/dl/.*?)"'
def setup(self):
- self.multiDL = True
+ self.multiDL = True
self.chunk_limit = 1
diff --git a/module/plugins/hoster/PremiumizeMe.py b/module/plugins/hoster/PremiumizeMe.py
index d968eccec..e682a5a4c 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.20"
+ __version__ = "0.21"
__status__ = "testing"
__pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.activate
@@ -44,6 +44,12 @@ class PremiumizeMe(MultiHoster):
status = data['status']
if status == 200:
+ if 'filename' in data['result']:
+ self.pyfile.name = data['result']['filename']
+
+ if 'filesize' in data['result']:
+ self.pyfile.size = data['result']['filesize']
+
self.link = data['result']['location']
return
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py
index b5af3ea35..cef9f6bfb 100644
--- a/module/plugins/hoster/ShareonlineBiz.py
+++ b/module/plugins/hoster/ShareonlineBiz.py
@@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class ShareonlineBiz(SimpleHoster):
__name__ = "ShareonlineBiz"
__type__ = "hoster"
- __version__ = "0.55"
+ __version__ = "0.56"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(share-online\.biz|egoshare\.com)/(download\.php\?id=|dl/)(?P<ID>\w+)'
@@ -79,7 +79,7 @@ class ShareonlineBiz(SimpleHoster):
post={'dl_free' : "1",
'recaptcha_challenge_field': challenge,
'recaptcha_response_field' : response})
- if not res == "0":
+ if res != "0":
self.captcha.correct()
return res
else:
@@ -136,7 +136,7 @@ class ShareonlineBiz(SimpleHoster):
self.log_debug(dlinfo)
- if not dlinfo['status'] == "online":
+ if dlinfo['status'] != "online":
self.offline()
else:
pyfile.name = dlinfo['name']
@@ -170,7 +170,7 @@ class ShareonlineBiz(SimpleHoster):
self.fail(_("Premium account needed"))
elif errmsg in ("expired", "server"):
- self.retry(wait_time=600, reason=errmsg)
+ self.retry(wait_time=600, msg=errmsg)
elif errmsg == "full":
self.retry(10, 600, _("Server is full"))
@@ -181,7 +181,7 @@ class ShareonlineBiz(SimpleHoster):
else:
self.wantReconnect = True
- self.retry(wait_time=60, reason=errmsg)
+ self.retry(wait_time=60, msg=errmsg)
getInfo = create_getInfo(ShareonlineBiz)
diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py
index be1578bfb..be9b89f24 100644
--- a/module/plugins/hoster/SimplyPremiumCom.py
+++ b/module/plugins/hoster/SimplyPremiumCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import seconds_to_midnight
class SimplyPremiumCom(MultiHoster):
__name__ = "SimplyPremiumCom"
__type__ = "hoster"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__pattern__ = r'https?://.+simply-premium\.com'
@@ -40,7 +40,7 @@ class SimplyPremiumCom(MultiHoster):
elif "trafficlimit" in self.html:
self.log_warning(_("Reached daily limit for this host"))
- self.retry(wait_time=seconds_to_midnight(gmt=2), reason="Daily limit for this host reached")
+ self.retry(wait_time=seconds_to_midnight(gmt=2), msg="Daily limit for this host reached")
elif "hostererror" in self.html:
self.log_warning(_("Hoster temporarily unavailable, waiting 1 minute and retry"))
diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py
index b402433a4..ab96f65a1 100644
--- a/module/plugins/hoster/UlozTo.py
+++ b/module/plugins/hoster/UlozTo.py
@@ -15,7 +15,7 @@ def convert_decimal_prefix(m):
class UlozTo(SimpleHoster):
__name__ = "UlozTo"
__type__ = "hoster"
- __version__ = "1.13"
+ __version__ = "1.15"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl)/(?:live/)?(?P<ID>\w+/[^/?]*)'
@@ -26,8 +26,7 @@ class UlozTo(SimpleHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- INFO_PATTERN = r'<p>File <strong>(?P<N>[^<]+)</strong> is password protected</p>'
- NAME_PATTERN = r'<title>(?P<N>[^<]+) \| Uloz\.to</title>'
+ NAME_PATTERN = r'(<p>File <strong>|<title>)(?P<N>.+?)(<| \|)'
SIZE_PATTERN = r'<span id="fileSize">.*?(?P<S>[\d.,]+\s[kMG]?B)</span>'
OFFLINE_PATTERN = r'<title>404 - Page not found</title>|<h1 class="h1">File (has been deleted|was banned)</h1>'
@@ -68,7 +67,9 @@ class UlozTo(SimpleHoster):
#: New version - better to get new parameters (like captcha reload) because of image url - since 6.12.2013
self.log_debug('Using "new" version')
- xapca = self.load("http://www.ulozto.net/reloadXapca.php", get={'rnd': str(int(time.time()))})
+ xapca = self.load("http://www.ulozto.net/reloadXapca.php",
+ get={'rnd': str(int(time.time()))})
+ xapca = xapca.replace('sound":"', 'sound":"http:').replace('image":"', 'image":"http:')
self.log_debug("xapca = " + str(xapca))
data = json_loads(xapca)
@@ -121,7 +122,7 @@ class UlozTo(SimpleHoster):
def check_file(self):
check = self.check_download({
- 'wrong_captcha': re.compile(r'<ul class="error">\s*<li>Error rewriting the text.</li>'),
+ 'wrong_captcha': ">An error ocurred while verifying the user",
'offline' : re.compile(self.OFFLINE_PATTERN),
'passwd' : self.PASSWD_PATTERN,
'server_error' : 'src="http://img.ulozto.cz/error403/vykricnik.jpg"', #: Paralell dl, server overload etc.
@@ -130,7 +131,7 @@ class UlozTo(SimpleHoster):
if check == "wrong_captcha":
self.captcha.invalid()
- self.retry(reason=_("Wrong captcha code"))
+ self.retry(msg=_("Wrong captcha code"))
elif check == "offline":
self.offline()
diff --git a/module/plugins/hoster/UloziskoSk.py b/module/plugins/hoster/UloziskoSk.py
index 7cbcb4d40..12e88cf1c 100644
--- a/module/plugins/hoster/UloziskoSk.py
+++ b/module/plugins/hoster/UloziskoSk.py
@@ -58,7 +58,7 @@ class UloziskoSk(SimpleHoster):
if m is None:
self.error(_("CAPTCHA_PATTERN not found"))
- captcha_url = urlparse.urljoin("http://www.ulozisko.sk", m.group(1))
+ captcha_url = urlparse.urljoin("http://www.ulozisko.sk/", m.group(1))
captcha = self.captcha.decrypt(captcha_url, cookies=True)
self.log_debug("CAPTCHA_URL:" + captcha_url + ' CAPTCHA:' + captcha)
diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py
index ac2589f47..d4b7d6dd4 100644
--- a/module/plugins/hoster/UnibytesCom.py
+++ b/module/plugins/hoster/UnibytesCom.py
@@ -65,7 +65,7 @@ class UnibytesCom(SimpleHoster):
self.wait(m.group(1) if m else 60, False)
elif last_step in ("captcha", "last"):
- post_data['captcha'] = self.captcha.decrypt(urlparse.urljoin(domain, "/captcha.jpg"))
+ post_data['captcha'] = self.captcha.decrypt(urlparse.urljoin(domain, "captcha.jpg"))
else:
self.fail(_("No valid captcha code entered"))
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index c90f2bb0f..697f1febd 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UploadedTo(SimpleHoster):
__name__ = "UploadedTo"
__type__ = "hoster"
- __version__ = "0.96"
+ __version__ = "0.97"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)'
@@ -31,6 +31,7 @@ class UploadedTo(SimpleHoster):
OFFLINE_PATTERN = r'>Page not found'
TEMP_OFFLINE_PATTERN = r'<title>uploaded\.net - Maintenance'
+ PREMIUM_ONLY_PATTERN = r'This file exceeds the max\. filesize which can be downloaded by free users'
LINK_FREE_PATTERN = r"url:\s*'(.+?)'"
LINK_PREMIUM_PATTERN = r'<div class="tfree".*\s*<form method="post" action="(.+?)"'
@@ -77,6 +78,7 @@ class UploadedTo(SimpleHoster):
self.html = self.load("http://uploaded.net/io/ticket/captcha/%s" % self.info['pattern']['ID'],
post={'recaptcha_challenge_field': challenge,
'recaptcha_response_field' : response})
+ self.check_errors()
super(UploadedTo, self).handle_free(pyfile)
self.check_errors()
diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py
index 2af0f32fc..ded0d60dd 100644
--- a/module/plugins/hoster/UploadheroCom.py
+++ b/module/plugins/hoster/UploadheroCom.py
@@ -44,7 +44,7 @@ class UploadheroCom(SimpleHoster):
if m is None:
self.error(_("Captcha not found"))
- captcha = self.captcha.decrypt(urlparse.urljoin("http://uploadhero.co", m.group(1)))
+ captcha = self.captcha.decrypt(urlparse.urljoin("http://uploadhero.co/", m.group(1)))
self.html = self.load(pyfile.url,
get={'code': captcha})
@@ -58,7 +58,7 @@ class UploadheroCom(SimpleHoster):
def check_errors(self):
m = re.search(self.IP_BLOCKED_PATTERN, self.html)
if m:
- self.html = self.load(urlparse.urljoin("http://uploadhero.co", m.group(1)))
+ self.html = self.load(urlparse.urljoin("http://uploadhero.co/", m.group(1)))
m = re.search(self.IP_WAIT_PATTERN, self.html)
wait_time = (int(m.group(1)) * 60 + int(m.group(2))) if m else 5 * 60
diff --git a/module/plugins/hoster/UserscloudCom.py b/module/plugins/hoster/UserscloudCom.py
new file mode 100644
index 000000000..ebaed4859
--- /dev/null
+++ b/module/plugins/hoster/UserscloudCom.py
@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+
+import re
+
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+
+
+class UserscloudCom(SimpleHoster):
+ __name__ = "UserscloudCom"
+ __type__ = "hoster"
+ __version__ = "0.01"
+ __status__ = "testing"
+
+ __pattern__ = r'https?://(?:www\.)?userscloud\.com/\w{12}'
+
+ __description__ = """Userscloud.com hoster plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("GammaC0de", None)]
+
+
+ NAME_PATTERN = r'<h2 class="strong margin-none">(?P<N>.+?)<'
+ SIZE_PATTERN = r'<div class="ribbon">(?P<S>[\d.,]+) (?P<U>[\w^_]+)<'
+ OFFLINE_PATTERN = r'The file you are trying to download is no longer available'
+
+
+ def setup(self):
+ self.multiDL = True
+ self.resume_download = False
+ self.chunk_limit = 1
+
+
+ def handle_free(self, pyfile):
+ self.download(pyfile.url,
+ post=dict(re.findall(r'<input type="hidden" name="(.+?)" value="(.*?)">', self.html)))
+
+
+getInfo = create_getInfo(UserscloudCom)
diff --git a/module/plugins/hoster/YibaishiwuCom.py b/module/plugins/hoster/YibaishiwuCom.py
index e0e90a311..0c1a028f8 100644
--- a/module/plugins/hoster/YibaishiwuCom.py
+++ b/module/plugins/hoster/YibaishiwuCom.py
@@ -37,7 +37,7 @@ class YibaishiwuCom(SimpleHoster):
self.log_debug(('FREEUSER' if m.group(2) == "download" else 'GUEST') + ' URL', url)
- res = json_loads(self.load(urlparse.urljoin("http://115.com", url), decode=False))
+ res = json_loads(self.load(urlparse.urljoin("http://115.com/", url), decode=False))
if "urls" in res:
mirrors = res['urls']
diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py
index 865eeef2e..5c7c13962 100644
--- a/module/plugins/hoster/YoutubeCom.py
+++ b/module/plugins/hoster/YoutubeCom.py
@@ -6,37 +6,17 @@ import subprocess
import urllib
from module.plugins.internal.Hoster import Hoster
-from module.plugins.internal.Plugin import replace_patterns
+from module.plugins.internal.Plugin import replace_patterns, which
from module.utils import html_unescape
-def which(program):
- """
- Works exactly like the unix command which
- Courtesy of http://stackoverflow.com/a/377028/675646
- """
- isExe = lambda x: os.path.isfile(x) and os.access(x, os.X_OK)
-
- fpath, fname = os.path.split(program)
-
- if fpath:
- if isExe(program):
- return program
- else:
- for path in os.environ['PATH'].split(os.pathsep):
- path = path.strip('"')
- exe_file = os.path.join(path, program)
- if isExe(exe_file):
- return exe_file
-
-
class YoutubeCom(Hoster):
__name__ = "YoutubeCom"
__type__ = "hoster"
- __version__ = "0.44"
+ __version__ = "0.46"
__status__ = "testing"
- __pattern__ = r'https?://(?:[^/]*\.)?(youtube\.com|youtu\.be)/watch\?(?:.*&)?v=.+'
+ __pattern__ = r'https?://(?:[^/]*\.)?(youtu\.be/|youtube\.com/watch\?(?:.*&)?v=)\w+'
__config__ = [("quality", "sd;hd;fullhd;240p;360p;480p;720p;1080p;3072p", "Quality Setting" , "hd" ),
("fmt" , "int" , "FMT/ITAG Number (0 for auto)", 0 ),
(".mp4" , "bool" , "Allow .mp4" , True ),
@@ -51,10 +31,10 @@ class YoutubeCom(Hoster):
("zoidberg", "zoidberg@mujmail.cz")]
- URL_REPLACEMENTS = [(r'youtu\.be/', 'youtube.com/')]
+ URL_REPLACEMENTS = [(r'youtu\.be/', 'youtube.com/watch?v=')]
#: Invalid characters that must be removed from the file name
- invalidChars = u'\u2605:?><"|\\'
+ invalid_chars = u'\u2605:?><"|\\'
#: name, width, height, quality ranking, 3D
formats = {5 : (".flv" , 400 , 240 , 1 , False),