summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/BasePlugin.py42
-rw-r--r--module/plugins/hoster/BillionuploadsCom.py2
-rw-r--r--module/plugins/hoster/CatShareNet.py12
-rw-r--r--module/plugins/hoster/CramitIn.py2
-rw-r--r--module/plugins/hoster/DepositfilesCom.py2
-rw-r--r--module/plugins/hoster/EasybytezCom.py2
-rw-r--r--module/plugins/hoster/ExashareCom.py38
-rw-r--r--module/plugins/hoster/FileSharkPl.py15
-rw-r--r--module/plugins/hoster/FileomCom.py2
-rw-r--r--module/plugins/hoster/FilerNet.py4
-rw-r--r--module/plugins/hoster/FilerioCom.py2
-rw-r--r--module/plugins/hoster/FilesMailRu.py2
-rw-r--r--module/plugins/hoster/FourSharedCom.py2
-rw-r--r--module/plugins/hoster/Ftp.py6
-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/Keep2shareCc.py6
-rw-r--r--module/plugins/hoster/MediafireCom.py2
-rw-r--r--module/plugins/hoster/MovReelCom.py2
-rw-r--r--module/plugins/hoster/NitroflareCom.py4
-rw-r--r--module/plugins/hoster/NosuploadCom.py2
-rw-r--r--module/plugins/hoster/NovafileCom.py2
-rw-r--r--module/plugins/hoster/PremiumTo.py5
-rw-r--r--module/plugins/hoster/RapidfileshareNet.py2
-rw-r--r--module/plugins/hoster/RapidgatorNet.py5
-rw-r--r--module/plugins/hoster/RapiduNet.py4
-rw-r--r--module/plugins/hoster/RarefileNet.py2
-rw-r--r--module/plugins/hoster/RehostTo.py4
-rw-r--r--module/plugins/hoster/SafesharingEu.py2
-rw-r--r--module/plugins/hoster/SecureUploadEu.py2
-rw-r--r--module/plugins/hoster/ShareonlineBiz.py2
-rw-r--r--module/plugins/hoster/SmoozedCom.py4
-rw-r--r--module/plugins/hoster/StreamcloudEu.py2
-rw-r--r--module/plugins/hoster/TusfilesNet.py2
-rw-r--r--module/plugins/hoster/UnrestrictLi.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/hoster/WebshareCz.py4
-rw-r--r--module/plugins/hoster/YibaishiwuCom.py2
-rw-r--r--module/plugins/hoster/ZippyshareCom.py4
42 files changed, 87 insertions, 124 deletions
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py
index 6d3132e65..f098111c2 100644
--- a/module/plugins/hoster/BasePlugin.py
+++ b/module/plugins/hoster/BasePlugin.py
@@ -6,14 +6,14 @@ from urllib import unquote
from urlparse import urljoin, urlparse
from module.network.HTTPRequest import BadHeader
-from module.plugins.internal.SimpleHoster import create_getInfo
+from module.plugins.internal.SimpleHoster import create_getInfo, fileUrl
from module.plugins.Hoster import Hoster
class BasePlugin(Hoster):
__name__ = "BasePlugin"
__type__ = "hoster"
- __version__ = "0.30"
+ __version__ = "0.31"
__pattern__ = r'^unmatchable$'
@@ -35,7 +35,7 @@ class BasePlugin(Hoster):
def setup(self):
- self.chunkLimit = -1
+ self.chunkLimit = -1
self.resumeDownload = True
@@ -49,7 +49,12 @@ class BasePlugin(Hoster):
for _i in xrange(5):
try:
- self.downloadFile(pyfile)
+ link = fileUrl(unquote(pyfile.url))
+
+ if link:
+ self.download(link, disposition=True)
+ else:
+ self.fail(_("File not found"))
except BadHeader, e:
if e.code is 404:
@@ -85,33 +90,4 @@ class BasePlugin(Hoster):
self.fail(check.capitalize())
- def downloadFile(self, pyfile):
- url = pyfile.url
-
- for i in xrange(1, 7): #@TODO: retrieve the pycurl.MAXREDIRS value set by req
- header = self.load(url, ref=True, cookies=True, just_header=True, decode=True)
-
- if 'location' not in header or not header['location']:
- if 'code' in header and header['code'] not in (200, 201, 203, 206):
- self.logDebug("Received HTTP status code: %d" % header['code'])
- self.fail(_("File not found"))
- else:
- break
-
- location = header['location']
-
- self.logDebug("Redirect #%d to: %s" % (i, location))
-
- if urlparse(location).scheme:
- url = location
- else:
- p = urlparse(url)
- base = "%s://%s" % (p.scheme, p.netloc)
- url = urljoin(base, location)
- else:
- self.fail(_("Too many redirects"))
-
- self.download(unquote(url), disposition=True)
-
-
getInfo = create_getInfo(BasePlugin)
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/CatShareNet.py b/module/plugins/hoster/CatShareNet.py
index f2ddd64a0..ba8996193 100644
--- a/module/plugins/hoster/CatShareNet.py
+++ b/module/plugins/hoster/CatShareNet.py
@@ -9,7 +9,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha
class CatShareNet(SimpleHoster):
__name__ = "CatShareNet"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.10"
__pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}'
@@ -26,8 +26,9 @@ class CatShareNet(SimpleHoster):
OFFLINE_PATTERN = ur'Podany plik został usunięty\s*</div>'
IP_BLOCKED_PATTERN = ur'>Nasz serwis wykrył że Twój adres IP nie pochodzi z Polski.<'
- SECONDS_PATTERN = 'var\scount\s=\s(\d+);'
- LINK_FREE_PATTERN = r'<form action="(.+?)" method="GET">'
+ WAIT_PATTERN = r'var\scount\s=\s(\d+);'
+
+ LINK_FREE_PATTERN = LINK_PREMIUM_PATTERN = r'<form action="(.+?)" method="GET">'
def setup(self):
@@ -43,11 +44,6 @@ class CatShareNet(SimpleHoster):
def handleFree(self, pyfile):
- m = re.search(self.SECONDS_PATTERN, self.html)
- if m:
- wait_time = int(m.group(1))
- self.wait(wait_time, True)
-
recaptcha = ReCaptcha(self)
challenge, response = recaptcha.challenge()
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/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py
index 9d060e75d..6e7f2909c 100644
--- a/module/plugins/hoster/DepositfilesCom.py
+++ b/module/plugins/hoster/DepositfilesCom.py
@@ -95,7 +95,7 @@ class DepositfilesCom(SimpleHoster):
try:
self.download(link, disposition=True)
- except:
+ except Exception:
self.retry(wait_time=60)
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/ExashareCom.py b/module/plugins/hoster/ExashareCom.py
new file mode 100644
index 000000000..536c09b6d
--- /dev/null
+++ b/module/plugins/hoster/ExashareCom.py
@@ -0,0 +1,38 @@
+# -*- coding: utf-8 -*-
+
+import re
+
+from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
+
+
+class ExashareCom(XFSHoster):
+ __name__ = "ExashareCom"
+ __type__ = "hoster"
+ __version__ = "0.01"
+
+ __pattern__ = r'http://(?:www\.)?exashare\.com/\w{12}'
+
+ __description__ = """Exashare.com hoster plugin"""
+ __license__ = "GPLv3"
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ INFO_PATTERN = r'>(?P<NAME>.+?)<small>\( (?P<S>[\d.,]+) (?P<U>[\w^_]+)'
+ LINK_FREE_PATTERN = r'file: "(.+?)"'
+
+
+ def setup(self):
+ self.multiDL = True
+ self.chunkLimit = 1
+ self.resumeDownload = self.premium
+
+
+ def handleFree(self, pyfile):
+ m = re.search(self.LINK_FREE_PATTERN, self.html)
+ if m is None:
+ self.error(_("Free download link not found"))
+ else:
+ self.link = m.group(1)
+
+
+getInfo = create_getInfo(ExashareCom)
diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py
index d686be480..252270c4b 100644
--- a/module/plugins/hoster/FileSharkPl.py
+++ b/module/plugins/hoster/FileSharkPl.py
@@ -10,9 +10,9 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FileSharkPl(SimpleHoster):
__name__ = "FileSharkPl"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
- __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d{6}/\w{5}'
+ __pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+'
__description__ = """FileShark.pl hoster plugin"""
__license__ = "GPLv3"
@@ -39,6 +39,7 @@ class FileSharkPl(SimpleHoster):
def setup(self):
self.resumeDownload = True
+
if self.premium:
self.multiDL = True
self.limitDL = 20
@@ -53,7 +54,7 @@ class FileSharkPl(SimpleHoster):
errmsg = self.info['error'] = _("Another download already run")
self.retry(15, int(m.group(1)), errmsg)
- m = re.search(self.ERROR_PATTERN, self.html):
+ m = re.search(self.ERROR_PATTERN, self.html)
if m:
alert = m.group(1)
@@ -72,13 +73,6 @@ class FileSharkPl(SimpleHoster):
self.info.pop('error', None)
- #@NOTE: handlePremium method was never been tested
- def handlePremium(self, pyfile):
- super(FilerNet, self).handlePremium(pyfile)
- if self.link:
- self.link = urljoin("http://fileshark.pl/", self.link)
-
-
def handleFree(self, pyfile):
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m is None:
@@ -119,7 +113,6 @@ class FileSharkPl(SimpleHoster):
check = self.checkDownload({'wrong_captcha': re.compile(r'<label for="form_captcha" generated="true" class="error">(.*?)</label>'),
'wait_pattern' : re.compile(self.SECONDS_PATTERN),
'DL-found' : re.compile('<a href="(.*)">')})
-
if check == "DL-found":
self.correctCaptcha()
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/FilerNet.py b/module/plugins/hoster/FilerNet.py
index 159aab964..a668a834b 100644
--- a/module/plugins/hoster/FilerNet.py
+++ b/module/plugins/hoster/FilerNet.py
@@ -62,8 +62,8 @@ class FilerNet(SimpleHoster):
#@TODO: Check for v0.4.10
self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0)
self.load(pyfile.url, post={'recaptcha_challenge_field': challenge,
- 'recaptcha_response_field' : response,
- 'hash' : inputs['hash']})
+ 'recaptcha_response_field' : response,
+ 'hash' : inputs['hash']})
self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 1)
if 'location' in self.req.http.header.lower():
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/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py
index 18fca7176..7bd099282 100644
--- a/module/plugins/hoster/FilesMailRu.py
+++ b/module/plugins/hoster/FilesMailRu.py
@@ -21,7 +21,7 @@ def getInfo(urls):
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:
+ except Exception:
pass
# status 1=OFFLINE, 2=OK, 3=UNKNOWN
diff --git a/module/plugins/hoster/FourSharedCom.py b/module/plugins/hoster/FourSharedCom.py
index 78aeece44..a3f53ac5e 100644
--- a/module/plugins/hoster/FourSharedCom.py
+++ b/module/plugins/hoster/FourSharedCom.py
@@ -53,7 +53,7 @@ class FourSharedCom(SimpleHoster):
m = re.search(self.ID_PATTERN, self.html)
res = self.load('http://www.4shared.com/web/d2/getFreeDownloadLimitInfo?fileId=%s' % m.group(1))
self.logDebug(res)
- except:
+ except Exception:
pass
self.wait(20)
diff --git a/module/plugins/hoster/Ftp.py b/module/plugins/hoster/Ftp.py
index 3daf50bc5..22fc5f67a 100644
--- a/module/plugins/hoster/Ftp.py
+++ b/module/plugins/hoster/Ftp.py
@@ -12,7 +12,7 @@ from module.plugins.Hoster import Hoster
class Ftp(Hoster):
__name__ = "Ftp"
__type__ = "hoster"
- __version__ = "0.45"
+ __version__ = "0.46"
__pattern__ = r'(?:ftps?|sftp)://([\w.-]+(:[\w.-]+)?@)?[\w.-]+(:\d+)?/.+'
@@ -35,7 +35,7 @@ class Ftp(Hoster):
pyfile.name = parsed_url.path.rpartition('/')[2]
try:
pyfile.name = unquote(str(pyfile.name)).decode('utf8')
- except:
+ except Exception:
pass
if not "@" in netloc:
@@ -43,7 +43,7 @@ class Ftp(Hoster):
if netloc in servers:
self.logDebug("Logging on to %s" % netloc)
- self.req.addAuth(self.account.getAccountData(netloc)['password'])
+ self.req.addAuth(self.account.getAccountInfo(netloc)['password'])
else:
pwd = self.getPassword()
if ':' in pwd:
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/Keep2shareCc.py b/module/plugins/hoster/Keep2shareCc.py
index 16bda27e0..05b3c639d 100644
--- a/module/plugins/hoster/Keep2shareCc.py
+++ b/module/plugins/hoster/Keep2shareCc.py
@@ -5,13 +5,13 @@ import re
from urlparse import urljoin, urlparse
from module.plugins.internal.CaptchaService import ReCaptcha
-from module.plugins.internal.SimpleHoster import _isDirectLink, SimpleHoster, create_getInfo
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class Keep2ShareCc(SimpleHoster):
__name__ = "Keep2ShareCc"
__type__ = "hoster"
- __version__ = "0.18"
+ __version__ = "0.19"
__pattern__ = r'https?://(?:www\.)?(keep2share|k2s|keep2s)\.cc/file/(?P<ID>\w+)'
@@ -121,7 +121,7 @@ class Keep2ShareCc(SimpleHoster):
if not link or not isinstance(link, basestring):
return
- link = _isDirectLink(self, link, self.premium)
+ link = self.directLink(self, link, self.resumeDownload)
if link:
self.download(urljoin("http://k2s.cc/", link), disposition=True)
diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py
index 81bd36f73..d404498f3 100644
--- a/module/plugins/hoster/MediafireCom.py
+++ b/module/plugins/hoster/MediafireCom.py
@@ -33,7 +33,7 @@ def checkHTMLHeader(url):
return url, 2
else:
break
- except:
+ except Exception:
return url, 3
else:
return url, 0
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/NitroflareCom.py b/module/plugins/hoster/NitroflareCom.py
index 30cc62eaf..fdbcf0e64 100644
--- a/module/plugins/hoster/NitroflareCom.py
+++ b/module/plugins/hoster/NitroflareCom.py
@@ -10,13 +10,13 @@ import re
from module.common.json_layer import json_loads
from module.plugins.internal.CaptchaService import ReCaptcha
-from module.plugins.SimpleHoster import SimpleHoster
+from module.plugins.internal.SimpleHoster import SimpleHoster
class NitroflareCom(SimpleHoster):
__name__ = "NitroflareCom"
__type__ = "hoster"
- __version__ = "0.25"
+ __version__ = "0.04"
__pattern__ = r'https?://(?:www\.)?nitroflare\.com/view/(?P<ID>[\w^_]+)'
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/PremiumTo.py b/module/plugins/hoster/PremiumTo.py
index 665005ec3..39e7522e2 100644
--- a/module/plugins/hoster/PremiumTo.py
+++ b/module/plugins/hoster/PremiumTo.py
@@ -11,7 +11,7 @@ from module.utils import fs_encode
class PremiumTo(MultiHoster):
__name__ = "PremiumTo"
__type__ = "hoster"
- __version__ = "0.20"
+ __version__ = "0.21"
__pattern__ = r'^unmatchable$'
@@ -22,6 +22,9 @@ class PremiumTo(MultiHoster):
("stickell", "l.stickell@yahoo.it")]
+ CHECK_TRAFFIC = True
+
+
def handlePremium(self, pyfile):
#raise timeout to 2min
self.download("http://premium.to/api/getfile.php",
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/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py
index 4d192d602..84c3b20d6 100644
--- a/module/plugins/hoster/RapidgatorNet.py
+++ b/module/plugins/hoster/RapidgatorNet.py
@@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, s
class RapidgatorNet(SimpleHoster):
__name__ = "RapidgatorNet"
__type__ = "hoster"
- __version__ = "0.28"
+ __version__ = "0.29"
__pattern__ = r'http://(?:www\.)?(rapidgator\.net|rg\.to)/file/\w+'
@@ -46,7 +46,7 @@ class RapidgatorNet(SimpleHoster):
def setup(self):
if self.account:
- self.sid = self.account.getAccountData(self.user).get('SID', None)
+ self.sid = self.account.getAccountInfo(self.user).get('SID', None)
else:
self.sid = None
@@ -85,7 +85,6 @@ class RapidgatorNet(SimpleHoster):
def handlePremium(self, pyfile):
- #self.logDebug("ACCOUNT_DATA", self.account.getAccountData(self.user))
self.api_data = self.api_response('info')
self.api_data['md5'] = self.api_data['hash']
diff --git a/module/plugins/hoster/RapiduNet.py b/module/plugins/hoster/RapiduNet.py
index 34e71b5f2..0c40d95b9 100644
--- a/module/plugins/hoster/RapiduNet.py
+++ b/module/plugins/hoster/RapiduNet.py
@@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class RapiduNet(SimpleHoster):
__name__ = "RapiduNet"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__pattern__ = r'https?://(?:www\.)?rapidu\.net/(?P<ID>\d{10})'
@@ -66,7 +66,7 @@ class RapiduNet(SimpleHoster):
post={'_go' : "",
'captcha1': challenge,
'captcha2': response,
- 'fileId' : self.info['ID']},
+ 'fileId' : self.info['pattern']['ID']},
decode=True)
if jsvars['message'] == 'success':
self.download(jsvars['url'])
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/RehostTo.py b/module/plugins/hoster/RehostTo.py
index e706fa6c6..28de35d08 100644
--- a/module/plugins/hoster/RehostTo.py
+++ b/module/plugins/hoster/RehostTo.py
@@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class RehostTo(MultiHoster):
__name__ = "RehostTo"
__type__ = "hoster"
- __version__ = "0.20"
+ __version__ = "0.21"
__pattern__ = r'https?://.*rehost\.to\..+'
@@ -20,7 +20,7 @@ class RehostTo(MultiHoster):
def handlePremium(self, pyfile):
self.download("http://rehost.to/process_download.php",
get={'user': "cookie",
- 'pass': self.account.getAccountData(self.user)['session'],
+ 'pass': self.account.getAccountInfo(self.user)['session'],
'dl' : pyfile.url},
disposition=True)
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/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py
index 636e5824d..5918726f5 100644
--- a/module/plugins/hoster/ShareonlineBiz.py
+++ b/module/plugins/hoster/ShareonlineBiz.py
@@ -164,7 +164,7 @@ class ShareonlineBiz(SimpleHoster):
try:
self.logError(errmsg, re.search(self.ERROR_PATTERN, self.html).group(1))
- except:
+ except Exception:
self.logError("Unknown error occurred", errmsg)
if errmsg is "invalid":
diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py
index a5116db16..bd653ff59 100644
--- a/module/plugins/hoster/SmoozedCom.py
+++ b/module/plugins/hoster/SmoozedCom.py
@@ -7,7 +7,7 @@ from module.plugins.internal.MultiHoster import MultiHoster
class SmoozedCom(MultiHoster):
__name__ = "SmoozedCom"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady
@@ -29,7 +29,7 @@ class SmoozedCom(MultiHoster):
pyfile.name = ".".join(temp)
# Check the link
- get_data = {'session_key': self.account.getAccountData(self.user)['session_key'],
+ get_data = {'session_key': self.account.getAccountInfo(self.user)['session'],
'url' : pyfile.url}
data = json_loads(self.load("http://www2.smoozed.com/api/check", get=get_data))
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/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py
index 52f12b5b8..e87f9b97f 100644
--- a/module/plugins/hoster/UnrestrictLi.py
+++ b/module/plugins/hoster/UnrestrictLi.py
@@ -2,8 +2,6 @@
import re
-from datetime import datetime, timedelta
-
from module.common.json_layer import json_loads
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
from module.plugins.internal.SimpleHoster import secondsToMidnight
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/hoster/WebshareCz.py b/module/plugins/hoster/WebshareCz.py
index e3424fc21..98187d46a 100644
--- a/module/plugins/hoster/WebshareCz.py
+++ b/module/plugins/hoster/WebshareCz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class WebshareCz(SimpleHoster):
__name__ = "WebshareCz"
__type__ = "hoster"
- __version__ = "0.15"
+ __version__ = "0.16"
__pattern__ = r'https?://(?:www\.)?webshare\.cz/(?:#/)?file/(?P<ID>\w+)'
@@ -21,7 +21,7 @@ class WebshareCz(SimpleHoster):
@classmethod
def getInfo(cls, url="", html=""):
- info = super(WebshareCz, self).getInfo(url, html)
+ info = super(WebshareCz, cls).getInfo(url, html)
if url:
info['pattern'] = re.match(cls.__pattern__, url).groupdict()
diff --git a/module/plugins/hoster/YibaishiwuCom.py b/module/plugins/hoster/YibaishiwuCom.py
index adc403de4..cf1550ebc 100644
--- a/module/plugins/hoster/YibaishiwuCom.py
+++ b/module/plugins/hoster/YibaishiwuCom.py
@@ -50,7 +50,7 @@ class YibaishiwuCom(SimpleHoster):
self.logDebug("Trying URL: " + url)
self.download(url)
break
- except:
+ except Exception:
continue
else:
self.fail(_("No working link found"))
diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py
index 2648f532f..39c8d36d6 100644
--- a/module/plugins/hoster/ZippyshareCom.py
+++ b/module/plugins/hoster/ZippyshareCom.py
@@ -10,9 +10,9 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class ZippyshareCom(SimpleHoster):
__name__ = "ZippyshareCom"
__type__ = "hoster"
- __version__ = "0.66"
+ __version__ = "0.67"
- __pattern__ = r'(?P<HOST>http://www\d{0,2}\.zippyshare\.com)/v(?:/|iew\.jsp.*key=)(?P<KEY>\d+)'
+ __pattern__ = r'(?P<HOST>http://www\d{0,2}\.zippyshare\.com)/v(?:/|iew\.jsp.*key=)(?P<KEY>[\w^_]+)'
__description__ = """Zippyshare.com hoster plugin"""
__license__ = "GPLv3"