summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-13 23:11:10 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-13 23:11:10 +0100
commitee8c3a7f95e7ea85a74e34c434d9973fd041180f (patch)
tree63f139159551f82742cc087b22f5a67750685e04 /module
parent[FileSharkPl] Fix https://github.com/pyload/pyload/issues/1040 (diff)
downloadpyload-ee8c3a7f95e7ea85a74e34c434d9973fd041180f.tar.xz
[XFSHoster] Auto-resolve HOSTER_DOMAIN
Diffstat (limited to 'module')
-rw-r--r--module/plugins/crypter/EasybytezComFolder.py2
-rw-r--r--module/plugins/crypter/JunocloudMeFolder.py23
-rw-r--r--module/plugins/crypter/RapidfileshareNetFolder.py23
-rw-r--r--module/plugins/crypter/TusfilesNetFolder.py2
-rw-r--r--module/plugins/hoster/BillionuploadsCom.py2
-rw-r--r--module/plugins/hoster/CramitIn.py2
-rw-r--r--module/plugins/hoster/EasybytezCom.py2
-rw-r--r--module/plugins/hoster/FileomCom.py2
-rw-r--r--module/plugins/hoster/FilerioCom.py2
-rw-r--r--module/plugins/hoster/HugefilesNet.py2
-rw-r--r--module/plugins/hoster/HundredEightyUploadCom.py2
-rw-r--r--module/plugins/hoster/JunocloudMe.py2
-rw-r--r--module/plugins/hoster/MovReelCom.py2
-rw-r--r--module/plugins/hoster/NosuploadCom.py2
-rw-r--r--module/plugins/hoster/NovafileCom.py2
-rw-r--r--module/plugins/hoster/RapidfileshareNet.py2
-rw-r--r--module/plugins/hoster/RarefileNet.py2
-rw-r--r--module/plugins/hoster/SafesharingEu.py2
-rw-r--r--module/plugins/hoster/SecureUploadEu.py2
-rw-r--r--module/plugins/hoster/StreamcloudEu.py2
-rw-r--r--module/plugins/hoster/TusfilesNet.py2
-rw-r--r--module/plugins/hoster/UpleaCom.py2
-rw-r--r--module/plugins/hoster/UptoboxCom.py2
-rw-r--r--module/plugins/hoster/VidPlayNet.py2
-rw-r--r--module/plugins/internal/XFSHoster.py30
25 files changed, 24 insertions, 96 deletions
diff --git a/module/plugins/crypter/EasybytezComFolder.py b/module/plugins/crypter/EasybytezComFolder.py
index 04f9b853b..6c643e83f 100644
--- a/module/plugins/crypter/EasybytezComFolder.py
+++ b/module/plugins/crypter/EasybytezComFolder.py
@@ -17,8 +17,6 @@ class EasybytezComFolder(XFSCrypter):
__authors__ = [("stickell", "l.stickell@yahoo.it")]
- HOSTER_DOMAIN = "easybytez.com"
-
LOGIN_ACCOUNT = True
diff --git a/module/plugins/crypter/JunocloudMeFolder.py b/module/plugins/crypter/JunocloudMeFolder.py
deleted file mode 100644
index 990f25902..000000000
--- a/module/plugins/crypter/JunocloudMeFolder.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo
-
-
-class JunocloudMeFolder(XFSCrypter):
- __name__ = "JunocloudMeFolder"
- __type__ = "crypter"
- __version__ = "0.03"
-
- __pattern__ = r'http://(?:www\.)?junocloud\.me/folders/(?P<ID>\d+/\w+)'
- __config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
- ("subfolder_per_package", "bool", "Create a subfolder for each package", True)]
-
- __description__ = """Junocloud.me folder decrypter plugin"""
- __license__ = "GPLv3"
- __authors__ = [("guidobelix", "guidobelix@hotmail.it")]
-
-
- HOSTER_DOMAIN = "junocloud.me"
-
-
-getInfo = create_getInfo(JunocloudMeFolder)
diff --git a/module/plugins/crypter/RapidfileshareNetFolder.py b/module/plugins/crypter/RapidfileshareNetFolder.py
deleted file mode 100644
index fc3d4241e..000000000
--- a/module/plugins/crypter/RapidfileshareNetFolder.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- coding: utf-8 -*-
-
-from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo
-
-
-class RapidfileshareNetFolder(XFSCrypter):
- __name__ = "RapidfileshareNetFolder"
- __type__ = "crypter"
- __version__ = "0.03"
-
- __pattern__ = r'http://(?:www\.)?rapidfileshare\.net/users/\w+/\d+/\w+'
- __config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
- ("subfolder_per_package", "bool", "Create a subfolder for each package", True)]
-
- __description__ = """Rapidfileshare.net folder decrypter plugin"""
- __license__ = "GPLv3"
- __authors__ = [("guidobelix", "guidobelix@hotmail.it")]
-
-
- HOSTER_DOMAIN = "rapidfileshare.net"
-
-
-getInfo = create_getInfo(RapidfileshareNetFolder)
diff --git a/module/plugins/crypter/TusfilesNetFolder.py b/module/plugins/crypter/TusfilesNetFolder.py
index 20bed0ab1..cb8efc9a8 100644
--- a/module/plugins/crypter/TusfilesNetFolder.py
+++ b/module/plugins/crypter/TusfilesNetFolder.py
@@ -22,8 +22,6 @@ class TusfilesNetFolder(XFSCrypter):
("stickell", "l.stickell@yahoo.it")]
- HOSTER_DOMAIN = "tusfiles.net"
-
PAGES_PATTERN = r'>\((\d+) \w+\)<'
URL_REPLACEMENTS = [(__pattern__ + ".*", r'https://www.tusfiles.net/go/\g<ID>/')]
diff --git a/module/plugins/hoster/BillionuploadsCom.py b/module/plugins/hoster/BillionuploadsCom.py
index b20ace0f1..7d7e2624a 100644
--- a/module/plugins/hoster/BillionuploadsCom.py
+++ b/module/plugins/hoster/BillionuploadsCom.py
@@ -15,8 +15,6 @@ class BillionuploadsCom(XFSHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- HOSTER_DOMAIN = "billionuploads.com"
-
NAME_PATTERN = r'<td class="dofir" title="(?P<N>.+?)"'
SIZE_PATTERN = r'<td class="dofir">(?P<S>[\d.,]+) (?P<U>[\w^_]+)'
diff --git a/module/plugins/hoster/CramitIn.py b/module/plugins/hoster/CramitIn.py
index f444718bc..44dac958d 100644
--- a/module/plugins/hoster/CramitIn.py
+++ b/module/plugins/hoster/CramitIn.py
@@ -15,8 +15,6 @@ class CramitIn(XFSHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- HOSTER_DOMAIN = "cramit.in"
-
INFO_PATTERN = r'<span class=t2>\s*(?P<N>.*?)</span>.*?<small>\s*\((?P<S>.*?)\)'
LINK_PATTERN = r'href="(http://cramit\.in/file_download/.*?)"'
diff --git a/module/plugins/hoster/EasybytezCom.py b/module/plugins/hoster/EasybytezCom.py
index cd54bdc70..693910c1b 100644
--- a/module/plugins/hoster/EasybytezCom.py
+++ b/module/plugins/hoster/EasybytezCom.py
@@ -16,8 +16,6 @@ class EasybytezCom(XFSHoster):
("stickell", "l.stickell@yahoo.it")]
- HOSTER_DOMAIN = "easybytez.com"
-
OFFLINE_PATTERN = r'>File not available'
LINK_PATTERN = r'(http://(\w+\.(easybytez|easyload|ezbytez|zingload)\.(com|to)|\d+\.\d+\.\d+\.\d+)/files/\d+/\w+/.+?)["\'<]'
diff --git a/module/plugins/hoster/FileomCom.py b/module/plugins/hoster/FileomCom.py
index 2b6fd34db..306953b84 100644
--- a/module/plugins/hoster/FileomCom.py
+++ b/module/plugins/hoster/FileomCom.py
@@ -18,8 +18,6 @@ class FileomCom(XFSHoster):
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
- HOSTER_DOMAIN = "fileom.com"
-
NAME_PATTERN = r'Filename: <span>(?P<N>.+?)<'
SIZE_PATTERN = r'File Size: <span class="size">(?P<S>[\d.,]+) (?P<U>[\w^_]+)'
diff --git a/module/plugins/hoster/FilerioCom.py b/module/plugins/hoster/FilerioCom.py
index db81f5b16..c6ebbd444 100644
--- a/module/plugins/hoster/FilerioCom.py
+++ b/module/plugins/hoster/FilerioCom.py
@@ -15,8 +15,6 @@ class FilerioCom(XFSHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- HOSTER_DOMAIN = "filerio.in"
-
URL_REPLACEMENTS = [(r'filekeen\.com', "filerio.in")]
OFFLINE_PATTERN = r'>&quot;File Not Found|File has been removed'
diff --git a/module/plugins/hoster/HugefilesNet.py b/module/plugins/hoster/HugefilesNet.py
index f7221f8c5..b7e599a50 100644
--- a/module/plugins/hoster/HugefilesNet.py
+++ b/module/plugins/hoster/HugefilesNet.py
@@ -17,8 +17,6 @@ class HugefilesNet(XFSHoster):
__authors__ = [("stickell", "l.stickell@yahoo.it")]
- HOSTER_DOMAIN = "hugefiles.net"
-
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/HundredEightyUploadCom.py b/module/plugins/hoster/HundredEightyUploadCom.py
index 4fc96a2b1..32d36ddb9 100644
--- a/module/plugins/hoster/HundredEightyUploadCom.py
+++ b/module/plugins/hoster/HundredEightyUploadCom.py
@@ -15,7 +15,5 @@ class HundredEightyUploadCom(XFSHoster):
__authors__ = [("stickell", "l.stickell@yahoo.it")]
- HOSTER_DOMAIN = "180upload.com"
-
getInfo = create_getInfo(HundredEightyUploadCom)
diff --git a/module/plugins/hoster/JunocloudMe.py b/module/plugins/hoster/JunocloudMe.py
index 56d6588fa..415d5e2d0 100644
--- a/module/plugins/hoster/JunocloudMe.py
+++ b/module/plugins/hoster/JunocloudMe.py
@@ -15,8 +15,6 @@ class JunocloudMe(XFSHoster):
__authors__ = [("guidobelix", "guidobelix@hotmail.it")]
- HOSTER_DOMAIN = "junocloud.me"
-
URL_REPLACEMENTS = [(r'//(www\.)?junocloud', "//dl3.junocloud")]
OFFLINE_PATTERN = r'>No such file with this filename<'
diff --git a/module/plugins/hoster/MovReelCom.py b/module/plugins/hoster/MovReelCom.py
index 9bb63701c..9b8679c10 100644
--- a/module/plugins/hoster/MovReelCom.py
+++ b/module/plugins/hoster/MovReelCom.py
@@ -15,8 +15,6 @@ class MovReelCom(XFSHoster):
__authors__ = [("JorisV83", "jorisv83-pyload@yahoo.com")]
- HOSTER_DOMAIN = "movreel.com"
-
LINK_PATTERN = r'<a href="([^"]+)">Download Link'
diff --git a/module/plugins/hoster/NosuploadCom.py b/module/plugins/hoster/NosuploadCom.py
index 8a03d7090..aeedd54f6 100644
--- a/module/plugins/hoster/NosuploadCom.py
+++ b/module/plugins/hoster/NosuploadCom.py
@@ -17,8 +17,6 @@ class NosuploadCom(XFSHoster):
__authors__ = [("igel", "igelkun@myopera.com")]
- HOSTER_DOMAIN = "nosupload.com"
-
SIZE_PATTERN = r'<p><strong>Size:</strong> (?P<S>[\d.,]+) (?P<U>[\w^_]+)</p>'
LINK_PATTERN = r'<a class="select" href="(http://.+?)">Download</a>'
diff --git a/module/plugins/hoster/NovafileCom.py b/module/plugins/hoster/NovafileCom.py
index 9754ceed1..bdd66473b 100644
--- a/module/plugins/hoster/NovafileCom.py
+++ b/module/plugins/hoster/NovafileCom.py
@@ -20,8 +20,6 @@ class NovafileCom(XFSHoster):
("stickell", "l.stickell@yahoo.it")]
- HOSTER_DOMAIN = "novafile.com"
-
ERROR_PATTERN = r'class="alert[^"]*alert-separate"[^>]*>\s*(?:<p>)?(.*?)\s*</'
WAIT_PATTERN = r'<p>Please wait <span id="count"[^>]*>(\d+)</span> seconds</p>'
diff --git a/module/plugins/hoster/RapidfileshareNet.py b/module/plugins/hoster/RapidfileshareNet.py
index 3473b1c7c..0bbaed57f 100644
--- a/module/plugins/hoster/RapidfileshareNet.py
+++ b/module/plugins/hoster/RapidfileshareNet.py
@@ -15,8 +15,6 @@ class RapidfileshareNet(XFSHoster):
__authors__ = [("guidobelix", "guidobelix@hotmail.it")]
- HOSTER_DOMAIN = "rapidfileshare.net"
-
NAME_PATTERN = r'<input type="hidden" name="fname" value="(?P<N>.+?)">'
SIZE_PATTERN = r'>http://www.rapidfileshare.net/\w+?</font> \((?P<S>[\d.,]+) (?P<U>[\w^_]+)\)</font>'
diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py
index 2be952efe..a45e4ed4d 100644
--- a/module/plugins/hoster/RarefileNet.py
+++ b/module/plugins/hoster/RarefileNet.py
@@ -17,8 +17,6 @@ class RarefileNet(XFSHoster):
__authors__ = [("zoidberg", "zoidberg@mujmail.cz")]
- HOSTER_DOMAIN = "rarefile.net"
-
LINK_PATTERN = r'<a href="(.+?)">\1</a>'
diff --git a/module/plugins/hoster/SafesharingEu.py b/module/plugins/hoster/SafesharingEu.py
index bb6e0f646..08612e413 100644
--- a/module/plugins/hoster/SafesharingEu.py
+++ b/module/plugins/hoster/SafesharingEu.py
@@ -15,8 +15,6 @@ class SafesharingEu(XFSHoster):
__authors__ = [("zapp-brannigan", "fuerst.reinje@web.de")]
- HOSTER_DOMAIN = "safesharing.eu"
-
ERROR_PATTERN = r'(?:<div class="alert alert-danger">)(.+?)(?:</div>)'
diff --git a/module/plugins/hoster/SecureUploadEu.py b/module/plugins/hoster/SecureUploadEu.py
index 64e6456a9..6bfbce328 100644
--- a/module/plugins/hoster/SecureUploadEu.py
+++ b/module/plugins/hoster/SecureUploadEu.py
@@ -15,8 +15,6 @@ class SecureUploadEu(XFSHoster):
__authors__ = [("z00nx", "z00nx0@gmail.com")]
- HOSTER_DOMAIN = "secureupload.eu"
-
INFO_PATTERN = r'<h3>Downloading (?P<N>[^<]+) \((?P<S>[^<]+)\)</h3>'
diff --git a/module/plugins/hoster/StreamcloudEu.py b/module/plugins/hoster/StreamcloudEu.py
index b9d6d9ae6..54f430508 100644
--- a/module/plugins/hoster/StreamcloudEu.py
+++ b/module/plugins/hoster/StreamcloudEu.py
@@ -17,8 +17,6 @@ class StreamcloudEu(XFSHoster):
__authors__ = [("seoester", "seoester@googlemail.com")]
- HOSTER_DOMAIN = "streamcloud.eu"
-
WAIT_PATTERN = r'var count = (\d+)'
LINK_PATTERN = r'file: "(http://(stor|cdn)\d+\.streamcloud\.eu:?\d*/.*/video\.(mp4|flv))",'
diff --git a/module/plugins/hoster/TusfilesNet.py b/module/plugins/hoster/TusfilesNet.py
index 9d0a86fe9..9fdb6eae1 100644
--- a/module/plugins/hoster/TusfilesNet.py
+++ b/module/plugins/hoster/TusfilesNet.py
@@ -17,8 +17,6 @@ class TusfilesNet(XFSHoster):
("guidobelix", "guidobelix@hotmail.it")]
- HOSTER_DOMAIN = "tusfiles.net"
-
INFO_PATTERN = r'\](?P<N>.+) - (?P<S>[\d.,]+) (?P<U>[\w^_]+)\['
OFFLINE_PATTERN = r'>File Not Found|<Title>TusFiles - Fast Sharing Files!|The file you are trying to download is no longer available'
diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py
index 4ea4e345f..5c63c7e8b 100644
--- a/module/plugins/hoster/UpleaCom.py
+++ b/module/plugins/hoster/UpleaCom.py
@@ -19,8 +19,6 @@ class UpleaCom(XFSHoster):
__authors__ = [("Redleon", None)]
- HOSTER_DOMAIN = "uplea.com"
-
NAME_PATTERN = r'class="agmd size18">(?P<N>.+?)<'
SIZE_PATTERN = r'size14">(?P<S>[\d.,]+) (?P<U>[\w^_])</span>'
diff --git a/module/plugins/hoster/UptoboxCom.py b/module/plugins/hoster/UptoboxCom.py
index 21d781f55..dedb6ed1f 100644
--- a/module/plugins/hoster/UptoboxCom.py
+++ b/module/plugins/hoster/UptoboxCom.py
@@ -15,8 +15,6 @@ class UptoboxCom(XFSHoster):
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
- HOSTER_DOMAIN = "uptobox.com"
-
INFO_PATTERN = r'"para_title">(?P<N>.+) \((?P<S>[\d.,]+) (?P<U>[\w^_]+)\)'
OFFLINE_PATTERN = r'>(File not found|Access Denied|404 Not Found)'
diff --git a/module/plugins/hoster/VidPlayNet.py b/module/plugins/hoster/VidPlayNet.py
index 76af05edd..f1a32a897 100644
--- a/module/plugins/hoster/VidPlayNet.py
+++ b/module/plugins/hoster/VidPlayNet.py
@@ -18,8 +18,6 @@ class VidPlayNet(XFSHoster):
__authors__ = [("t4skforce", "t4skforce1337[AT]gmail[DOT]com")]
- HOSTER_DOMAIN = "vidplay.net"
-
NAME_PATTERN = r'<b>Password:</b></div>\s*<h[1-6]>(?P<N>[^<]+)</h[1-6]>'
diff --git a/module/plugins/internal/XFSHoster.py b/module/plugins/internal/XFSHoster.py
index b32f5978f..bae75c092 100644
--- a/module/plugins/internal/XFSHoster.py
+++ b/module/plugins/internal/XFSHoster.py
@@ -15,7 +15,7 @@ from module.utils import html_unescape
class XFSHoster(SimpleHoster):
__name__ = "XFSHoster"
__type__ = "hoster"
- __version__ = "0.35"
+ __version__ = "0.36"
__pattern__ = r'^unmatchable$'
@@ -63,10 +63,28 @@ class XFSHoster(SimpleHoster):
def prepare(self):
""" Initialize important variables """
if not self.HOSTER_DOMAIN:
- self.fail(_("Missing HOSTER_DOMAIN"))
+ if self.account:
+ account = self.account
+ else:
+ account = self.pyfile.m.core.accountManager.getAccountPlugin(self.__name__)
+
+ if account and hasattr(account, "HOSTER_DOMAIN") and account.HOSTER_DOMAIN:
+ self.HOSTER_DOMAIN = account.HOSTER_DOMAIN
+ else:
+ self.fail(_("Missing HOSTER_DOMAIN"))
+
+ try:
+ self.COOKIES.index((None, "lang", "english"))
+
+ except ValueError:
+ pass
+
+ else:
+ self.COOKIES.remove((None, "lang", "english"))
+ self.COOKIES.insert((self.HOSTER_DOMAIN, "lang", "english"))
if not self.LINK_PATTERN:
- pattern = r'(https?://(www\.)?([^/]*?%s|\d+\.\d+\.\d+\.\d+)(\:\d+)?(/d/|(/files)?/\d+/\w+/).+?)["\'<]'
+ pattern = r'(https?://(?:www\.)?([^/]*?%s|\d+\.\d+\.\d+\.\d+)(\:\d+)?(/d/|(/files)?/\d+/\w+/).+?)["\'<]'
self.LINK_PATTERN = pattern % self.HOSTER_DOMAIN.replace('.', '\.')
self.captcha = None
@@ -75,7 +93,7 @@ class XFSHoster(SimpleHoster):
super(XFSHoster, self).prepare()
if self.DIRECT_LINK is None:
- self.directDL = bool(self.premium)
+ self.directDL = self.premium
def downloadLink(self, link):
@@ -311,7 +329,7 @@ class XFSHoster(SimpleHoster):
recaptcha = ReCaptcha(self)
try:
captcha_key = re.search(self.RECAPTCHA_PATTERN, self.html).group(1)
- except:
+ except Exception:
captcha_key = recaptcha.detect_key()
else:
self.logDebug("ReCaptcha key: %s" % captcha_key)
@@ -323,7 +341,7 @@ class XFSHoster(SimpleHoster):
solvemedia = SolveMedia(self)
try:
captcha_key = re.search(self.SOLVEMEDIA_PATTERN, self.html).group(1)
- except:
+ except Exception:
captcha_key = solvemedia.detect_key()
else:
self.logDebug("SolveMedia key: %s" % captcha_key)