summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/Utils.py2
-rw-r--r--module/plugins/Plugin.py10
-rwxr-xr-xmodule/plugins/accounts/OronCom.py2
-rw-r--r--module/plugins/crypter/ILoadTo.py62
-rw-r--r--module/plugins/crypter/ShareRapidComFolder.py14
-rw-r--r--module/plugins/hoster/EasybytezCom.py60
-rw-r--r--module/plugins/hoster/MediafireCom.py85
-rwxr-xr-xmodule/plugins/hoster/OronCom.py10
-rw-r--r--module/plugins/hoster/PornhubCom.py2
-rw-r--r--module/plugins/hoster/ShareRapidCom.py14
-rw-r--r--module/plugins/hoster/ShareonlineBiz.py2
-rw-r--r--module/plugins/hoster/TurbouploadCom.py44
-rw-r--r--module/plugins/hoster/UploadingCom.py6
-rw-r--r--module/plugins/hoster/YoutubeCom.py6
14 files changed, 234 insertions, 85 deletions
diff --git a/module/Utils.py b/module/Utils.py
index b80cfe1c2..86fd67558 100644
--- a/module/Utils.py
+++ b/module/Utils.py
@@ -47,7 +47,7 @@ def save_path(name):
def save_join(*args):
""" joins a path, encoding aware """
- return fs_encode(join(*[unicode(x) for x in args]))
+ return fs_encode(join(*[x if type(x) == unicode else decode(x) for x in args]))
# File System Encoding functions:
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index 59d0f46f2..d78eb162b 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -31,7 +31,7 @@ if os.name != "nt":
from Base import Base
-from module.utils import save_join, save_path, fs_encode, chunks
+from module.utils import save_join, save_path, fs_encode, fs_decode, chunks
class Abort(Exception):
""" raised when aborted """
@@ -397,6 +397,8 @@ class Plugin(Base):
except Exception, e:
self.log.warning(_("Setting User and Group failed: %s") % str(e))
+ # convert back to unicode
+ location = fs_decode(location)
name = save_path(self.pyfile.name)
filename = join(location, name)
@@ -415,15 +417,17 @@ class Plugin(Base):
self.pyfile.name = newname
filename = join(location, newname)
+ fs_filename = fs_encode(filename)
+
if self.core.config["permission"]["change_file"]:
- chmod(filename, int(self.core.config["permission"]["file"], 8))
+ chmod(fs_filename, int(self.core.config["permission"]["file"], 8))
if self.core.config["permission"]["change_dl"] and os.name != "nt":
try:
uid = getpwnam(self.config["permission"]["user"])[2]
gid = getgrnam(self.config["permission"]["group"])[2]
- chown(filename, uid, gid)
+ chown(fs_filename, uid, gid)
except Exception, e:
self.log.warning(_("Setting User and Group failed: %s") % str(e))
diff --git a/module/plugins/accounts/OronCom.py b/module/plugins/accounts/OronCom.py
index cab5dcd2a..793984121 100755
--- a/module/plugins/accounts/OronCom.py
+++ b/module/plugins/accounts/OronCom.py
@@ -23,7 +23,7 @@ from time import strptime, mktime
class OronCom(Account):
__name__ = "OronCom"
- __version__ = "0.11"
+ __version__ = "0.12"
__type__ = "account"
__description__ = """oron.com account plugin"""
__author_name__ = ("DHMH")
diff --git a/module/plugins/crypter/ILoadTo.py b/module/plugins/crypter/ILoadTo.py
new file mode 100644
index 000000000..9815ae266
--- /dev/null
+++ b/module/plugins/crypter/ILoadTo.py
@@ -0,0 +1,62 @@
+
+import re
+import urllib
+
+from module.plugins.Crypter import Crypter
+from module.lib.BeautifulSoup import BeautifulSoup
+
+class ILoadTo(Crypter):
+ __name__ = "ILoadTo"
+ __type__ = "crypter"
+ __pattern__ = r"http://iload\.to/go/\d+-[\w\.-]+/"
+ __config__ = []
+ __version__ = "0.1"
+ __description__ = """iload.to Crypter Plugin"""
+ __author_name__ = ("hzpz")
+ __author_mail__ = ("none")
+
+
+ def decrypt(self, pyfile):
+ url = pyfile.url
+ src = self.req.load(str(url))
+ soup = BeautifulSoup(src)
+
+ # find captcha URL and decrypt
+ captchaTag = soup.find("img", attrs={"id": "Captcha"})
+ if not captchaTag:
+ self.fail("Cannot find Captcha")
+
+ captchaUrl = "http://iload.to" + captchaTag["src"]
+ self.logDebug("Captcha URL: %s" % captchaUrl)
+ result = self.decryptCaptcha(str(captchaUrl))
+
+ # find captcha form URL
+ formTag = soup.find("form", attrs={"id": "CaptchaForm"})
+ formUrl = "http://iload.to" + formTag["action"]
+ self.logDebug("Form URL: %s" % formUrl)
+
+ # submit decrypted captcha
+ self.req.lastURL = url
+ src = self.req.load(str(formUrl), post={'captcha': result})
+
+ # find decrypted links
+ links = re.findall(r"<a href=\"(.+)\" style=\"text-align:center;font-weight:bold;\" class=\"button\" target=\"_blank\" onclick=\"this.className\+=' success';\">", src)
+
+ if not len(links) > 0:
+ self.retry()
+
+ self.correctCaptcha()
+
+ cleanedLinks = []
+ for link in links:
+ if link.startswith("http://dontknow.me/at/?"):
+ cleanedLink = urllib.unquote(link[23:])
+ else:
+ cleanedLink = link
+ self.logDebug("Link: %s" % cleanedLink)
+ cleanedLinks.append(cleanedLink)
+
+ self.logDebug("Decrypted %d links" % len(links))
+
+ self.pyfile.package().password = "iload.to"
+ self.packages.append((self.pyfile.package().name, cleanedLinks, self.pyfile.package().folder)) \ No newline at end of file
diff --git a/module/plugins/crypter/ShareRapidComFolder.py b/module/plugins/crypter/ShareRapidComFolder.py
new file mode 100644
index 000000000..cb7f37525
--- /dev/null
+++ b/module/plugins/crypter/ShareRapidComFolder.py
@@ -0,0 +1,14 @@
+# -*- coding: utf-8 -*-
+
+from module.plugins.internal.SimpleCrypter import SimpleCrypter
+
+class ShareRapidComFolder(SimpleCrypter):
+ __name__ = "ShareRapidComFolder"
+ __type__ = "crypter"
+ __pattern__ = r"http://(?:www\.)?((share(-?rapid\.(biz|com|cz|info|eu|net|org|pl|sk)|-(central|credit|free|net)\.cz|-ms\.net)|(s-?rapid|rapids)\.(cz|sk))|(e-stahuj|mediatack|premium-rapidshare|rapidshare-premium|qiuck)\.cz|kadzet\.com|stahuj-zdarma\.eu|strelci\.net|universal-share\.com)/(slozka/.+)"
+ __version__ = "0.01"
+ __description__ = """Share-Rapid.com Folder Plugin"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ LINK_PATTERN = r'<td class="soubor"[^>]*><a href="([^"]+)">' \ No newline at end of file
diff --git a/module/plugins/hoster/EasybytezCom.py b/module/plugins/hoster/EasybytezCom.py
new file mode 100644
index 000000000..5858dd935
--- /dev/null
+++ b/module/plugins/hoster/EasybytezCom.py
@@ -0,0 +1,60 @@
+# -*- coding: utf-8 -*-
+"""
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License,
+ or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+ @author: zoidberg
+"""
+
+import re
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+
+class EasybytezCom(SimpleHoster):
+ __name__ = "EasybytezCom"
+ __type__ = "hoster"
+ __pattern__ = r"http://(?:\w*\.)?easybytez.com/(\w+).*"
+ __version__ = "0.01"
+ __description__ = """easybytez.com"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ # shares code with TurbouploadCom
+
+ FILE_NAME_PATTERN = r'<input type="hidden" name="fname" value="(?P<N>[^"]+)"'
+ FILE_SIZE_PATTERN = r'You have requested <font color="red">[^<]+</font> \((?P<S>[^<]+)\)</font>'
+ FILE_OFFLINE_PATTERN = r'<h2>File Not Found</h2>'
+
+ FORM_INPUT_PATTERN = r'<input[^>]* name="([^"]+)" value="([^"]*)">'
+ WAIT_PATTERN = r'<span id="countdown_str">[^>]*>(\d+)</span> seconds</span>'
+
+ def handleFree(self):
+ self.download(self.pyfile.url, post = self.getPostParameters(), ref = True, cookies = True)
+
+ def getPostParameters(self):
+ inputs = dict(re.findall(self.FORM_INPUT_PATTERN, self.html))
+ self.logDebug(inputs)
+ inputs['method_free'] = "Free Download"
+ inputs['referer'] = self.pyfile.url
+ if 'method_premium' in inputs: del inputs['method_premium']
+
+ self.html = self.load(self.pyfile.url, post = inputs, ref = True, cookies = True)
+ inputs = dict(re.findall(self.FORM_INPUT_PATTERN, self.html))
+ self.logDebug(inputs)
+
+ found = re.search(self.WAIT_PATTERN, self.html)
+ self.setWait(int(found.group(1)) + 1 if found else 60)
+ self.wait()
+
+ return inputs
+
+getInfo = create_getInfo(EasybytezCom) \ No newline at end of file
diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py
index a4c6b1d52..484b48ba6 100644
--- a/module/plugins/hoster/MediafireCom.py
+++ b/module/plugins/hoster/MediafireCom.py
@@ -58,27 +58,20 @@ class MediafireCom(SimpleHoster):
__name__ = "MediafireCom"
__type__ = "hoster"
__pattern__ = r"http://(?:\w*\.)*mediafire\.com/[^?].*"
- __version__ = "0.68"
+ __version__ = "0.70"
__description__ = """Mediafire.com plugin - free only"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
- PAGE1_FUNCTION_PATTERN = r"function %s\(qk,pk1\)\{if[^']*'loadingicon'\);[^;]*; (.*?)eval"
- PAGE1_KEY_PATTERN = ";break;}\s*(\w+='';\w+=unescape.*?)eval\("
- PAGE1_RESULT_PATTERN = r"(\w+)\('(?P<qk>[^']+)','(?P<pk1>[^']+)'\)"
- PAGE1_DIV_PATTERN = r'getElementById\("(\w{32})"\)'
- PAGE1_PKR_PATTERN = r"pKr='([^']+)';"
+ DOWNLOAD_LINK_PATTERN = r'<div class="download_link"[^>]*z-index:(?P<zindex>\d+)[^>]*>\s*<a href="(?P<href>[^"]+)"'
+ JS_KEY_PATTERN = r"DoShow\('mfpromo1'\);\s*((\w+)='';.*?)eval\(\2\);"
+ JS_ZMODULO_PATTERN = r"\('z-index'\)\) \% (\d+)\)\);"
RECAPTCHA_PATTERN = r'src="http://(?:api.recaptcha.net|www.google.com/recaptcha/api)/challenge\?k=([^"]+)">'
PAGE1_ACTION_PATTERN = r'<link rel="canonical" href="([^"]+)"/>'
PASSWORD_PATTERN = r";break;}\s*dh\('"
- PAGE2_VARS_PATTERN = r'<script language="Javascript"><!--\s*(var.*?unescape.*?)eval\('
- PAGE2_DZ_PATTERN = r'break;case 15:(.*)</script>'
- PAGE2_LINK_PATTERN = r"(\w+='';\w+=unescape.*?)eval\(\w+\);(.{0,10}href=[^>]*>)?"
- FINAL_LINK_PATTERN = r'parent.document.getElementById\(\'(\w{32})\'\).*(http://[^"]+)" \+(\w+)\+ "([^"]+)">'
-
FILE_NAME_PATTERN = r'<META NAME="description" CONTENT="(?P<N>[^"]+)"/>'
- FILE_SIZE_PATTERN = r'<input type="hidden" id="sharedtabsfileinfo1-fs" value="(?P<S>[0-9.]+) (?P<U>[kKMG])i?B">'
+ FILE_SIZE_PATTERN = r'>Download <span>\((?P<S>[0-9.]+) (?P<U>[kKMG])i?B">\)</span>'
FILE_OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File. </div>'
def process(self, pyfile):
@@ -108,61 +101,25 @@ class MediafireCom(SimpleHoster):
else:
self.fail("No or incorrect password")
- found = re.search(self.PAGE1_KEY_PATTERN, self.html)
- if found:
- result = self.js.eval(found.group(1))
- found = re.search(self.PAGE1_RESULT_PATTERN, result)
- else:
- self.retry(3, 0, "Parse error (KEY)")
-
+ found = re.search(self.JS_KEY_PATTERN, self.html)
try:
- param_dict = found.groupdict()
- param_dict['r'] = re.search(self.PAGE1_PKR_PATTERN, self.html).group(1)
- self.logDebug(param_dict)
- key_func = found.group(1)
- self.logDebug("KEY_FUNC: %s" % key_func)
-
- found = re.search(self.PAGE1_FUNCTION_PATTERN % key_func, self.html)
result = self.js.eval(found.group(1))
- key_div = re.search(self.PAGE1_DIV_PATTERN, result).group(1)
- self.logDebug("KEY_DIV: %s" % key_div)
+ zmodulo = int(re.search(self.JS_ZMODULO_PATTERN, result).group(1))
+ self.logDebug("ZMODULO: %d" % zmodulo)
except Exception, e:
- self.logError(e)
- self.retry(3, 0, "Parse error (KEY DIV)")
-
- self.html = self.load("http://www.mediafire.com/dynamic/download.php", get=param_dict)
- js_expr = replace_eval(re.search(self.PAGE2_VARS_PATTERN, self.html).group(1))
- result = self.js.eval(js_expr)
- var_list = dict(re.findall("([^=]+)='([^']+)';", result))
-
- page2_dz = replace_eval(re.search(self.PAGE2_DZ_PATTERN, self.html, re.DOTALL).group(1))
-
- final_link = None
- for link_enc in re.finditer(self.PAGE2_LINK_PATTERN, page2_dz):
- #self.logDebug("LINK_ENC: %s..." % link_enc.group(1)[:20])
- try:
- link_dec = self.js.eval(link_enc.group(1))
- except Exception, e:
- self.logError("Unable to decrypt link %s" % link_enc.group(1)[:20])
- self.logError(e)
- self.logDebug(link_enc.group(1))
- continue
-
- #self.logDebug("LINK_DEC: %s" % link_dec)
- if link_enc.group(2): link_dec = link_dec + replace_eval(link_enc.group(2))
-
- found = re.search(self.FINAL_LINK_PATTERN, link_dec)
- if found:
- if found.group(1) == key_div:
- final_link = found.group(2) + var_list[found.group(3)] + found.group(4)
- break
- else:
- self.logDebug("Link not found in %s..." % link_dec)
- else:
- self.fail("Final link not found")
-
- self.logDebug("FINAL LINK: %s" % final_link)
- self.download(final_link)
+ self.logDebug(e)
+ self.retry(3, 0, "Parse error (MODULO)")
+
+ vlink = {'zindex': 0, 'href': ''}
+ for found in re.finditer(self.DOWNLOAD_LINK_PATTERN, self.html):
+ dlink = found.groupdict()
+ #self.logDebug(dlink)
+ dlink['zindex'] = int(dlink['zindex']) % zmodulo
+ if dlink['zindex'] >= vlink['zindex']:
+ vlink = dlink
+
+ self.logDebug("DOWNLOAD LINK:", vlink)
+ self.download(vlink['href'])
def checkCaptcha(self):
for i in range(5):
diff --git a/module/plugins/hoster/OronCom.py b/module/plugins/hoster/OronCom.py
index 6f0b197e9..e3e157a6d 100755
--- a/module/plugins/hoster/OronCom.py
+++ b/module/plugins/hoster/OronCom.py
@@ -33,7 +33,7 @@ class OronCom(Hoster):
__name__ = "OronCom"
__type__ = "hoster"
__pattern__ = r"http://(?:www.)?oron.com/"
- __version__ = "0.11"
+ __version__ = "0.12"
__description__ = "File Hoster: Oron.com"
__author_name__ = ("chrox", "DHMH")
__author_mail__ = ("chrox@pyload.org", "DHMH@pyload.org")
@@ -48,7 +48,8 @@ class OronCom(Hoster):
self.pyfile.url = "http://oron.com/" + self.file_id
def process(self, pyfile):
- req.load("http://oron.com/?op=change_lang&lang=german")
+ #self.load("http://oron.com/?op=change_lang&lang=german")
+ # already logged in, so the above line shouldn't be necessary
self.html = self.load(self.pyfile.url, ref=False, decode=True).encode("utf-8").replace("\n", "")
if "File could not be found" in self.html or "Datei nicht gefunden" in self.html:
self.offline()
@@ -69,7 +70,8 @@ class OronCom(Hoster):
self.handleFree()
def handleFree(self):
- req.load("http://oron.com/?op=change_lang&lang=german")
+ #self.load("http://oron.com/?op=change_lang&lang=german")
+ # already logged in, so the above line shouldn't be necessary
self.html = self.load(self.pyfile.url, ref=False, decode=True).replace("\n", "")
if "download1" in self.html:
post_url = "http://oron.com/" + self.file_id
@@ -144,4 +146,4 @@ class OronCom(Hoster):
self.html = self.load(post_url, post=post_dict, ref=False, decode=True).encode("utf-8")
link = re.search('href="(.*?)" class="atitle"', self.html).group(1)
- self.download(link) \ No newline at end of file
+ self.download(link)
diff --git a/module/plugins/hoster/PornhubCom.py b/module/plugins/hoster/PornhubCom.py
index 978bb04ab..445627873 100644
--- a/module/plugins/hoster/PornhubCom.py
+++ b/module/plugins/hoster/PornhubCom.py
@@ -8,7 +8,7 @@ class PornhubCom(Hoster):
__name__ = "PornhubCom"
__type__ = "hoster"
__pattern__ = r'http://[\w\.]*?pornhub\.com/view_video\.php\?viewkey=[\w\d]+'
- __version__ = "0.3"
+ __version__ = "0.4"
__description__ = """Pornhub.com Download Hoster"""
__author_name__ = ("jeix")
__author_mail__ = ("jeix@hasnomail.de")
diff --git a/module/plugins/hoster/ShareRapidCom.py b/module/plugins/hoster/ShareRapidCom.py
index 21512046e..b9ce61e18 100644
--- a/module/plugins/hoster/ShareRapidCom.py
+++ b/module/plugins/hoster/ShareRapidCom.py
@@ -8,31 +8,27 @@ from module.network.HTTPRequest import BadHeader
from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo
def getInfo(urls):
- result = []
-
+ file_info = []
for url in urls:
h = getRequest()
try:
h.c.setopt(HTTPHEADER, ["Accept: text/html"])
html = h.load(url, cookies = True, decode = True)
-
- file_info = parseFileInfo(ShareRapidCom, url, getURL(url, decode=True))
- result.append(file_info)
+ file_info = parseFileInfo(ShareRapidCom, url, html)
finally:
h.close()
-
- yield result
+ yield file_info
class ShareRapidCom(SimpleHoster):
__name__ = "ShareRapidCom"
__type__ = "hoster"
__pattern__ = r"http://(?:www\.)?((share(-?rapid\.(biz|com|cz|info|eu|net|org|pl|sk)|-(central|credit|free|net)\.cz|-ms\.net)|(s-?rapid|rapids)\.(cz|sk))|(e-stahuj|mediatack|premium-rapidshare|rapidshare-premium|qiuck)\.cz|kadzet\.com|stahuj-zdarma\.eu|strelci\.net|universal-share\.com)/(stahuj/.+)"
- __version__ = "0.46"
+ __version__ = "0.47"
__description__ = """Share-rapid.com plugin - premium only"""
__author_name__ = ("MikyWoW", "zoidberg")
__author_mail__ = ("MikyWoW@seznam.cz", "zoidberg@mujmail.cz")
- FILE_NAME_PATTERN = r'(?:title="Stahnout"|<h3>)(?P<N>[^<]+)</(?:a|h3)>'
+ FILE_NAME_PATTERN = r'<h1[^>]*><span[^>]*>(?:<a[^>]*>)?(?P<N>[^<]+)'
FILE_SIZE_PATTERN = r'<td class="i">Velikost:</td>\s*<td class="h"><strong>\s*(?P<S>[0-9.]+) (?P<U>[kKMG])i?B</strong></td>'
DOWNLOAD_URL_PATTERN = r'<a href="([^"]+)" title="Stahnout">([^<]+)</a>'
ERR_LOGIN_PATTERN = ur'<div class="error_div"><strong>Stahování je přístupné pouze přihlášeným uživatelům'
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py
index ab7f5b249..d355eeffe 100644
--- a/module/plugins/hoster/ShareonlineBiz.py
+++ b/module/plugins/hoster/ShareonlineBiz.py
@@ -38,7 +38,7 @@ class ShareonlineBiz(Hoster):
__name__ = "ShareonlineBiz"
__type__ = "hoster"
__pattern__ = r"http://[\w\.]*?(share\-online\.biz|egoshare\.com)/(download.php\?id\=|dl/)[\w]+"
- __version__ = "0.21"
+ __version__ = "0.22"
__description__ = """Shareonline.biz Download Hoster"""
__author_name__ = ("spoob", "mkaay")
__author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de")
diff --git a/module/plugins/hoster/TurbouploadCom.py b/module/plugins/hoster/TurbouploadCom.py
new file mode 100644
index 000000000..59939d3c7
--- /dev/null
+++ b/module/plugins/hoster/TurbouploadCom.py
@@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+"""
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License,
+ or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+ @author: zoidberg
+"""
+
+import re
+from module.plugins.internal.SimpleHoster import create_getInfo
+from module.plugins.hoster.EasybytezCom import EasybytezCom
+
+class TurbouploadCom(EasybytezCom):
+ __name__ = "TurbouploadCom"
+ __type__ = "hoster"
+ __pattern__ = r"http://(?:\w*\.)?turboupload.com/(\w+).*"
+ __version__ = "0.01"
+ __description__ = """turboupload.com"""
+ __author_name__ = ("zoidberg")
+ __author_mail__ = ("zoidberg@mujmail.cz")
+
+ # shares code with EasybytezCom
+
+ DIRECT_LINK_PATTERN = r'<a href="(http://turboupload.com/files/[^"]+)">\1</a>'
+
+ def handleFree(self):
+ self.html = self.load(self.pyfile.url, post = self.getPostParameters(), ref = True, cookies = True)
+ found = re.search(self.DIRECT_LINK_PATTERN, self.html)
+ if not found: self.parseError('Download Link')
+ url = found.group(1)
+ self.logDebug('URL: ' + url)
+ self.download(url)
+
+getInfo = create_getInfo(TurbouploadCom) \ No newline at end of file
diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py
index 3fb2d4ba2..83bbaea82 100644
--- a/module/plugins/hoster/UploadingCom.py
+++ b/module/plugins/hoster/UploadingCom.py
@@ -80,6 +80,12 @@ class UploadingCom(Hoster):
raise Exception("Plugin defect.")
def handleFree(self):
+ found = re.search('<h2>((Daily )?Download Limit)</h2>', self.html[0])
+ if found:
+ self.pyfile.error = found.group(1)
+ self.logWarning(self.pyfile.error)
+ self.retry(max_tries=6, wait_time = 21600 if found.group(2) else 900, reason = self.pyfile.error)
+
self.code = re.search(r'name="code" value="(.*?)"', self.html[0]).group(1)
self.fileid = re.search(r'name="file_id" value="(.*?)"', self.html[0]).group(1)
diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py
index f5c078471..2b3ea7ed7 100644
--- a/module/plugins/hoster/YoutubeCom.py
+++ b/module/plugins/hoster/YoutubeCom.py
@@ -11,7 +11,7 @@ class YoutubeCom(Hoster):
__name__ = "YoutubeCom"
__type__ = "hoster"
__pattern__ = r"http://(www\.)?(de\.)?\youtube\.com/watch\?v=.*"
- __version__ = "0.23"
+ __version__ = "0.24"
__config__ = [("quality", "sd;hd;fullhd", "Quality Setting", "hd"),
("fmt", "int", "FMT Number 0-45", 0),
(".mp4", "bool", "Allow .mp4", True),
@@ -75,6 +75,10 @@ class YoutubeCom(Hoster):
fmt_dict[fmt] = unquote(url)
self.logDebug("Found links: %s" % fmt_dict)
+ for fmt in fmt_dict.keys():
+ if fmt not in self.formats:
+ self.logDebug("FMT not supported: %s" % fmt)
+ del fmt_dict[fmt]
allowed = lambda x: self.getConfig(self.formats[x][0])
sel = lambda x: self.formats[x][3] #select quality index