summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/BezvadataCz.py4
-rw-r--r--module/plugins/hoster/CrockoCom.py2
-rw-r--r--module/plugins/hoster/CzshareCom.py8
-rw-r--r--module/plugins/hoster/DailymotionCom.py2
-rw-r--r--module/plugins/hoster/DataportCz.py2
-rw-r--r--module/plugins/hoster/EuroshareEu.py2
-rw-r--r--module/plugins/hoster/ExtabitCom.py6
-rw-r--r--module/plugins/hoster/FilepostCom.py2
-rw-r--r--module/plugins/hoster/FilesMailRu.py23
-rw-r--r--module/plugins/hoster/FileserveCom.py23
-rw-r--r--module/plugins/hoster/FourSharedCom.py2
-rw-r--r--module/plugins/hoster/FreakshareCom.py14
-rw-r--r--module/plugins/hoster/FshareVn.py10
-rw-r--r--module/plugins/hoster/Ftp.py3
-rw-r--r--module/plugins/hoster/HighWayMe.py4
-rw-r--r--module/plugins/hoster/Http.py2
-rw-r--r--module/plugins/hoster/HugefilesNet.py2
-rw-r--r--module/plugins/hoster/IfolderRu.py4
-rw-r--r--module/plugins/hoster/JumbofilesCom.py2
-rw-r--r--module/plugins/hoster/Keep2ShareCc.py2
-rw-r--r--module/plugins/hoster/LetitbitNet.py19
-rw-r--r--module/plugins/hoster/LuckyShareNet.py6
-rw-r--r--module/plugins/hoster/MegaRapidCz.py17
-rw-r--r--module/plugins/hoster/MultishareCz.py2
-rw-r--r--module/plugins/hoster/NarodRu.py6
-rw-r--r--module/plugins/hoster/NoPremiumPl.py4
-rw-r--r--module/plugins/hoster/OneFichierCom.py2
-rw-r--r--module/plugins/hoster/OpenloadIo.py4
-rw-r--r--module/plugins/hoster/PornhubCom.py2
-rw-r--r--module/plugins/hoster/QuickshareCz.py4
-rw-r--r--module/plugins/hoster/RapideoPl.py4
-rw-r--r--module/plugins/hoster/SecureUploadEu.py2
-rw-r--r--module/plugins/hoster/SendspaceCom.py2
-rw-r--r--module/plugins/hoster/ShareonlineBiz.py6
-rw-r--r--module/plugins/hoster/ShareplaceCom.py2
-rw-r--r--module/plugins/hoster/SimplyPremiumCom.py4
-rw-r--r--module/plugins/hoster/SmoozedCom.py2
-rw-r--r--module/plugins/hoster/StreamCz.py1
-rw-r--r--module/plugins/hoster/UloziskoSk.py2
-rw-r--r--module/plugins/hoster/UnibytesCom.py10
-rw-r--r--module/plugins/hoster/UploadableCh.py2
-rw-r--r--module/plugins/hoster/VeehdCom.py2
-rw-r--r--module/plugins/hoster/VidPlayNet.py2
-rw-r--r--module/plugins/hoster/XDCC.py2
-rw-r--r--module/plugins/hoster/XHamsterCom.py4
-rw-r--r--module/plugins/hoster/XVideosCom.py4
-rw-r--r--module/plugins/hoster/YoupornCom.py2
-rw-r--r--module/plugins/hoster/YourfilesTo.py2
-rw-r--r--module/plugins/hoster/YoutubeCom.py2
-rw-r--r--module/plugins/hoster/ZDF.py2
50 files changed, 80 insertions, 164 deletions
diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py
index 51082a8a1..626673b44 100644
--- a/module/plugins/hoster/BezvadataCz.py
+++ b/module/plugins/hoster/BezvadataCz.py
@@ -23,8 +23,8 @@ class BezvadataCz(SimpleHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- NAME_PATTERN = r'<p><b>Soubor: (?P<N>[^<]+)</b></p>'
- SIZE_PATTERN = r'<li><strong>Velikost:</strong> (?P<S>[^<]+)</li>'
+ NAME_PATTERN = r'<p><b>Soubor: (?P<N>.+?)</b></p>'
+ SIZE_PATTERN = r'<li><strong>Velikost:</strong> (?P<S>.+?)</li>'
OFFLINE_PATTERN = r'<title>BezvaData \| Soubor nenalezen</title>'
diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py
index 2205759e8..eb8da1f9f 100644
--- a/module/plugins/hoster/CrockoCom.py
+++ b/module/plugins/hoster/CrockoCom.py
@@ -26,7 +26,7 @@ class CrockoCom(SimpleHoster):
NAME_PATTERN = r'<span class="fz24">Download:\s*<strong>(?P<N>.*)'
- SIZE_PATTERN = r'<span class="tip1"><span class="inner">(?P<S>[^<]+)</span></span>'
+ SIZE_PATTERN = r'<span class="tip1"><span class="inner">(?P<S>.+?)</span></span>'
OFFLINE_PATTERN = r'<h1>Sorry,<br />the page you\'re looking for <br />isn\'t here.</h1>|File not found'
CAPTCHA_PATTERN = r"u='(/file_contents/captcha/\w+)';\s*w='(\d+)';"
diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py
index c2a7d3409..42a2ec02b 100644
--- a/module/plugins/hoster/CzshareCom.py
+++ b/module/plugins/hoster/CzshareCom.py
@@ -27,7 +27,7 @@ class CzshareCom(SimpleHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- NAME_PATTERN = r'<div class="tab" id="parameters">\s*<p>\s*Cel. n.zev: <a href=.*?>(?P<N>[^<]+)</a>'
+ NAME_PATTERN = r'<div class="tab" id="parameters">\s*<p>\s*Cel. n.zev: <a href=.*?>(?P<N>.+?)</a>'
SIZE_PATTERN = r'<div class="tab" id="category">(?:\s*<p>[^\n]*</p>)*\s*Velikost:\s*(?P<S>[\d .,]+)(?P<U>[\w^_]+)\s*</div>'
OFFLINE_PATTERN = r'<div class="header clearfix">\s*<h2 class="red">'
@@ -40,7 +40,7 @@ class CzshareCom(SimpleHoster):
FREE_FORM_PATTERN = r'<form action="download\.php" method="post">\s*<img src="captcha\.php" id="captcha" />(.*?)</form>'
PREMIUM_FORM_PATTERN = r'<form action="/profi_down\.php" method="post">(.*?)</form>'
FORM_INPUT_PATTERN = r'<input[^>]* name="(.+?)" value="(.+?)"[^>]*/>'
- MULTIDL_PATTERN = r'<p><font color=\'red\'>Z[^<]*PROFI.</font></p>'
+ MULTIDL_PATTERN = r'<p><font color=\'red\'>Z.*?PROFI.</font></p>'
USER_CREDIT_PATTERN = r'<div class="credit">\s*kredit: <strong>([\d .,]+)(\w+)</strong>\s*</div><!-- .credit -->'
@@ -139,8 +139,8 @@ class CzshareCom(SimpleHoster):
def check_download(self):
#: Check download
check = self.scan_download({
- "temp offline" : re.compile(r"^Soubor je do.*asn.* nedostupn.*$"),
- 'credit' : re.compile(r"^Nem.*te dostate.*n.* kredit.$"),
+ "temp offline" : re.compile(r'^Soubor je do.*asn.* nedostupn.*$'),
+ 'credit' : re.compile(r'^Nem.*te dostate.*n.* kredit.$'),
"multi-dl" : re.compile(self.MULTIDL_PATTERN),
'captcha' : "<li>Zadaný ověřovací kód nesouhlasí!</li>"
})
diff --git a/module/plugins/hoster/DailymotionCom.py b/module/plugins/hoster/DailymotionCom.py
index 119373b08..bef146d84 100644
--- a/module/plugins/hoster/DailymotionCom.py
+++ b/module/plugins/hoster/DailymotionCom.py
@@ -64,7 +64,7 @@ class DailymotionCom(Hoster):
def get_streams(self):
streams = []
- for result in re.finditer(r"\"(?P<URL>http:\\/\\/www.dailymotion.com\\/cdn\\/H264-(?P<QF>.*?)\\.*?)\"",
+ for result in re.finditer(r'\"(?P<URL>http:\\/\\/www.dailymotion.com\\/cdn\\/H264-(?P<QF>.*?)\\.*?)\"',
self.data):
url = result.group('URL')
qf = result.group('QF')
diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py
index 5c9756b51..2ec4eb6b1 100644
--- a/module/plugins/hoster/DataportCz.py
+++ b/module/plugins/hoster/DataportCz.py
@@ -21,7 +21,7 @@ class DataportCz(SimpleHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- NAME_PATTERN = r'<span itemprop="name">(?P<N>[^<]+)</span>'
+ NAME_PATTERN = r'<span itemprop="name">(?P<N>.+?)</span>'
SIZE_PATTERN = r'<td class="fil">Velikost</td>\s*<td>(?P<S>[^<]+)</td>'
OFFLINE_PATTERN = r'<h2>Soubor nebyl nalezen</h2>'
diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py
index 2df748cd2..3ef8f89bd 100644
--- a/module/plugins/hoster/EuroshareEu.py
+++ b/module/plugins/hoster/EuroshareEu.py
@@ -33,7 +33,7 @@ class EuroshareEu(SimpleHoster):
DL_LIMIT_PATTERN = r'<h2>Prebieha s.ahovanie</h2>|<p>Naraz je z jednej IP adresy mo.n. s.ahova. iba jeden s.bor'
ERROR_PATTERN = r'href="/customer-zone/login/"'
- URL_REPLACEMENTS = [(r"(http://[^/]*\.)(sk|cz|hu|pl)/", r"\1eu/")]
+ URL_REPLACEMENTS = [(r'(http://[^/]*\.)(sk|cz|hu|pl)/', r'\1eu/')]
def handle_premium(self, pyfile):
diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py
index f854c0e38..e71fb41c1 100644
--- a/module/plugins/hoster/ExtabitCom.py
+++ b/module/plugins/hoster/ExtabitCom.py
@@ -28,7 +28,7 @@ class ExtabitCom(SimpleHoster):
NAME_PATTERN = r'<th>File:</th>\s*<td class="col-fileinfo">\s*<div title="(?P<N>.+?)">'
- SIZE_PATTERN = r'<th>Size:</th>\s*<td class="col-fileinfo">(?P<S>[^<]+)</td>'
+ SIZE_PATTERN = r'<th>Size:</th>\s*<td class="col-fileinfo">(?P<S>.+?)</td>'
OFFLINE_PATTERN = r'>File not found<'
TEMP_OFFLINE_PATTERN = r'>(File is temporary unavailable|No download mirror)<'
@@ -36,10 +36,10 @@ class ExtabitCom(SimpleHoster):
def handle_free(self, pyfile):
- if r">Only premium users can download this file" in self.data:
+ if r'>Only premium users can download this file" in self.data:
self.fail(_("Only premium users can download this file"))
- m = re.search(r"Next free download from your ip will be available in <b>(\d+)\s*minutes", self.data)
+ m = re.search(r"Next free download from your ip will be available in <b>(\d+)\s*minutes', self.data)
if m is not None:
self.wait(int(m.group(1)) * 60, True)
elif "The daily downloads limit from your IP is exceeded" in self.data:
diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py
index c47684522..0d2e3d81f 100644
--- a/module/plugins/hoster/FilepostCom.py
+++ b/module/plugins/hoster/FilepostCom.py
@@ -26,7 +26,7 @@ class FilepostCom(SimpleHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- INFO_PATTERN = r'<input type="text" id="url" value=\'<a href.*?>(?P<N>[^>]+?) - (?P<S>[\d.,]+) (?P<U>[\w^_]+)</a>\' class="inp_text"/>'
+ INFO_PATTERN = r'<input type="text" id="url" value=\'<a href.*?>(?P<N>.+?) - (?P<S>[\d.,]+) (?P<U>[\w^_]+)</a>\' class="inp_text"/>'
OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File. </div>|<div class="file_info file_info_deleted">'
PREMIUM_ONLY_PATTERN = r'members only. Please upgrade to premium|a premium membership is required to download this file'
diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py
index 04a91fe94..cab8dc68a 100644
--- a/module/plugins/hoster/FilesMailRu.py
+++ b/module/plugins/hoster/FilesMailRu.py
@@ -7,29 +7,6 @@ from module.plugins.internal.Hoster import Hoster
from module.plugins.internal.misc import chunks
-def get_info(urls):
- result = []
- for chunk in chunks(urls, 10):
- for url in chunk:
- html = get_url(url)
- if r'<div class="errorMessage mb10">' in html:
- result.append((url, 0, 1, url))
- elif r'Page cannot be displayed' in html:
- result.append((url, 0, 1, url))
- else:
- try:
- url_pattern = '<a href="(.+?)" onclick="return Act\(this\, \'dlink\'\, event\)">(.+?)</a>'
- file_name = re.search(url_pattern, html).group(0).split(', event)">')[1].split('</a>')[0]
- result.append((file_name, 0, 2, url))
-
- except Exception:
- pass
-
- #: status 1=OFFLINE, 2=OK, 3=UNKNOWN
- #: result.append((#name,#size,#status,#url))
- yield result
-
-
class FilesMailRu(Hoster):
__name__ = "FilesMailRu"
__type__ = "hoster"
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index cb39311bc..933911f4f 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -8,26 +8,6 @@ from module.plugins.internal.Hoster import Hoster
from module.plugins.internal.misc import json, parse_size, seconds_to_midnight
-def get_info(plugin, urls):
- html = get_url(plugin.URLS[1], post={'urls': "\n".join(urls)})
-
- file_info = []
- for li in re.finditer(plugin.LINKCHECK_TR, html, re.S):
- try:
- cols = re.findall(plugin.LINKCHECK_TD, li.group(1))
- if cols:
- file_info.append((
- cols[1] if cols[1] != '--' else cols[0],
- parse_size(cols[2]) if cols[2] != '--' else 0,
- 2 if cols[3].startswith('Available') else 1,
- cols[0]))
-
- except Exception, e:
- continue
-
- return file_info
-
-
class FileserveCom(Hoster):
__name__ = "FileserveCom"
__type__ = "hoster"
@@ -49,9 +29,6 @@ class FileserveCom(Hoster):
"http://www.fileserve.com/link-checker.php",
"http://www.fileserve.com/checkReCaptcha.php"]
- LINKCHECK_TR = r'<tr>\s*(<td>http://www\.fileserve\.com/file/.*?)</tr>'
- LINKCHECK_TD = r'<td>(?:<.*?>|&nbsp;)*([^<]*)'
-
CAPTCHA_KEY_PATTERN = r'var reCAPTCHA_publickey=\'(.+?)\''
LONG_WAIT_PATTERN = r'<li class="title">You need to wait (\d+) (\w+) to start another download\.</li>'
LINK_EXPIRED_PATTERN = r'Your download link has expired'
diff --git a/module/plugins/hoster/FourSharedCom.py b/module/plugins/hoster/FourSharedCom.py
index ccfd30f4a..ab8d6ab48 100644
--- a/module/plugins/hoster/FourSharedCom.py
+++ b/module/plugins/hoster/FourSharedCom.py
@@ -28,7 +28,7 @@ class FourSharedCom(SimpleHoster):
SIZE_PATTERN = r'<span title="Size: (?P<S>[\d.,]+) (?P<U>[\w^_]+)">'
OFFLINE_PATTERN = r'The file link that you requested is not valid\.|This file was deleted.'
- NAME_REPLACEMENTS = [(r"&#(\d+).", lambda m: unichr(int(m.group(1))))]
+ NAME_REPLACEMENTS = [(r'&#(\d+).', lambda m: unichr(int(m.group(1))))]
SIZE_REPLACEMENTS = [(",", "")]
DIRECT_LINK = False
diff --git a/module/plugins/hoster/FreakshareCom.py b/module/plugins/hoster/FreakshareCom.py
index b24dabd28..ddad47699 100644
--- a/module/plugins/hoster/FreakshareCom.py
+++ b/module/plugins/hoster/FreakshareCom.py
@@ -112,7 +112,7 @@ class FreakshareCom(Hoster):
self.download_html()
if not self.wantReconnect:
- m = re.search(r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">([^ ]+)", self.data)
+ m = re.search(r'<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">([^ ]+)', self.data)
if m is not None:
file_name = m.group(1)
else:
@@ -129,7 +129,7 @@ class FreakshareCom(Hoster):
self.download_html()
if not self.wantReconnect:
- m = re.search(r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">[^ ]+ - ([^ ]+) (\w\w)yte", self.data)
+ m = re.search(r'<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">[^ ]+ - ([^ ]+) (\w\w)yte', self.data)
if m is not None:
units = float(m.group(1).replace(",", ""))
pow = {'KB': 1, 'MB': 2, 'GB': 3}[m.group(2)]
@@ -159,24 +159,24 @@ class FreakshareCom(Hoster):
"""
if not self.data:
self.download_html()
- if re.search(r"This file does not exist!", self.data):
+ if re.search(r'This file does not exist!', self.data):
return False
else:
return True
def get_download_options(self):
- re_envelope = re.search(r".*?value=\"Free\sDownload\".*?\n*?(.*?<.*?>\n*)*?\n*\s*?</form>",
+ re_envelope = re.search(r'.*?value=\"Free\sDownload\".*?\n*?(.*?<.*?>\n*)*?\n*\s*?</form>',
self.data).group(0) #: Get the whole request
- to_sort = re.findall(r"<input\stype=\"hidden\"\svalue=\"(.*?)\"\sname=\"(.*?)\"\s\/>", re_envelope)
+ to_sort = re.findall(r'<input\stype=\"hidden\"\svalue=\"(.*?)\"\sname=\"(.*?)\"\s\/>', re_envelope)
request_options = dict((n, v) for (v, n) in to_sort)
herewego = self.load(self.pyfile.url, None, request_options) #: The actual download-Page
- to_sort = re.findall(r"<input\stype=\".*?\"\svalue=\"(\S*?)\".*?name=\"(\S*?)\"\s.*?\/>", herewego)
+ to_sort = re.findall(r'<input\stype=\".*?\"\svalue=\"(\S*?)\".*?name=\"(\S*?)\"\s.*?\/>', herewego)
request_options = dict((n, v) for (v, n) in to_sort)
- challenge = re.search(r"http://api\.recaptcha\.net/challenge\?k=(\w+)", herewego)
+ challenge = re.search(r'http://api\.recaptcha\.net/challenge\?k=(\w+)', herewego)
if challenge:
re_captcha = ReCaptcha(self.pyfile)
diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py
index 8fa920e07..5a6710470 100644
--- a/module/plugins/hoster/FshareVn.py
+++ b/module/plugins/hoster/FshareVn.py
@@ -9,14 +9,6 @@ from module.plugins.internal.Base import parse_fileInfo
from module.plugins.internal.SimpleHoster import SimpleHoster
-def get_info(urls):
- for url in urls:
- html = get_url("http://www.fshare.vn/check_link.php",
- post={'action': "check_link", 'arrlinks': url})
-
- yield parse_fileInfo(FshareVn, url, html)
-
-
def double_decode(m):
return m.group(1).decode('raw_unicode_escape')
@@ -39,7 +31,7 @@ class FshareVn(SimpleHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- INFO_PATTERN = r'<p>(?P<N>[^<]+)<\\/p>[\\trn\s]*<p>(?P<S>[\d.,]+)\s*(?P<U>[\w^_]+)<\\/p>'
+ INFO_PATTERN = r'<p>(?P<N>.+?)<\\/p>[\\trn\s]*<p>(?P<S>[\d.,]+)\s*(?P<U>[\w^_]+)<\\/p>'
OFFLINE_PATTERN = r'<div class=\\"f_left file_w\\"|<\\/p>\\t\\t\\t\\t\\r\\n\\t\\t<p><\\/p>\\t\\t\\r\\n\\t\\t<p>0 KB<\\/p>'
NAME_REPLACEMENTS = [("(.*)", double_decode)]
diff --git a/module/plugins/hoster/Ftp.py b/module/plugins/hoster/Ftp.py
index 623879dd8..babf6c2c5 100644
--- a/module/plugins/hoster/Ftp.py
+++ b/module/plugins/hoster/Ftp.py
@@ -67,10 +67,9 @@ class Ftp(Hoster):
self.req.http.c.setopt(pycurl.NOBODY, 0)
self.log_debug(self.req.http.header)
- m = re.search(r"Content-Length:\s*(\d+)", res)
+ m = re.search(r'Content-Length:\s*(\d+)', res)
if m is not None:
pyfile.size = int(m.group(1))
-
self.download(pyfile.url)
else:
diff --git a/module/plugins/hoster/HighWayMe.py b/module/plugins/hoster/HighWayMe.py
index 029cb7fdc..cf50d2808 100644
--- a/module/plugins/hoster/HighWayMe.py
+++ b/module/plugins/hoster/HighWayMe.py
@@ -65,7 +65,7 @@ class HighWayMe(MultiHoster):
self.check_errors()
try:
- self.pyfile.name = re.search(r'<name>([^<]+)</name>', self.data).group(1)
+ self.pyfile.name = re.search(r'<name>(.+?)</name>', self.data).group(1)
except AttributeError:
self.pyfile.name = ""
@@ -76,4 +76,4 @@ class HighWayMe(MultiHoster):
except AttributeError:
self.pyfile.size = 0
- self.link = re.search(r'<download>([^<]+)</download>', self.data).group(1)
+ self.link = re.search(r'<download>(.+?)</download>', self.data).group(1)
diff --git a/module/plugins/hoster/Http.py b/module/plugins/hoster/Http.py
index 9d03b189b..01748c697 100644
--- a/module/plugins/hoster/Http.py
+++ b/module/plugins/hoster/Http.py
@@ -15,7 +15,7 @@ class Http(Hoster):
__pattern__ = r'(?:jd|pys?)://.+'
__config__ = [("activated", "bool", "Activated", True)]
- __description__ = """Download from http link"""
+ __description__ = """Download simple http link"""
__license__ = "GPLv3"
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
diff --git a/module/plugins/hoster/HugefilesNet.py b/module/plugins/hoster/HugefilesNet.py
index 0c8f1ecc4..85f8b45f2 100644
--- a/module/plugins/hoster/HugefilesNet.py
+++ b/module/plugins/hoster/HugefilesNet.py
@@ -25,6 +25,6 @@ class HugefilesNet(XFSHoster):
PLUGIN_DOMAIN = "hugefiles.net"
- SIZE_PATTERN = r'File Size:</span>\s*<span.*?>(?P<S>[^<]+)</span></div>'
+ SIZE_PATTERN = r'File Size:</span>\s*<span.*?>(?P<S>.+?)</span></div>'
FORM_INPUTS_MAP = {'ctype': re.compile(r'\d+')}
diff --git a/module/plugins/hoster/IfolderRu.py b/module/plugins/hoster/IfolderRu.py
index 919d37b75..8e47c01ed 100644
--- a/module/plugins/hoster/IfolderRu.py
+++ b/module/plugins/hoster/IfolderRu.py
@@ -25,8 +25,8 @@ class IfolderRu(SimpleHoster):
SIZE_REPLACEMENTS = [(u'Кб', 'KB'), (u'Мб', 'MB'), (u'Гб', 'GB')]
- NAME_PATTERN = ur'(?:<div><span>)?Название:(?:</span>)? <b>(?P<N>[^<]+)</b><(?:/div|br)>'
- SIZE_PATTERN = ur'(?:<div><span>)?Размер:(?:</span>)? <b>(?P<S>[^<]+)</b><(?:/div|br)>'
+ NAME_PATTERN = ur'(?:<div><span>)?Название:(?:</span>)? <b>(?P<N>.+?)</b><(?:/div|br)>'
+ SIZE_PATTERN = ur'(?:<div><span>)?Размер:(?:</span>)? <b>(?P<S>.+?)</b><(?:/div|br)>'
OFFLINE_PATTERN = ur'<p>Файл номер <b>.*?</b> (не найден|удален) !!!</p>'
SESSION_ID_PATTERN = r'<input type="hidden" name="session" value="(.+?)"'
diff --git a/module/plugins/hoster/JumbofilesCom.py b/module/plugins/hoster/JumbofilesCom.py
index fe3ffb9eb..86d4e9f3f 100644
--- a/module/plugins/hoster/JumbofilesCom.py
+++ b/module/plugins/hoster/JumbofilesCom.py
@@ -23,7 +23,7 @@ class JumbofilesCom(SimpleHoster):
__authors__ = [("godofdream", "soilfiction@gmail.com")]
- INFO_PATTERN = r'<TR><TD>(?P<N>[^<]+?)\s*<small>\((?P<S>[\d.,]+)\s*(?P<U>[\w^_]+)'
+ INFO_PATTERN = r'<TR><TD>(?P<N>.+?)\s*<small>\((?P<S>[\d.,]+)\s*(?P<U>[\w^_]+)'
OFFLINE_PATTERN = r'Not Found or Deleted / Disabled due to inactivity or DMCA'
LINK_FREE_PATTERN = r'<meta http-equiv="refresh" content="10;url=(.+)">'
diff --git a/module/plugins/hoster/Keep2ShareCc.py b/module/plugins/hoster/Keep2ShareCc.py
index 43c89176b..a66033590 100644
--- a/module/plugins/hoster/Keep2ShareCc.py
+++ b/module/plugins/hoster/Keep2ShareCc.py
@@ -29,7 +29,7 @@ class Keep2ShareCc(SimpleHoster):
URL_REPLACEMENTS = [(__pattern__ + ".*", "http://keep2s.cc/file/\g<ID>")]
NAME_PATTERN = r'File: <span>(?P<N>.+?)</span>'
- SIZE_PATTERN = r'Size: (?P<S>[^<]+)</div>'
+ SIZE_PATTERN = r'Size: (?P<S>.+?)</div>'
OFFLINE_PATTERN = r'File not found or deleted|Sorry, this file is blocked or deleted|Error 404'
TEMP_OFFLINE_PATTERN = r'Downloading blocked due to'
diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py
index 2d3b9da9c..321ced131 100644
--- a/module/plugins/hoster/LetitbitNet.py
+++ b/module/plugins/hoster/LetitbitNet.py
@@ -16,23 +16,6 @@ from module.plugins.internal.SimpleHoster import SimpleHoster
from module.plugins.internal.misc import seconds_to_midnight
-def api_response(url):
- json_data = ["yw7XQy2v9", ["download/info", {'link': url}]]
- api_rep = get_url("http://api.letitbit.net/json",
- post={'r': json.dumps(json_data)})
- return json.loads(api_rep)
-
-
-def get_info(urls):
- for url in urls:
- api_rep = api_response(url)
- if api_rep['status'] == "OK":
- info = api_rep['data'][0]
- yield (info['name'], info['size'], 2, url)
- else:
- yield (url, 0, 1, url)
-
-
class LetitbitNet(SimpleHoster):
__name__ = "LetitbitNet"
__type__ = "hoster"
@@ -52,7 +35,7 @@ class LetitbitNet(SimpleHoster):
("z00nx", "z00nx0@gmail.com")]
- URL_REPLACEMENTS = [(r"(?<=http://)([^/]+)", "letitbit.net")]
+ URL_REPLACEMENTS = [(r'(?<=http://)([^/]+)', "letitbit.net")]
SECONDS_PATTERN = r'seconds\s*=\s*(\d+);'
CAPTCHA_CONTROL_FIELD = r'recaptcha_control_field\s=\s\'(.+?)\''
diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py
index 1aa5501d5..ad6d0be85 100644
--- a/module/plugins/hoster/LuckyShareNet.py
+++ b/module/plugins/hoster/LuckyShareNet.py
@@ -32,7 +32,7 @@ class LuckyShareNet(SimpleHoster):
def parse_json(self, rep):
if 'AJAX Error' in rep:
html = self.load(self.pyfile.url)
- m = re.search(r"waitingtime = (\d+);", html)
+ m = re.search(r'waitingtime = (\d+);', html)
if m is not None:
seconds = int(m.group(1))
self.log_debug("You have to wait %d seconds between free downloads" % seconds)
@@ -47,7 +47,7 @@ class LuckyShareNet(SimpleHoster):
#@TODO: There should be a filesize limit for free downloads
#: Some files could not be downloaded in free mode
def handle_free(self, pyfile):
- rep = self.load(r"http://luckyshare.net/download/request/type/time/file/" + self.info['pattern']['ID'])
+ rep = self.load(r'http://luckyshare.net/download/request/type/time/file/' + self.info['pattern']['ID'])
self.log_debug("JSON: " + rep)
@@ -57,7 +57,7 @@ class LuckyShareNet(SimpleHoster):
self.captcha = ReCaptcha(pyfile)
response, challenge = self.captcha.challenge()
- rep = self.load(r"http://luckyshare.net/download/verify/challenge/%s/response/%s/hash/%s" %
+ rep = self.load(r'http://luckyshare.net/download/verify/challenge/%s/response/%s/hash/%s' %
(challenge, response, json_data['hash']))
self.log_debug("JSON: " + rep)
diff --git a/module/plugins/hoster/MegaRapidCz.py b/module/plugins/hoster/MegaRapidCz.py
index 3d1b288d6..4ba13c57f 100644
--- a/module/plugins/hoster/MegaRapidCz.py
+++ b/module/plugins/hoster/MegaRapidCz.py
@@ -10,17 +10,6 @@ from module.plugins.internal.Base import parse_fileInfo
from module.plugins.internal.SimpleHoster import SimpleHoster
-def get_info(urls):
- h = get_request()
- h.c.setopt(pycurl.HTTPHEADER,
- ["Accept: text/html",
- "User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0"])
-
- for url in urls:
- html = h.load(url)
- yield parse_fileInfo(MegaRapidCz, url, html)
-
-
class MegaRapidCz(SimpleHoster):
__name__ = "MegaRapidCz"
__type__ = "hoster"
@@ -42,13 +31,13 @@ class MegaRapidCz(SimpleHoster):
("Walter Purcaro", "vuolter@gmail.com")]
- NAME_PATTERN = r'<h1.*?><span.*?>(?:<a.*?>)?(?P<N>[^<]+)'
- SIZE_PATTERN = r'<td class="i">Velikost:</td>\s*<td class="h"><strong>\s*(?P<S>[\d.,]+) (?P<U>[\w^_]+)</strong></td>'
+ NAME_PATTERN = r'<h1.*?><span.*?>(?:<a.*?>)?(?P<N>.+?)'
+ SIZE_PATTERN = r'<td class="i">Velikost:</td>\s*<td class="h"><strong>\s*(?P<S>[\d.,]+) (?P<U>[\w^_]+)</strong></td>'
OFFLINE_PATTERN = ur'Nastala chyba 404|Soubor byl smazán'
CHECK_TRAFFIC = True
- LINK_PREMIUM_PATTERN = r'<a href="(.+?)" title="Stahnout">([^<]+)</a>'
+ LINK_PREMIUM_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'
ERR_CREDIT_PATTERN = ur'<div class="error_div"><strong>Stahování zdarma je možné jen přes náš'
diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py
index fca6974f9..36ac8e70b 100644
--- a/module/plugins/hoster/MultishareCz.py
+++ b/module/plugins/hoster/MultishareCz.py
@@ -29,7 +29,7 @@ class MultishareCz(SimpleHoster):
CHECK_TRAFFIC = True
LEECH_HOSTER = True
- INFO_PATTERN = ur'(?:<li>Název|Soubor): <strong>(?P<N>[^<]+)</strong><(?:/li><li|br)>Velikost: <strong>(?P<S>[^<]+)</strong>'
+ 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>'
diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py
index 4f7c7e321..1f2bcf4b0 100644
--- a/module/plugins/hoster/NarodRu.py
+++ b/module/plugins/hoster/NarodRu.py
@@ -25,13 +25,13 @@ class NarodRu(SimpleHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- NAME_PATTERN = r'<dt class="name">(?:<[^<]*>)*(?P<N>[^<]+)</dt>'
- SIZE_PATTERN = r'<dd class="size">(?P<S>\d[^<]*)</dd>'
+ NAME_PATTERN = r'<dt class="name">(?:<.*?>)*(?P<N>.+?)</dt>'
+ SIZE_PATTERN = r'<dd class="size">(?P<S>\d.*?)</dd>'
OFFLINE_PATTERN = r'<title>404</title>|Файл удален с сервиса|Закончился срок хранения файла\.'
SIZE_REPLACEMENTS = [(u'КБ', 'KB'), (u'МБ', 'MB'), (u'ГБ', 'GB')]
URL_REPLACEMENTS = [("narod.yandex.ru/", "narod.ru/"),
- (r"/start/\d+\.\w+\-narod\.yandex\.ru/(\d{6,15})/\w+/(\w+)", r"/disk/\1/\2")]
+ (r'/start/\d+\.\w+\-narod\.yandex\.ru/(\d{6,15})/\w+/(\w+)', r'/disk/\1/\2')]
CAPTCHA_PATTERN = r'<number url="(.*?)">(\w+)</number>'
LINK_FREE_PATTERN = r'<a class="h-link" rel="yandex_bar" href="(.+?)">'
diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py
index 7a244e745..1f18fe994 100644
--- a/module/plugins/hoster/NoPremiumPl.py
+++ b/module/plugins/hoster/NoPremiumPl.py
@@ -40,8 +40,8 @@ class NoPremiumPl(MultiHoster):
80: "Too many incorrect login attempts, account blocked for 24h"}
- def prepare(self):
- super(NoPremiumPl, self).prepare()
+ def _prepare(self):
+ super(NoPremiumPl, self)._prepare()
data = self.account.get_data()
diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py
index ab3ea8708..f26680689 100644
--- a/module/plugins/hoster/OneFichierCom.py
+++ b/module/plugins/hoster/OneFichierCom.py
@@ -54,7 +54,7 @@ class OneFichierCom(SimpleHoster):
redirect = url
for i in xrange(10):
try:
- headers = dict((k.lower(), v) for k,v in re.findall(r"(?P<name>.+?): (?P<value>.+?)\r?\n", get_url(redirect, just_header=True)))
+ headers = dict((k.lower(), v) for k,v in re.findall(r'(?P<name>.+?): (?P<value>.+?)\r?\n', get_url(redirect, just_header=True)))
if 'location' in headers and headers['location']:
redirect = headers['location']
else:
diff --git a/module/plugins/hoster/OpenloadIo.py b/module/plugins/hoster/OpenloadIo.py
index 57a7e72b1..5f57cbe8a 100644
--- a/module/plugins/hoster/OpenloadIo.py
+++ b/module/plugins/hoster/OpenloadIo.py
@@ -2,7 +2,7 @@
import re
-from module.network.RequestFactory import getURL
+from module.network.RequestFactory import getURL as get_url
from module.plugins.internal.SimpleHoster import SimpleHoster
from module.plugins.internal.misc import json
@@ -37,7 +37,7 @@ class OpenloadIo(SimpleHoster):
@classmethod
def _load_json(cls, uri):
- return json.loads(getURL(cls.API_URL + uri))
+ return json.loads(get_url(cls.API_URL + uri))
@classmethod
diff --git a/module/plugins/hoster/PornhubCom.py b/module/plugins/hoster/PornhubCom.py
index e93f765ad..2ef2b965b 100644
--- a/module/plugins/hoster/PornhubCom.py
+++ b/module/plugins/hoster/PornhubCom.py
@@ -67,7 +67,7 @@ class PornhubCom(Hoster):
if not self.data:
self.download_html()
- m = re.search(r'<title.+?>([^<]+) - ', self.data)
+ m = re.search(r'<title.+?>(.+?) - ', self.data)
if m is not None:
name = m.group(1)
else:
diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py
index 49a55c6b1..1041255e6 100644
--- a/module/plugins/hoster/QuickshareCz.py
+++ b/module/plugins/hoster/QuickshareCz.py
@@ -23,7 +23,7 @@ class QuickshareCz(SimpleHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- NAME_PATTERN = r'<th width="145px">Název:</th>\s*<td style="word-wrap:break-word;">(?P<N>[^<]+)</td>'
+ NAME_PATTERN = r'<th width="145px">Název:</th>\s*<td style="word-wrap:break-word;">(?P<N>.+?)</td>'
SIZE_PATTERN = r'<th>Velikost:</th>\s*<td>(?P<S>[\d.,]+) (?P<U>[\w^_]+)</td>'
OFFLINE_PATTERN = r'<script type="text/javascript">location\.href=\'/chyba\';</script>'
@@ -53,7 +53,7 @@ class QuickshareCz(SimpleHoster):
else:
self.handle_free(pyfile)
- if self.scan_download({'error': re.compile(r"\AChyba!")}, read_size=100):
+ if self.scan_download({'error': re.compile(r'\AChyba!')}, read_size=100):
self.fail(_("File not m or plugin defect"))
diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py
index fc62c4b34..c77e522a8 100644
--- a/module/plugins/hoster/RapideoPl.py
+++ b/module/plugins/hoster/RapideoPl.py
@@ -40,8 +40,8 @@ class RapideoPl(MultiHoster):
80: "Too many incorrect login attempts, account blocked for 24h"}
- def prepare(self):
- super(RapideoPl, self).prepare()
+ def _prepare(self):
+ super(RapideoPl, self)._prepare()
data = self.account.get_data()
diff --git a/module/plugins/hoster/SecureUploadEu.py b/module/plugins/hoster/SecureUploadEu.py
index 30b5ac84f..4acce2fcc 100644
--- a/module/plugins/hoster/SecureUploadEu.py
+++ b/module/plugins/hoster/SecureUploadEu.py
@@ -23,4 +23,4 @@ class SecureUploadEu(XFSHoster):
PLUGIN_DOMAIN = "secureupload.eu"
- INFO_PATTERN = r'<h3>Downloading (?P<N>[^<]+) \((?P<S>[^<]+)\)</h3>'
+ INFO_PATTERN = r'<h3>Downloading (?P<N>.+?) \((?P<S>.+?)\)</h3>'
diff --git a/module/plugins/hoster/SendspaceCom.py b/module/plugins/hoster/SendspaceCom.py
index cff63179e..07553980c 100644
--- a/module/plugins/hoster/SendspaceCom.py
+++ b/module/plugins/hoster/SendspaceCom.py
@@ -23,7 +23,7 @@ class SendspaceCom(SimpleHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- NAME_PATTERN = r'<h2 class="bgray">\s*<(?:b|strong)>(?P<N>[^<]+)</'
+ NAME_PATTERN = r'<h2 class="bgray">\s*<(?:b|strong)>(?P<N>.+?)</'
SIZE_PATTERN = r'<div class="file_description reverse margin_center">\s*<b>File Size:</b>\s*(?P<S>[\d.,]+)(?P<U>[\w^_]+)\s*</div>'
OFFLINE_PATTERN = r'<div class="msg error" style="cursor: default">Sorry, the file you requested is not available.</div>'
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py
index b579b5e4b..2110ab086 100644
--- a/module/plugins/hoster/ShareonlineBiz.py
+++ b/module/plugins/hoster/ShareonlineBiz.py
@@ -104,7 +104,7 @@ class ShareonlineBiz(SimpleHoster):
def check_download(self):
check = self.scan_download({'cookie': re.compile(r'<div id="dl_failure"'),
- 'fail' : re.compile(r"<title>Share-Online")})
+ 'fail' : re.compile(r'<title>Share-Online")})
if check == "cookie":
self.retry_captcha(5, 60, _("Cookie failure"))
@@ -118,7 +118,7 @@ class ShareonlineBiz(SimpleHoster):
def handle_premium(self, pyfile): #: Should be working better loading (account) api internally
self.api_data = dlinfo = {}
- html = self.load("https://api.share-online.biz/account.php",
+ html = self.load("https://api.share-online.biz/account.php',
get={'username': self.account.user,
'password': self.account.get_login('password'),
'act' : "download",
@@ -149,7 +149,7 @@ class ShareonlineBiz(SimpleHoster):
def check_errors(self):
- m = re.search(r"/failure/(.*?)/", self.req.lastEffectiveURL)
+ m = re.search(r'/failure/(.*?)/', self.req.lastEffectiveURL)
if m is None:
self.info.pop('error', None)
return
diff --git a/module/plugins/hoster/ShareplaceCom.py b/module/plugins/hoster/ShareplaceCom.py
index 75cd7ecfb..db79dda87 100644
--- a/module/plugins/hoster/ShareplaceCom.py
+++ b/module/plugins/hoster/ShareplaceCom.py
@@ -84,7 +84,7 @@ class ShareplaceCom(Hoster):
if not self.data:
self.download_html()
- if re.search(r"HTTP Status 404", self.data):
+ if re.search(r'HTTP Status 404', self.data):
return False
else:
return True
diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py
index 835aa357e..895a88eb5 100644
--- a/module/plugins/hoster/SimplyPremiumCom.py
+++ b/module/plugins/hoster/SimplyPremiumCom.py
@@ -65,7 +65,7 @@ class SimplyPremiumCom(MultiHoster):
self.check_errors()
try:
- self.pyfile.name = re.search(r'<name>([^<]+)</name>', self.data).group(1)
+ self.pyfile.name = re.search(r'<name>(.+?)</name>', self.data).group(1)
except AttributeError:
self.pyfile.name = ""
@@ -77,7 +77,7 @@ class SimplyPremiumCom(MultiHoster):
self.pyfile.size = 0
try:
- self.link = re.search(r'<download>([^<]+)</download>', self.data).group(1)
+ self.link = re.search(r'<download>(.+?)</download>', self.data).group(1)
except AttributeError:
self.link = 'http://www.simply-premium.com/premium.php?link=' + self.pyfile.url
diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py
index c2cc1f987..3c5de1b51 100644
--- a/module/plugins/hoster/SmoozedCom.py
+++ b/module/plugins/hoster/SmoozedCom.py
@@ -49,7 +49,7 @@ class SmoozedCom(MultiHoster):
if data['state'] != "ok":
self.fail(data['message'])
- if data['data'].get("state", "ok") != "ok":
+ if data['data'].get('state', 'ok') != "ok":
if data['data'] == "Offline":
self.offline()
else:
diff --git a/module/plugins/hoster/StreamCz.py b/module/plugins/hoster/StreamCz.py
index 0921b1878..19a288b22 100644
--- a/module/plugins/hoster/StreamCz.py
+++ b/module/plugins/hoster/StreamCz.py
@@ -2,7 +2,6 @@
import re
-from module.network.RequestFactory import getURL as get_url
from module.plugins.internal.Hoster import Hoster
diff --git a/module/plugins/hoster/UloziskoSk.py b/module/plugins/hoster/UloziskoSk.py
index d48b73d58..5a71fdba3 100644
--- a/module/plugins/hoster/UloziskoSk.py
+++ b/module/plugins/hoster/UloziskoSk.py
@@ -24,7 +24,7 @@ class UloziskoSk(SimpleHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- NAME_PATTERN = r'<div class="down1">(?P<N>[^<]+)</div>'
+ NAME_PATTERN = r'<div class="down1">(?P<N>.+?)</div>'
SIZE_PATTERN = ur'Veľkosť súboru: <strong>(?P<S>[\d.,]+) (?P<U>[\w^_]+)</strong><br />'
OFFLINE_PATTERN = ur'<span class = "red">Zadaný súbor neexistuje z jedného z nasledujúcich dôvodov:</span>'
diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py
index 63c918da3..c9fe08c1e 100644
--- a/module/plugins/hoster/UnibytesCom.py
+++ b/module/plugins/hoster/UnibytesCom.py
@@ -26,7 +26,7 @@ class UnibytesCom(SimpleHoster):
PLUGIN_DOMAIN = "unibytes.com"
- INFO_PATTERN = r'<span[^>]*?id="fileName".*?>(?P<N>[^>]+)</span>\s*\((?P<S>\d.*?)\)'
+ INFO_PATTERN = r'<span[^>]*?id="fileName".*?>(?P<N>.+?)</span>\s*\((?P<S>\d.*?)\)'
WAIT_PATTERN = r'Wait for <span id="slowRest">(\d+)</span> sec'
LINK_FREE_PATTERN = r'<a href="(.+?)">Download</a>'
@@ -42,10 +42,10 @@ class UnibytesCom(SimpleHoster):
post=post_data,
redirect=False)
- m = re.search(r'location:\s*(\S+)', self.req.http.header, re.I)
- if m is not None:
- self.link = m.group(1)
- break
+ location = self.last_header.get('location')
+ if location:
+ self.link = location
+ return
if '>Somebody else is already downloading using your IP-address<' in self.data:
self.wait(10 * 60, True)
diff --git a/module/plugins/hoster/UploadableCh.py b/module/plugins/hoster/UploadableCh.py
index 70ff60eda..ad38af8d9 100644
--- a/module/plugins/hoster/UploadableCh.py
+++ b/module/plugins/hoster/UploadableCh.py
@@ -32,7 +32,7 @@ class UploadableCh(SimpleHoster):
OFFLINE_PATTERN = r'>(File not available|This file is no longer available)'
TEMP_OFFLINE_PATTERN = r'<div class="icon_err">'
- WAIT_PATTERN = r'>Please wait.+?<'
+ WAIT_PATTERN = r'>Please wait[^<]+'
RECAPTCHA_KEY = "6LdlJuwSAAAAAPJbPIoUhyqOJd7-yrah5Nhim5S3"
diff --git a/module/plugins/hoster/VeehdCom.py b/module/plugins/hoster/VeehdCom.py
index 9999b9141..2c81c7eea 100644
--- a/module/plugins/hoster/VeehdCom.py
+++ b/module/plugins/hoster/VeehdCom.py
@@ -54,7 +54,7 @@ class VeehdCom(Hoster):
if not self.data:
self.download_html()
- m = re.search(r'<title.*?>([^<]+) on Veehd</title>', self.data)
+ m = re.search(r'<title.*?>(.+?) on Veehd</title>', self.data)
if m is None:
self.error(_("Video title not found"))
diff --git a/module/plugins/hoster/VidPlayNet.py b/module/plugins/hoster/VidPlayNet.py
index df2f1bdab..1af71d634 100644
--- a/module/plugins/hoster/VidPlayNet.py
+++ b/module/plugins/hoster/VidPlayNet.py
@@ -26,4 +26,4 @@ class VidPlayNet(XFSHoster):
PLUGIN_DOMAIN = "vidplay.net"
- NAME_PATTERN = r'<b>Password:</b></div>\s*<h[1-6]>(?P<N>[^<]+)</h[1-6]>'
+ NAME_PATTERN = r'<b>Password:</b></div>\s*<h[1-6]>(?P<N>.+?)</h[1-6]>'
diff --git a/module/plugins/hoster/XDCC.py b/module/plugins/hoster/XDCC.py
index 8fdb704d9..405673fa4 100644
--- a/module/plugins/hoster/XDCC.py
+++ b/module/plugins/hoster/XDCC.py
@@ -187,7 +187,7 @@ class XDCC(Hoster):
self.pyfile.name = packname
- dl_folder = self.pyload.config.get("general", "download_folder")
+ dl_folder = self.pyload.config.get('general', 'download_folder')
filename = fsjoin(dl_folder, packname)
self.log_info(_("Downloading %s from %s:%d") % (packname, ip, port))
diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py
index d4b0c343e..a804ad2c6 100644
--- a/module/plugins/hoster/XHamsterCom.py
+++ b/module/plugins/hoster/XHamsterCom.py
@@ -77,7 +77,7 @@ class XHamsterCom(Hoster):
self.error(_("url_mode not found"))
if self.desired_fmt == ".mp4":
- file_url = re.search(r"<a href=\"" + srv_url + "(.+?)\"", self.data)
+ file_url = re.search(r'<a href=\"" + srv_url + "(.+?)\"', self.data)
if file_url is None:
self.error(_("file_url not found"))
@@ -127,7 +127,7 @@ class XHamsterCom(Hoster):
"""
if not self.data:
self.download_html()
- if re.search(r"(.*Video not found.*)", self.data):
+ if re.search(r'(.*Video not found.*)', self.data):
return False
else:
return True
diff --git a/module/plugins/hoster/XVideosCom.py b/module/plugins/hoster/XVideosCom.py
index 2347c8cfc..d24bda275 100644
--- a/module/plugins/hoster/XVideosCom.py
+++ b/module/plugins/hoster/XVideosCom.py
@@ -23,7 +23,7 @@ class XVideosCom(Hoster):
def process(self, pyfile):
site = self.load(pyfile.url)
pyfile.name = "%s (%s).flv" % (
- re.search(r"<h2>([^<]+)<span", site).group(1),
+ re.search(r'<h2>(.+?)<span', site).group(1),
re.match(self.__pattern__, pyfile.url).group(1),
)
- self.download(urllib.unquote(re.search(r"flv_url=([^&]+)&", site).group(1)))
+ self.download(urllib.unquote(re.search(r'flv_url=([^&]+)&', site).group(1)))
diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py
index aa07bb2db..490027e5f 100644
--- a/module/plugins/hoster/YoupornCom.py
+++ b/module/plugins/hoster/YoupornCom.py
@@ -58,7 +58,7 @@ class YoupornCom(Hoster):
"""
if not self.data:
self.download_html()
- if re.search(r"(.*invalid video_id.*)", self.data):
+ if re.search(r'(.*invalid video_id.*)', self.data):
return False
else:
return True
diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py
index 719c149a7..87d6c668a 100644
--- a/module/plugins/hoster/YourfilesTo.py
+++ b/module/plugins/hoster/YourfilesTo.py
@@ -82,7 +82,7 @@ class YourfilesTo(Hoster):
if not self.data:
self.download_html()
- if re.search(r"HTTP Status 404", self.data):
+ if re.search(r'HTTP Status 404', self.data):
return False
else:
return True
diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py
index 81638e1ea..3f625492f 100644
--- a/module/plugins/hoster/YoutubeCom.py
+++ b/module/plugins/hoster/YoutubeCom.py
@@ -147,7 +147,7 @@ class YoutubeCom(Hoster):
pyfile.name = html_unescape(name)
- time = re.search(r"t=((\d+)m)?(\d+)s", pyfile.url)
+ time = re.search(r't=((\d+)m)?(\d+)s', pyfile.url)
ffmpeg = which("ffmpeg")
if ffmpeg and time:
m, s = time.groups()[1:]
diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py
index cfc374f6d..0b51d9efa 100644
--- a/module/plugins/hoster/ZDF.py
+++ b/module/plugins/hoster/ZDF.py
@@ -39,7 +39,7 @@ class ZDF(Hoster):
@staticmethod
def get_id(url):
- return int(re.search(r"\D*(\d{4,})\D*", url).group(1))
+ return int(re.search(r'\D*(\d{4,})\D*', url).group(1))
def process(self, pyfile):