From e1d4186c62512d8bb76d35b6f8d1828d8d0aa94e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 23 Dec 2014 13:26:32 +0100 Subject: [SimpleHoster] Improve multi-hoster feature --- module/plugins/hoster/BitshareCom.py | 2 +- module/plugins/hoster/CzshareCom.py | 20 ++++++++++---------- module/plugins/hoster/DebridItaliaCom.py | 4 ++-- module/plugins/hoster/MediafireCom.py | 4 ++-- module/plugins/hoster/MegaRapidCz.py | 4 ++-- module/plugins/hoster/RarefileNet.py | 4 ++-- module/plugins/hoster/TusfilesNet.py | 4 ++-- 7 files changed, 21 insertions(+), 21 deletions(-) (limited to 'module/plugins/hoster') diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py index 6a497f4bc..a4fbde048 100644 --- a/module/plugins/hoster/BitshareCom.py +++ b/module/plugins/hoster/BitshareCom.py @@ -13,7 +13,7 @@ class BitshareCom(SimpleHoster): __type__ = "hoster" __version__ = "0.51" - __pattern__ = r'http://(?:www\.)?bitshare\.com/(files/(?P\w+)(/(?P.*?)\.html)?|\?f=(?P\w+))' + __pattern__ = r'http://(?:www\.)?bitshare\.com/(files/)?(?(1)|\?f=)(?P\w+)(?(1)/(?P.*?)\.html)' __description__ = """Bitshare.com hoster plugin""" __license__ = "GPLv3" diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py index 72f1bb45d..914849879 100644 --- a/module/plugins/hoster/CzshareCom.py +++ b/module/plugins/hoster/CzshareCom.py @@ -12,7 +12,7 @@ from module.utils import parseFileSize class CzshareCom(SimpleHoster): __name__ = "CzshareCom" __type__ = "hoster" - __version__ = "0.95" + __version__ = "0.96" __pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/(\d+/|download\.php\?).*' @@ -21,21 +21,21 @@ class CzshareCom(SimpleHoster): __authors__ = [("zoidberg", "zoidberg@mujmail.cz")] - NAME_PATTERN = r'
\s*

\s*Cel. n.zev: ]*>(?P[^<]+)' - SIZE_PATTERN = r'

(?:\s*

[^\n]*

)*\s*Velikost:\s*(?P[\d .,]+)(?P[\w^_]+)\s*
' + NAME_PATTERN = r'
\s*

\s*Cel. n.zev: ]*>(?P[^<]+)' + SIZE_PATTERN = r'

(?:\s*

[^\n]*

)*\s*Velikost:\s*(?P[\d .,]+)(?P[\w^_]+)\s*
' OFFLINE_PATTERN = r'
\s*

' SIZE_REPLACEMENTS = [(' ', '')] - URL_REPLACEMENTS = [(r'http://[^/]*/download.php\?.*?id=(\w+).*', r'http://sdilej.cz/\1/x/')] + URL_REPLACEMENTS = [(r'http://[^/]*/download.php\?.*?id=(\w+).*', r'http://sdilej.cz/\1/x/')] - FORCE_CHECK_TRAFFIC = True + CHECK_TRAFFIC = True - FREE_URL_PATTERN = r'[^>]*alt="([^"]+)" />' - FREE_FORM_PATTERN = r'
\s*(.*?)
' + FREE_URL_PATTERN = r'[^>]*alt="([^"]+)" />' + FREE_FORM_PATTERN = r'
\s*(.*?)
' PREMIUM_FORM_PATTERN = r'
(.*?)
' - FORM_INPUT_PATTERN = r']* name="([^"]+)" value="([^"]+)"[^>]*/>' - MULTIDL_PATTERN = r'

Z[^<]*PROFI.

' - USER_CREDIT_PATTERN = r'
\s*kredit: ([\d .,]+)(\w+)\s*
' + FORM_INPUT_PATTERN = r']* name="([^"]+)" value="([^"]+)"[^>]*/>' + MULTIDL_PATTERN = r'

Z[^<]*PROFI.

' + USER_CREDIT_PATTERN = r'
\s*kredit: ([\d .,]+)(\w+)\s*
' def checkTrafficLeft(self): diff --git a/module/plugins/hoster/DebridItaliaCom.py b/module/plugins/hoster/DebridItaliaCom.py index 21b6917d9..c3391e090 100644 --- a/module/plugins/hoster/DebridItaliaCom.py +++ b/module/plugins/hoster/DebridItaliaCom.py @@ -34,13 +34,13 @@ class DebridItaliaCom(MultiHoster): self.link = self.html.strip() else: errmsg = re.search(r'ERROR:(.*)', self.html).group(1).strip() - + self.html = self.load("http://debriditalia.com/linkgen2.php", post={'xjxfun' : "convertiLink", 'xjxargs[]': "S" % self.pyfile.url}) self.link = re.search(r'' - INFO_PATTERN = r'oFileSharePopup\.ald\(\'(?P[^\']*)\',\'(?P[^\']*)\',\'(?P[^\']*)\',\'\',\'(?P[^\']*)\'\)' + INFO_PATTERN = r'oFileSharePopup\.ald\(\'(?P[^\']*)\',\'(?P[^\']*)\',\'(?P[^\']*)\',\'\',\'(?P[^\']*)\'\)' OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File.

' PASSWORD_PATTERN = r'
Velikost:\s*\s*(?P[\d.,]+) (?P[\w^_]+)' OFFLINE_PATTERN = ur'Nastala chyba 404|Soubor byl smazán' - FORCE_CHECK_TRAFFIC = True + CHECK_TRAFFIC = True LINK_PATTERN = r'([^<]+)' ERR_LOGIN_PATTERN = ur'
Stahování je přístupné pouze přihlášeným uživatelům' diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py index bc2382dc1..2be952efe 100644 --- a/module/plugins/hoster/RarefileNet.py +++ b/module/plugins/hoster/RarefileNet.py @@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class RarefileNet(XFSHoster): __name__ = "RarefileNet" __type__ = "hoster" - __version__ = "0.08" + __version__ = "0.09" __pattern__ = r'http://(?:www\.)?rarefile\.net/\w{12}' @@ -19,7 +19,7 @@ class RarefileNet(XFSHoster): HOSTER_DOMAIN = "rarefile.net" - LINK_PATTERN = r'(?P=\1)' + LINK_PATTERN = r'\1' getInfo = create_getInfo(RarefileNet) diff --git a/module/plugins/hoster/TusfilesNet.py b/module/plugins/hoster/TusfilesNet.py index 235ad2434..a4e352956 100644 --- a/module/plugins/hoster/TusfilesNet.py +++ b/module/plugins/hoster/TusfilesNet.py @@ -23,8 +23,8 @@ class TusfilesNet(XFSHoster): def setup(self): - self.multiDL = False - self.chunkLimit = -1 + self.multiDL = False + self.chunkLimit = -1 self.resumeDownload = True -- cgit v1.2.3