summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hoster')
-rw-r--r--module/plugins/hoster/AlldebridCom.py14
-rw-r--r--module/plugins/hoster/AndroidfilehostCom.py16
-rw-r--r--module/plugins/hoster/BasePlugin.py26
-rw-r--r--module/plugins/hoster/BasketbuildCom.py16
-rw-r--r--module/plugins/hoster/BayfilesCom.py2
-rw-r--r--module/plugins/hoster/BezvadataCz.py36
-rw-r--r--module/plugins/hoster/BillionuploadsCom.py2
-rw-r--r--module/plugins/hoster/BitshareCom.py46
-rw-r--r--module/plugins/hoster/BoltsharingCom.py2
-rw-r--r--module/plugins/hoster/CatShareNet.py8
-rw-r--r--module/plugins/hoster/CloudzerNet.py2
-rw-r--r--module/plugins/hoster/CloudzillaTo.py16
-rw-r--r--module/plugins/hoster/CramitIn.py2
-rw-r--r--module/plugins/hoster/CrockoCom.py8
-rw-r--r--module/plugins/hoster/CyberlockerCh.py2
-rw-r--r--module/plugins/hoster/CzshareCom.py42
-rw-r--r--module/plugins/hoster/DailymotionCom.py32
-rw-r--r--module/plugins/hoster/DataHu.py6
-rw-r--r--module/plugins/hoster/DataportCz.py12
-rw-r--r--module/plugins/hoster/DateiTo.py12
-rw-r--r--module/plugins/hoster/DdlstorageCom.py2
-rw-r--r--module/plugins/hoster/DebridItaliaCom.py8
-rw-r--r--module/plugins/hoster/DepositfilesCom.py14
-rw-r--r--module/plugins/hoster/DevhostSt.py6
-rw-r--r--module/plugins/hoster/DlFreeFr.py22
-rw-r--r--module/plugins/hoster/DodanePl.py2
-rw-r--r--module/plugins/hoster/DropboxCom.py10
-rw-r--r--module/plugins/hoster/DuploadOrg.py2
-rw-r--r--module/plugins/hoster/EasybytezCom.py2
-rw-r--r--module/plugins/hoster/EdiskCz.py6
-rw-r--r--module/plugins/hoster/EgoFilesCom.py2
-rw-r--r--module/plugins/hoster/EnteruploadCom.py2
-rw-r--r--module/plugins/hoster/EpicShareNet.py2
-rw-r--r--module/plugins/hoster/EuroshareEu.py12
-rw-r--r--module/plugins/hoster/ExashareCom.py10
-rw-r--r--module/plugins/hoster/ExtabitCom.py16
-rw-r--r--module/plugins/hoster/FastixRu.py8
-rw-r--r--module/plugins/hoster/FastshareCz.py18
-rw-r--r--module/plugins/hoster/FileApeCom.py2
-rw-r--r--module/plugins/hoster/FileSharkPl.py22
-rw-r--r--module/plugins/hoster/FileStoreTo.py8
-rw-r--r--module/plugins/hoster/FilebeerInfo.py2
-rw-r--r--module/plugins/hoster/FileboomMe.py18
-rw-r--r--module/plugins/hoster/FilecloudIo.py26
-rw-r--r--module/plugins/hoster/FiledropperCom.py10
-rw-r--r--module/plugins/hoster/FilefactoryCom.py16
-rw-r--r--module/plugins/hoster/FilejungleCom.py4
-rw-r--r--module/plugins/hoster/FileomCom.py8
-rw-r--r--module/plugins/hoster/FilepostCom.py22
-rw-r--r--module/plugins/hoster/FilepupNet.py8
-rw-r--r--module/plugins/hoster/FilerNet.py12
-rw-r--r--module/plugins/hoster/FilerioCom.py2
-rw-r--r--module/plugins/hoster/FilesMailRu.py34
-rw-r--r--module/plugins/hoster/FileserveCom.py74
-rw-r--r--module/plugins/hoster/FileshareInUa.py2
-rw-r--r--module/plugins/hoster/FilesonicCom.py2
-rw-r--r--module/plugins/hoster/FileuploadNet.py6
-rw-r--r--module/plugins/hoster/FilezyNet.py2
-rw-r--r--module/plugins/hoster/FiredriveCom.py2
-rw-r--r--module/plugins/hoster/FlyFilesNet.py6
-rw-r--r--module/plugins/hoster/FourSharedCom.py6
-rw-r--r--module/plugins/hoster/FreakshareCom.py28
-rw-r--r--module/plugins/hoster/FreeWayMe.py14
-rw-r--r--module/plugins/hoster/FreevideoCz.py2
-rw-r--r--module/plugins/hoster/FshareVn.py26
-rw-r--r--module/plugins/hoster/Ftp.py16
-rw-r--r--module/plugins/hoster/GamefrontCom.py10
-rw-r--r--module/plugins/hoster/GigapetaCom.py10
-rw-r--r--module/plugins/hoster/GooIm.py8
-rw-r--r--module/plugins/hoster/GoogledriveCom.py12
-rw-r--r--module/plugins/hoster/HellshareCz.py6
-rw-r--r--module/plugins/hoster/HellspyCz.py2
-rw-r--r--module/plugins/hoster/HighWayMe.py24
-rw-r--r--module/plugins/hoster/HostujeNet.py10
-rw-r--r--module/plugins/hoster/HotfileCom.py2
-rw-r--r--module/plugins/hoster/HugefilesNet.py2
-rw-r--r--module/plugins/hoster/HundredEightyUploadCom.py2
-rw-r--r--module/plugins/hoster/IFileWs.py2
-rw-r--r--module/plugins/hoster/IcyFilesCom.py2
-rw-r--r--module/plugins/hoster/IfileIt.py2
-rw-r--r--module/plugins/hoster/IfolderRu.py16
-rw-r--r--module/plugins/hoster/JumbofilesCom.py8
-rw-r--r--module/plugins/hoster/JunocloudMe.py2
-rw-r--r--module/plugins/hoster/Keep2ShareCc.py32
-rw-r--r--module/plugins/hoster/KickloadCom.py2
-rw-r--r--module/plugins/hoster/KingfilesNet.py10
-rw-r--r--module/plugins/hoster/LemUploadsCom.py2
-rw-r--r--module/plugins/hoster/LetitbitNet.py36
-rw-r--r--module/plugins/hoster/LinksnappyCom.py8
-rw-r--r--module/plugins/hoster/LoadTo.py8
-rw-r--r--module/plugins/hoster/LolabitsEs.py10
-rw-r--r--module/plugins/hoster/LomafileCom.py2
-rw-r--r--module/plugins/hoster/LuckyShareNet.py20
-rw-r--r--module/plugins/hoster/MediafireCom.py18
-rw-r--r--module/plugins/hoster/MegaCoNz.py34
-rw-r--r--module/plugins/hoster/MegaDebridEu.py4
-rw-r--r--module/plugins/hoster/MegaFilesSe.py2
-rw-r--r--module/plugins/hoster/MegaRapidCz.py8
-rw-r--r--module/plugins/hoster/MegaRapidoNet.py8
-rw-r--r--module/plugins/hoster/MegacrypterCom.py8
-rw-r--r--module/plugins/hoster/MegareleaseOrg.py2
-rw-r--r--module/plugins/hoster/MegasharesCom.py32
-rw-r--r--module/plugins/hoster/MegauploadCom.py2
-rw-r--r--module/plugins/hoster/MegavideoCom.py2
-rw-r--r--module/plugins/hoster/MovReelCom.py2
-rw-r--r--module/plugins/hoster/MultihostersCom.py2
-rw-r--r--module/plugins/hoster/MultishareCz.py12
-rw-r--r--module/plugins/hoster/MyfastfileCom.py8
-rw-r--r--module/plugins/hoster/MystoreTo.py10
-rw-r--r--module/plugins/hoster/MyvideoDe.py2
-rw-r--r--module/plugins/hoster/NahrajCz.py2
-rw-r--r--module/plugins/hoster/NarodRu.py10
-rw-r--r--module/plugins/hoster/NetloadIn.py2
-rw-r--r--module/plugins/hoster/NitroflareCom.py8
-rw-r--r--module/plugins/hoster/NoPremiumPl.py26
-rw-r--r--module/plugins/hoster/NosuploadCom.py10
-rw-r--r--module/plugins/hoster/NovafileCom.py2
-rw-r--r--module/plugins/hoster/NowDownloadSx.py10
-rw-r--r--module/plugins/hoster/NowVideoSx.py8
-rw-r--r--module/plugins/hoster/OboomCom.py84
-rw-r--r--module/plugins/hoster/OneFichierCom.py14
-rw-r--r--module/plugins/hoster/OpenloadIo.py6
-rw-r--r--module/plugins/hoster/OronCom.py2
-rw-r--r--module/plugins/hoster/OverLoadMe.py12
-rw-r--r--module/plugins/hoster/PandaplaNet.py2
-rw-r--r--module/plugins/hoster/PornhostCom.py2
-rw-r--r--module/plugins/hoster/PornhubCom.py2
-rw-r--r--module/plugins/hoster/PotloadCom.py2
-rw-r--r--module/plugins/hoster/PremiumTo.py12
-rw-r--r--module/plugins/hoster/PremiumizeMe.py6
-rw-r--r--module/plugins/hoster/PromptfileCom.py8
-rw-r--r--module/plugins/hoster/PrzeklejPl.py2
-rw-r--r--module/plugins/hoster/PutdriveCom.py2
-rw-r--r--module/plugins/hoster/QuickshareCz.py22
-rw-r--r--module/plugins/hoster/RPNetBiz.py22
-rw-r--r--module/plugins/hoster/RapideoPl.py26
-rw-r--r--module/plugins/hoster/RapidfileshareNet.py2
-rw-r--r--module/plugins/hoster/RapidgatorNet.py32
-rw-r--r--module/plugins/hoster/RapiduNet.py18
-rw-r--r--module/plugins/hoster/RarefileNet.py2
-rw-r--r--module/plugins/hoster/RealdebridCom.py14
-rw-r--r--module/plugins/hoster/RedtubeCom.py2
-rw-r--r--module/plugins/hoster/RehostTo.py4
-rw-r--r--module/plugins/hoster/RemixshareCom.py8
-rw-r--r--module/plugins/hoster/RgHostNet.py2
-rw-r--r--module/plugins/hoster/SafesharingEu.py2
-rw-r--r--module/plugins/hoster/SecureUploadEu.py2
-rw-r--r--module/plugins/hoster/SendspaceCom.py12
-rw-r--r--module/plugins/hoster/Share4WebCom.py2
-rw-r--r--module/plugins/hoster/Share76Com.py2
-rw-r--r--module/plugins/hoster/ShareFilesCo.py2
-rw-r--r--module/plugins/hoster/SharebeesCom.py2
-rw-r--r--module/plugins/hoster/ShareonlineBiz.py52
-rw-r--r--module/plugins/hoster/ShareplaceCom.py6
-rw-r--r--module/plugins/hoster/SharingmatrixCom.py2
-rw-r--r--module/plugins/hoster/ShragleCom.py2
-rw-r--r--module/plugins/hoster/SimplyPremiumCom.py24
-rw-r--r--module/plugins/hoster/SimplydebridCom.py10
-rw-r--r--module/plugins/hoster/SizedriveCom.py10
-rw-r--r--module/plugins/hoster/SmoozedCom.py4
-rw-r--r--module/plugins/hoster/SockshareCom.py2
-rw-r--r--module/plugins/hoster/SolidfilesCom.py6
-rw-r--r--module/plugins/hoster/SoundcloudCom.py8
-rw-r--r--module/plugins/hoster/SpeedLoadOrg.py2
-rw-r--r--module/plugins/hoster/SpeedfileCz.py2
-rw-r--r--module/plugins/hoster/SpeedyshareCom.py8
-rw-r--r--module/plugins/hoster/StorageTo.py2
-rw-r--r--module/plugins/hoster/StreamCz.py12
-rw-r--r--module/plugins/hoster/StreamcloudEu.py8
-rw-r--r--module/plugins/hoster/TurbobitNet.py54
-rw-r--r--module/plugins/hoster/TurbouploadCom.py2
-rw-r--r--module/plugins/hoster/TusfilesNet.py10
-rw-r--r--module/plugins/hoster/TwoSharedCom.py6
-rw-r--r--module/plugins/hoster/UlozTo.py50
-rw-r--r--module/plugins/hoster/UloziskoSk.py12
-rw-r--r--module/plugins/hoster/UnibytesCom.py16
-rw-r--r--module/plugins/hoster/UnrestrictLi.py2
-rw-r--r--module/plugins/hoster/UpleaCom.py12
-rw-r--r--module/plugins/hoster/UploadStationCom.py2
-rw-r--r--module/plugins/hoster/UploadableCh.py14
-rw-r--r--module/plugins/hoster/UploadboxCom.py2
-rw-r--r--module/plugins/hoster/UploadedTo.py16
-rw-r--r--module/plugins/hoster/UploadhereCom.py2
-rw-r--r--module/plugins/hoster/UploadheroCom.py8
-rw-r--r--module/plugins/hoster/UploadingCom.py14
-rw-r--r--module/plugins/hoster/UploadkingCom.py2
-rw-r--r--module/plugins/hoster/UpstoreNet.py6
-rw-r--r--module/plugins/hoster/UptoboxCom.py8
-rw-r--r--module/plugins/hoster/VeehdCom.py10
-rw-r--r--module/plugins/hoster/VeohCom.py14
-rw-r--r--module/plugins/hoster/VidPlayNet.py2
-rw-r--r--module/plugins/hoster/VimeoCom.py20
-rw-r--r--module/plugins/hoster/Vipleech4UCom.py2
-rw-r--r--module/plugins/hoster/VkCom.py6
-rw-r--r--module/plugins/hoster/WarserverCz.py2
-rw-r--r--module/plugins/hoster/WebshareCz.py14
-rw-r--r--module/plugins/hoster/WrzucTo.py6
-rw-r--r--module/plugins/hoster/WuploadCom.py2
-rw-r--r--module/plugins/hoster/X7To.py2
-rw-r--r--module/plugins/hoster/XFileSharingPro.py8
-rw-r--r--module/plugins/hoster/XHamsterCom.py12
-rw-r--r--module/plugins/hoster/XVideosCom.py2
-rw-r--r--module/plugins/hoster/XdadevelopersCom.py10
-rw-r--r--module/plugins/hoster/Xdcc.py34
-rw-r--r--module/plugins/hoster/YadiSk.py14
-rw-r--r--module/plugins/hoster/YibaishiwuCom.py8
-rw-r--r--module/plugins/hoster/YoupornCom.py2
-rw-r--r--module/plugins/hoster/YourfilesTo.py4
-rw-r--r--module/plugins/hoster/YoutubeCom.py42
-rw-r--r--module/plugins/hoster/ZDF.py2
-rw-r--r--module/plugins/hoster/ZShareNet.py2
-rw-r--r--module/plugins/hoster/ZahikiNet.py8
-rw-r--r--module/plugins/hoster/ZeveraCom.py4
-rw-r--r--module/plugins/hoster/ZippyshareCom.py14
214 files changed, 1144 insertions, 1144 deletions
diff --git a/module/plugins/hoster/AlldebridCom.py b/module/plugins/hoster/AlldebridCom.py
index e0daa6657..46379bdc9 100644
--- a/module/plugins/hoster/AlldebridCom.py
+++ b/module/plugins/hoster/AlldebridCom.py
@@ -11,7 +11,7 @@ from module.utils import parseFileSize
class AlldebridCom(MultiHoster):
__name__ = "AlldebridCom"
__type__ = "hoster"
- __version__ = "0.47"
+ __version__ = "0.48"
__pattern__ = r'https?://(?:www\.|s\d+\.)?alldebrid\.com/dl/[\w^_]+'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -23,23 +23,23 @@ class AlldebridCom(MultiHoster):
def setup(self):
- self.chunkLimit = 16
+ self.chunk_limit = 16
- def handlePremium(self, pyfile):
- password = self.getPassword()
+ def handle_premium(self, pyfile):
+ password = self.get_password()
data = json_loads(self.load("http://www.alldebrid.com/service.php",
get={'link': pyfile.url, 'json': "true", 'pw': password}))
- self.logDebug("Json data", data)
+ self.log_debug("Json data", data)
if data['error']:
if data['error'] == "This link isn't available on the hoster website.":
self.offline()
else:
- self.logWarning(data['error'])
- self.tempOffline()
+ self.log_warning(data['error'])
+ self.temp_offline()
else:
if pyfile.name and not pyfile.name.endswith('.tmp'):
pyfile.name = data['filename']
diff --git a/module/plugins/hoster/AndroidfilehostCom.py b/module/plugins/hoster/AndroidfilehostCom.py
index e5f2c7f88..35e311154 100644
--- a/module/plugins/hoster/AndroidfilehostCom.py
+++ b/module/plugins/hoster/AndroidfilehostCom.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class AndroidfilehostCom(SimpleHoster):
__name__ = "AndroidfilehostCom"
__type__ = "hoster"
- __version__ = "0.01"
+ __version__ = "0.02"
__pattern__ = r'https?://(?:www\.)?androidfilehost\.com/\?fid=\d+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -31,17 +31,17 @@ class AndroidfilehostCom(SimpleHoster):
def setup(self):
- self.multiDL = True
- self.resumeDownload = True
- self.chunkLimit = 1
+ self.multi_dl = True
+ self.resume_download = True
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
wait = re.search(self.WAIT_PATTERN, self.html)
- self.logDebug("Waiting time: %s seconds" % wait.group(1))
+ self.log_debug("Waiting time: %s seconds" % wait.group(1))
fid = re.search(r'id="fid" value="(\d+)" />', self.html).group(1)
- self.logDebug("fid: %s" % fid)
+ self.log_debug("fid: %s" % fid)
html = self.load("https://www.androidfilehost.com/libs/otf/mirrors.otf.php",
post={'submit': 'submit',
@@ -51,7 +51,7 @@ class AndroidfilehostCom(SimpleHoster):
self.link = re.findall('"url":"(.*?)"', html)[0].replace("\\", "")
mirror_host = self.link.split("/")[2]
- self.logDebug("Mirror Host: %s" % mirror_host)
+ self.log_debug("Mirror Host: %s" % mirror_host)
html = self.load("https://www.androidfilehost.com/libs/otf/stats.otf.php",
get={'fid' : fid,
diff --git a/module/plugins/hoster/BasePlugin.py b/module/plugins/hoster/BasePlugin.py
index 82311dd6b..7fc0426ea 100644
--- a/module/plugins/hoster/BasePlugin.py
+++ b/module/plugins/hoster/BasePlugin.py
@@ -12,7 +12,7 @@ from module.plugins.internal.Hoster import Hoster
class BasePlugin(Hoster):
__name__ = "BasePlugin"
__type__ = "hoster"
- __version__ = "0.44"
+ __version__ = "0.45"
__pattern__ = r'^unmatchable$'
@@ -23,7 +23,7 @@ class BasePlugin(Hoster):
@classmethod
- def getInfo(cls, url="", html=""): #@TODO: Move to hoster class in 0.4.10
+ def get_info(cls, url="", html=""): #@TODO: Move to hoster class in 0.4.10
url = urllib.unquote(url)
url_p = urlparse.urlparse(url)
return {'name' : (url_p.path.split('/')[-1]
@@ -35,23 +35,23 @@ class BasePlugin(Hoster):
def setup(self):
- self.chunkLimit = -1
- self.multiDL = True
- self.resumeDownload = True
+ self.chunk_limit = -1
+ self.multi_dl = True
+ self.resume_download = True
def process(self, pyfile):
"""
Main function
"""
- pyfile.name = self.getInfo(pyfile.url)['name']
+ pyfile.name = self.get_info(pyfile.url)['name']
if not pyfile.url.startswith("http"):
self.fail(_("No plugin matched"))
for _i in xrange(5):
try:
- link = self.directLink(self, urllib.unquote(pyfile.url))
+ link = self.direct_link(self, urllib.unquote(pyfile.url))
if link:
self.download(link, ref=False, disposition=True)
@@ -63,17 +63,17 @@ class BasePlugin(Hoster):
self.offline()
elif e.code in (401, 403):
- self.logDebug("Auth required", "Received HTTP status code: %d" % e.code)
+ self.log_debug("Auth required", "Received HTTP status code: %d" % e.code)
account = self.core.accountManager.getAccountPlugin('Http')
servers = [x['login'] for x in account.getAllAccounts()]
server = urlparse.urlparse(pyfile.url).netloc
if server in servers:
- self.logDebug("Logging on to %s" % server)
+ self.log_debug("Logging on to %s" % server)
self.req.addAuth(account.getAccountData(server)['password'])
else:
- pwd = self.getPassword()
+ pwd = self.get_password()
if ':' in pwd:
self.req.addAuth(pwd)
else:
@@ -85,7 +85,7 @@ class BasePlugin(Hoster):
else:
self.fail(_("No file downloaded")) #@TODO: Move to hoster class in 0.4.10
- errmsg = self.checkDownload({'Empty file' : re.compile(r'\A\s*\Z'),
+ errmsg = self.check_download({'Empty file' : re.compile(r'\A\s*\Z'),
'Html error' : re.compile(r'\A(?:\s*<.+>)?((?:[\w\s]*(?:[Ee]rror|ERROR)\s*\:?)?\s*\d{3})(?:\Z|\s+)'),
'Html file' : re.compile(r'\A\s*<!DOCTYPE html'),
'Request error': re.compile(r'([Aa]n error occured while processing your request)')})
@@ -93,11 +93,11 @@ class BasePlugin(Hoster):
return
try:
- errmsg += " | " + self.lastCheck.group(1).strip()
+ errmsg += " | " + self.last_check.group(1).strip()
except Exception:
pass
- self.logWarning("Check result: " + errmsg, "Waiting 1 minute and retry")
+ self.log_warning("Check result: " + errmsg, "Waiting 1 minute and retry")
self.retry(3, 60, errmsg)
diff --git a/module/plugins/hoster/BasketbuildCom.py b/module/plugins/hoster/BasketbuildCom.py
index cfc945464..709360544 100644
--- a/module/plugins/hoster/BasketbuildCom.py
+++ b/module/plugins/hoster/BasketbuildCom.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class BasketbuildCom(SimpleHoster):
__name__ = "BasketbuildCom"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'https?://(?:www\.)?(?:\w\.)?basketbuild\.com/filedl/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -28,12 +28,12 @@ class BasketbuildCom(SimpleHoster):
def setup(self):
- self.multiDL = True
- self.resumeDownload = True
- self.chunkLimit = 1
+ self.multi_dl = True
+ self.resume_download = True
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
try:
link1 = re.search(r'href="(.+dlgate/.+)"', self.html).group(1)
self.html = self.load(link1)
@@ -42,15 +42,15 @@ class BasketbuildCom(SimpleHoster):
self.error(_("Hop #1 not found"))
else:
- self.logDebug("Next hop: %s" % link1)
+ self.log_debug("Next hop: %s" % link1)
try:
wait = re.search(r'var sec = (\d+)', self.html).group(1)
- self.logDebug("Wait %s seconds" % wait)
+ self.log_debug("Wait %s seconds" % wait)
self.wait(wait)
except AttributeError:
- self.logDebug("No wait time found")
+ self.log_debug("No wait time found")
try:
self.link = re.search(r'id="dlLink">\s*<a href="(.+?)"', self.html).group(1)
diff --git a/module/plugins/hoster/BayfilesCom.py b/module/plugins/hoster/BayfilesCom.py
index cccd4acc7..1c35bcc60 100644
--- a/module/plugins/hoster/BayfilesCom.py
+++ b/module/plugins/hoster/BayfilesCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class BayfilesCom(DeadHoster):
__name__ = "BayfilesCom"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.10"
__pattern__ = r'https?://(?:www\.)?bayfiles\.(com|net)/file/(?P<ID>\w+/\w+/[^/]+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/BezvadataCz.py b/module/plugins/hoster/BezvadataCz.py
index d3f25d52f..f0514b817 100644
--- a/module/plugins/hoster/BezvadataCz.py
+++ b/module/plugins/hoster/BezvadataCz.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class BezvadataCz(SimpleHoster):
__name__ = "BezvadataCz"
__type__ = "hoster"
- __version__ = "0.27"
+ __version__ = "0.28"
__pattern__ = r'http://(?:www\.)?bezvadata\.cz/stahnout/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -24,22 +24,22 @@ class BezvadataCz(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
+ self.resume_download = True
+ self.multi_dl = True
- def handleFree(self, pyfile):
- #download button
+ def handle_free(self, pyfile):
+ # download button
m = re.search(r'<a class="stahnoutSoubor".*?href="(.*?)"', self.html)
if m is None:
self.error(_("Page 1 URL not found"))
url = "http://bezvadata.cz%s" % m.group(1)
- #captcha form
+ # captcha form
self.html = self.load(url)
- self.checkErrors()
+ self.check_errors()
for _i in xrange(5):
- action, inputs = self.parseHtmlForm('frm-stahnoutFreeForm')
+ action, inputs = self.parse_html_form('frm-stahnoutFreeForm')
if not inputs:
self.error(_("FreeForm"))
@@ -47,31 +47,31 @@ class BezvadataCz(SimpleHoster):
if m is None:
self.error(_("Wrong captcha image"))
- #captcha image is contained in html page as base64encoded data but decryptCaptcha() expects image url
+ # captcha image is contained in html page as base64encoded data but decryptCaptcha() expects image url
self.load, proper_load = self.loadcaptcha, self.load
try:
- inputs['captcha'] = self.decryptCaptcha(m.group(1), imgtype='png')
+ inputs['captcha'] = self.decrypt_captcha(m.group(1), imgtype='png')
finally:
self.load = proper_load
if '<img src="data:image/png;base64' in self.html:
- self.invalidCaptcha()
+ self.invalid_captcha()
else:
- self.correctCaptcha()
+ self.correct_captcha()
break
else:
self.fail(_("No valid captcha code entered"))
- #download url
+ # download url
self.html = self.load("http://bezvadata.cz%s" % action, post=inputs)
- self.checkErrors()
+ self.check_errors()
m = re.search(r'<a class="stahnoutSoubor2" href="(.*?)">', self.html)
if m is None:
self.error(_("Page 2 URL not found"))
url = "http://bezvadata.cz%s" % m.group(1)
- self.logDebug("DL URL %s" % url)
+ self.log_debug("DL URL %s" % url)
- #countdown
+ # countdown
m = re.search(r'id="countdown">(\d\d):(\d\d)<', self.html)
wait_time = (int(m.group(1)) * 60 + int(m.group(2))) if m else 120
self.wait(wait_time, False)
@@ -79,11 +79,11 @@ class BezvadataCz(SimpleHoster):
self.link = url
- def checkErrors(self):
+ def check_errors(self):
if 'images/button-download-disable.png' in self.html:
self.wait(5 * 60, 24, _("Download limit reached")) #: parallel dl limit
elif '<div class="infobox' in self.html:
- self.tempOffline()
+ self.temp_offline()
else:
return super(BezvadataCz, self).checkErrors()
diff --git a/module/plugins/hoster/BillionuploadsCom.py b/module/plugins/hoster/BillionuploadsCom.py
index d0fbd7a8b..916e847e0 100644
--- a/module/plugins/hoster/BillionuploadsCom.py
+++ b/module/plugins/hoster/BillionuploadsCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class BillionuploadsCom(DeadHoster):
__name__ = "BillionuploadsCom"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__pattern__ = r'http://(?:www\.)?billionuploads\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/BitshareCom.py b/module/plugins/hoster/BitshareCom.py
index 2736d98a8..d312cf277 100644
--- a/module/plugins/hoster/BitshareCom.py
+++ b/module/plugins/hoster/BitshareCom.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class BitshareCom(SimpleHoster):
__name__ = "BitshareCom"
__type__ = "hoster"
- __version__ = "0.54"
+ __version__ = "0.55"
__pattern__ = r'http://(?:www\.)?bitshare\.com/(files/)?(?(1)|\?f=)(?P<ID>\w+)(?(1)/(?P<NAME>.+?)\.html)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -32,8 +32,8 @@ class BitshareCom(SimpleHoster):
def setup(self):
- self.multiDL = self.premium
- self.chunkLimit = 1
+ self.multi_dl = self.premium
+ self.chunk_limit = 1
def process(self, pyfile):
@@ -43,7 +43,7 @@ class BitshareCom(SimpleHoster):
#: File id
m = re.match(self.__pattern__, pyfile.url)
self.file_id = max(m.group('ID1'), m.group('ID2'))
- self.logDebug("File id is [%s]" % self.file_id)
+ self.log_debug("File id is [%s]" % self.file_id)
#: Load main page
self.html = self.load(pyfile.url, ref=False)
@@ -54,7 +54,7 @@ class BitshareCom(SimpleHoster):
#: Check Traffic used up
if re.search(self.TRAFFIC_USED_UP, self.html):
- self.logInfo(_("Your Traffic is used up for today"))
+ self.log_info(_("Your Traffic is used up for today"))
self.wait(30 * 60, True)
self.retry()
@@ -69,16 +69,16 @@ class BitshareCom(SimpleHoster):
#: Ajax file id
self.ajaxid = re.search(self.AJAXID_PATTERN, self.html).group(1)
- self.logDebug("File ajax id is [%s]" % self.ajaxid)
+ self.log_debug("File ajax id is [%s]" % self.ajaxid)
#: This may either download our file or forward us to an error page
- self.link = self.getDownloadUrl()
+ self.link = self.get_download_url()
- if self.checkDownload({"error": ">Error occured<"}):
+ if self.check_download({"error": ">Error occured<"}):
self.retry(5, 5 * 60, "Bitshare host : Error occured")
- def getDownloadUrl(self):
+ def get_download_url(self):
#: Return location if direct download is active
if self.premium:
header = self.load(self.pyfile.url, just_header=True)
@@ -86,22 +86,22 @@ class BitshareCom(SimpleHoster):
return header['location']
#: Get download info
- self.logDebug("Getting download info")
+ self.log_debug("Getting download info")
res = self.load("http://bitshare.com/files-ajax/" + self.file_id + "/request.html",
post={"request": "generateID", "ajaxid": self.ajaxid})
- self.handleErrors(res, ':')
+ self.handle_errors(res, ':')
parts = res.split(":")
filetype = parts[0]
wait = int(parts[1])
captcha = int(parts[2])
- self.logDebug("Download info [type: '%s', waiting: %d, captcha: %d]" % (filetype, wait, captcha))
+ self.log_debug("Download info [type: '%s', waiting: %d, captcha: %d]" % (filetype, wait, captcha))
#: Waiting
if wait > 0:
- self.logDebug("Waiting %d seconds." % wait)
+ self.log_debug("Waiting %d seconds." % wait)
if wait < 120:
self.wait(wait, False)
else:
@@ -110,7 +110,7 @@ class BitshareCom(SimpleHoster):
#: Resolve captcha
if captcha == 1:
- self.logDebug("File is captcha protected")
+ self.log_debug("File is captcha protected")
recaptcha = ReCaptcha(self)
#: Try up to 3 times
@@ -121,23 +121,23 @@ class BitshareCom(SimpleHoster):
"ajaxid" : self.ajaxid,
"recaptcha_challenge_field": challenge,
"recaptcha_response_field" : response})
- if self.handleCaptchaErrors(res):
+ if self.handle_captcha_errors(res):
break
#: Get download URL
- self.logDebug("Getting download url")
+ self.log_debug("Getting download url")
res = self.load("http://bitshare.com/files-ajax/" + self.file_id + "/request.html",
post={"request": "getDownloadURL", "ajaxid": self.ajaxid})
- self.handleErrors(res, '#')
+ self.handle_errors(res, '#')
url = res.split("#")[-1]
return url
- def handleErrors(self, res, separator):
- self.logDebug("Checking response [%s]" % res)
+ def handle_errors(self, res, separator):
+ self.log_debug("Checking response [%s]" % res)
if "ERROR:Session timed out" in res:
self.retry()
elif "ERROR" in res:
@@ -145,15 +145,15 @@ class BitshareCom(SimpleHoster):
self.fail(msg)
- def handleCaptchaErrors(self, res):
- self.logDebug("Result of captcha resolving [%s]" % res)
+ def handle_captcha_errors(self, res):
+ self.log_debug("Result of captcha resolving [%s]" % res)
if "SUCCESS" in res:
- self.correctCaptcha()
+ self.correct_captcha()
return True
elif "ERROR:SESSION ERROR" in res:
self.retry()
- self.invalidCaptcha()
+ self.invalid_captcha()
getInfo = create_getInfo(BitshareCom)
diff --git a/module/plugins/hoster/BoltsharingCom.py b/module/plugins/hoster/BoltsharingCom.py
index db813ba2e..579b4ce39 100644
--- a/module/plugins/hoster/BoltsharingCom.py
+++ b/module/plugins/hoster/BoltsharingCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class BoltsharingCom(DeadHoster):
__name__ = "BoltsharingCom"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'http://(?:www\.)?boltsharing\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/CatShareNet.py b/module/plugins/hoster/CatShareNet.py
index 795da6229..04b9792ad 100644
--- a/module/plugins/hoster/CatShareNet.py
+++ b/module/plugins/hoster/CatShareNet.py
@@ -9,7 +9,7 @@ from module.plugins.internal.ReCaptcha import ReCaptcha
class CatShareNet(SimpleHoster):
__name__ = "CatShareNet"
__type__ = "hoster"
- __version__ = "0.15"
+ __version__ = "0.16"
__pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -32,11 +32,11 @@ class CatShareNet(SimpleHoster):
def setup(self):
- self.multiDL = self.premium
- self.resumeDownload = True
+ self.multi_dl = self.premium
+ self.resume_download = True
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
recaptcha = ReCaptcha(self)
response, challenge = recaptcha.challenge()
diff --git a/module/plugins/hoster/CloudzerNet.py b/module/plugins/hoster/CloudzerNet.py
index af40b8d5f..02cc416aa 100644
--- a/module/plugins/hoster/CloudzerNet.py
+++ b/module/plugins/hoster/CloudzerNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class CloudzerNet(DeadHoster):
__name__ = "CloudzerNet"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'https?://(?:www\.)?(cloudzer\.net/file/|clz\.to/(file/)?)\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/CloudzillaTo.py b/module/plugins/hoster/CloudzillaTo.py
index 09453137d..f58a0aa61 100644
--- a/module/plugins/hoster/CloudzillaTo.py
+++ b/module/plugins/hoster/CloudzillaTo.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class CloudzillaTo(SimpleHoster):
__name__ = "CloudzillaTo"
__type__ = "hoster"
- __version__ = "0.07"
+ __version__ = "0.08"
__pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P<ID>[\w^_]+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -24,9 +24,9 @@ class CloudzillaTo(SimpleHoster):
PASSWORD_PATTERN = r'<div id="pwd_protected">'
- def checkErrors(self):
+ def check_errors(self):
if re.search(self.PASSWORD_PATTERN, self.html):
- pw = self.getPassword()
+ pw = self.get_password()
if pw:
self.html = self.load(self.pyfile.url, get={'key': pw})
else:
@@ -38,13 +38,13 @@ class CloudzillaTo(SimpleHoster):
return super(CloudzillaTo, self).checkErrors()
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.html = self.load("http://www.cloudzilla.to/generateticket/",
- post={'file_id': self.info['pattern']['ID'], 'key': self.getPassword()})
+ post={'file_id': self.info['pattern']['ID'], 'key': self.get_password()})
ticket = dict(re.findall(r'<(.+?)>([^<>]+?)</', self.html))
- self.logDebug(ticket)
+ self.log_debug(ticket)
if 'error' in ticket:
if "File is password protected" in ticket['error']:
@@ -60,8 +60,8 @@ class CloudzillaTo(SimpleHoster):
'ticket_id': ticket['ticket_id']}
- def handlePremium(self, pyfile):
- return self.handleFree(pyfile)
+ def handle_premium(self, pyfile):
+ return self.handle_free(pyfile)
getInfo = create_getInfo(CloudzillaTo)
diff --git a/module/plugins/hoster/CramitIn.py b/module/plugins/hoster/CramitIn.py
index 44dac958d..7f85fcd0b 100644
--- a/module/plugins/hoster/CramitIn.py
+++ b/module/plugins/hoster/CramitIn.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class CramitIn(XFSHoster):
__name__ = "CramitIn"
__type__ = "hoster"
- __version__ = "0.07"
+ __version__ = "0.08"
__pattern__ = r'http://(?:www\.)?cramit\.in/\w{12}'
diff --git a/module/plugins/hoster/CrockoCom.py b/module/plugins/hoster/CrockoCom.py
index 098ba5fab..5250af2c3 100644
--- a/module/plugins/hoster/CrockoCom.py
+++ b/module/plugins/hoster/CrockoCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class CrockoCom(SimpleHoster):
__name__ = "CrockoCom"
__type__ = "hoster"
- __version__ = "0.20"
+ __version__ = "0.21"
__pattern__ = r'http://(?:www\.)?(crocko|easy-share)\.com/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -32,7 +32,7 @@ class CrockoCom(SimpleHoster):
NAME_REPLACEMENTS = [(r'<.*?>', '')]
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
if "You need Premium membership to download this file." in self.html:
self.fail(_("You need Premium membership to download this file"))
@@ -57,8 +57,8 @@ class CrockoCom(SimpleHoster):
inputs['recaptcha_response_field'], inputs['recaptcha_challenge_field'] = recaptcha.challenge()
self.download(action, post=inputs)
- if self.checkDownload({"captcha": recaptcha.KEY_AJAX_PATTERN}):
- self.invalidCaptcha()
+ if self.check_download({"captcha": recaptcha.KEY_AJAX_PATTERN}):
+ self.invalid_captcha()
else:
break
else:
diff --git a/module/plugins/hoster/CyberlockerCh.py b/module/plugins/hoster/CyberlockerCh.py
index 9d748bf85..e524f63fe 100644
--- a/module/plugins/hoster/CyberlockerCh.py
+++ b/module/plugins/hoster/CyberlockerCh.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class CyberlockerCh(DeadHoster):
__name__ = "CyberlockerCh"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'http://(?:www\.)?cyberlocker\.ch/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py
index 01e120e5e..0e28f31dd 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__ = "1.00"
+ __version__ = "1.01"
__pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/(\d+/|download\.php\?).+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -39,7 +39,7 @@ class CzshareCom(SimpleHoster):
USER_CREDIT_PATTERN = r'<div class="credit">\s*kredit: <strong>([\d .,]+)(\w+)</strong>\s*</div><!-- .credit -->'
- def checkTrafficLeft(self):
+ def check_traffic_left(self):
#: check if user logged in
m = re.search(self.USER_CREDIT_PATTERN, self.html)
if m is None:
@@ -52,32 +52,32 @@ class CzshareCom(SimpleHoster):
#: check user credit
try:
credit = parseFileSize(m.group(1).replace(' ', ''), m.group(2))
- self.logInfo(_("Premium download for %i KiB of Credit") % (self.pyfile.size / 1024))
- self.logInfo(_("User %s has %i KiB left") % (self.user, credit / 1024))
+ self.log_info(_("Premium download for %i KiB of Credit") % (self.pyfile.size / 1024))
+ self.log_info(_("User %s has %i KiB left") % (self.user, credit / 1024))
if credit < self.pyfile.size:
- self.logInfo(_("Not enough credit to download file: %s") % self.pyfile.name)
+ self.log_info(_("Not enough credit to download file: %s") % self.pyfile.name)
return False
except Exception, e:
#: let's continue and see what happens...
- self.logError(e)
+ self.log_error(e)
return True
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
#: parse download link
try:
form = re.search(self.PREMIUM_FORM_PATTERN, self.html, re.S).group(1)
inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form))
except Exception, e:
- self.logError(e)
- self.resetAccount()
+ self.log_error(e)
+ self.reset_account()
#: download the file, destination is determined by pyLoad
self.download("http://sdilej.cz/profi_down.php", post=inputs, disposition=True)
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
#: get free url
m = re.search(self.FREE_URL_PATTERN, self.html)
if m is None:
@@ -85,7 +85,7 @@ class CzshareCom(SimpleHoster):
parsed_url = "http://sdilej.cz" + m.group(1)
- self.logDebug("PARSED_URL:" + parsed_url)
+ self.log_debug("PARSED_URL:" + parsed_url)
#: get download ticket and parse html
self.html = self.load(parsed_url)
@@ -98,32 +98,32 @@ class CzshareCom(SimpleHoster):
pyfile.size = int(inputs['size'])
except Exception, e:
- self.logError(e)
+ self.log_error(e)
self.error(_("Form"))
#: get and decrypt captcha
captcha_url = 'http://sdilej.cz/captcha.php'
for _i in xrange(5):
- inputs['captchastring2'] = self.decryptCaptcha(captcha_url)
+ inputs['captchastring2'] = self.decrypt_captcha(captcha_url)
self.html = self.load(parsed_url, post=inputs)
if u"<li>ZadanÃœ ověřovací kód nesouhlasí!</li>" in self.html:
- self.invalidCaptcha()
+ self.invalid_captcha()
elif re.search(self.MULTIDL_PATTERN, self.html):
self.wait(5 * 60, 12, _("Download limit reached"))
else:
- self.correctCaptcha()
+ self.correct_captcha()
break
else:
self.fail(_("No valid captcha code entered"))
m = re.search("countdown_number = (\d+);", self.html)
- self.setWait(int(m.group(1)) if m else 50)
+ self.set_wait(int(m.group(1)) if m else 50)
#: download the file, destination is determined by pyLoad
- self.logDebug("WAIT URL", self.req.lastEffectiveURL)
+ self.log_debug("WAIT URL", self.req.lastEffectiveURL)
m = re.search("free_wait.php\?server=(.*?)&(.*)", self.req.lastEffectiveURL)
if m is None:
@@ -134,9 +134,9 @@ class CzshareCom(SimpleHoster):
self.wait()
- def checkFile(self):
+ def check_file(self):
#: check download
- check = self.checkDownload({
+ check = self.check_download({
"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),
@@ -147,13 +147,13 @@ class CzshareCom(SimpleHoster):
self.fail(_("File not available - try later"))
elif check == "credit":
- self.resetAccount()
+ self.reset_account()
elif check == "multi-dl":
self.wait(5 * 60, 12, _("Download limit reached"))
elif check == "captcha":
- self.invalidCaptcha()
+ self.invalid_captcha()
self.retry()
return super(CzshareCom, self).checkFile()
diff --git a/module/plugins/hoster/DailymotionCom.py b/module/plugins/hoster/DailymotionCom.py
index f9cc0d28e..18f84ff56 100644
--- a/module/plugins/hoster/DailymotionCom.py
+++ b/module/plugins/hoster/DailymotionCom.py
@@ -8,7 +8,7 @@ from module.network.RequestFactory import getURL
from module.plugins.internal.Hoster import Hoster
-def getInfo(urls):
+def get_info(urls):
result = []
regex = re.compile(DailymotionCom.__pattern__)
apiurl = "https://api.dailymotion.com/video/%s"
@@ -40,7 +40,7 @@ def getInfo(urls):
class DailymotionCom(Hoster):
__name__ = "DailymotionCom"
__type__ = "hoster"
- __version__ = "0.21"
+ __version__ = "0.22"
__pattern__ = r'https?://(?:www\.)?dailymotion\.com/.*video/(?P<ID>[\w^_]+)'
__config__ = [("quality", "Lowest;LD 144p;LD 240p;SD 384p;HQ 480p;HD 720p;HD 1080p;Highest", "Quality", "Highest")]
@@ -51,11 +51,11 @@ class DailymotionCom(Hoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
+ self.resume_download = True
+ self.multi_dl = True
- def getStreams(self):
+ def get_streams(self):
streams = []
for result in re.finditer(r"\"(?P<URL>http:\\/\\/www.dailymotion.com\\/cdn\\/H264-(?P<QF>.*?)\\.*?)\"",
@@ -71,8 +71,8 @@ class DailymotionCom(Hoster):
return sorted(streams, key=lambda x: x[0][::-1])
- def getQuality(self):
- q = self.getConfig('quality')
+ def get_quality(self):
+ q = self.get_config('quality')
if q == "Lowest":
quality = 0
@@ -84,7 +84,7 @@ class DailymotionCom(Hoster):
return quality
- def getLink(self, streams, quality):
+ def get_link(self, streams, quality):
if quality > 0:
for x, s in [item for item in enumerate(streams)][::-1]:
qf = s[0][1]
@@ -98,28 +98,28 @@ class DailymotionCom(Hoster):
s = streams[idx]
- self.logInfo(_("Download video quality %sx%s") % s[0])
+ self.log_info(_("Download video quality %sx%s") % s[0])
return s[1]
- def checkInfo(self, pyfile):
- pyfile.name, pyfile.size, pyfile.status, pyfile.url = getInfo([pyfile.url])[0]
+ def check_info(self, pyfile):
+ pyfile.name, pyfile.size, pyfile.status, pyfile.url = get_info([pyfile.url])[0]
if pyfile.status == 1:
self.offline()
elif pyfile.status == 6:
- self.tempOffline()
+ self.temp_offline()
def process(self, pyfile):
- self.checkInfo(pyfile)
+ self.check_info(pyfile)
id = re.match(self.__pattern__, pyfile.url).group('ID')
self.html = self.load("http://www.dailymotion.com/embed/video/" + id)
- streams = self.getStreams()
- quality = self.getQuality()
+ streams = self.get_streams()
+ quality = self.get_quality()
- self.download(self.getLink(streams, quality))
+ self.download(self.get_link(streams, quality))
diff --git a/module/plugins/hoster/DataHu.py b/module/plugins/hoster/DataHu.py
index 955c94437..c6d14c8bf 100644
--- a/module/plugins/hoster/DataHu.py
+++ b/module/plugins/hoster/DataHu.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DataHu(SimpleHoster):
__name__ = "DataHu"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'http://(?:www\.)?data\.hu/get/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -28,8 +28,8 @@ class DataHu(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = self.premium
+ self.resume_download = True
+ self.multi_dl = self.premium
getInfo = create_getInfo(DataHu)
diff --git a/module/plugins/hoster/DataportCz.py b/module/plugins/hoster/DataportCz.py
index 1b4041c69..d3b25d2ad 100644
--- a/module/plugins/hoster/DataportCz.py
+++ b/module/plugins/hoster/DataportCz.py
@@ -6,7 +6,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DataportCz(SimpleHoster):
__name__ = "DataportCz"
__type__ = "hoster"
- __version__ = "0.41"
+ __version__ = "0.42"
__pattern__ = r'http://(?:www\.)?dataport\.cz/file/(.+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -24,12 +24,12 @@ class DataportCz(SimpleHoster):
FREE_SLOTS_PATTERN = ur'Počet volnÜch slotů: <span class="darkblue">(\d+)</span><br />'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
captchas = {"1": "jkeG", "2": "hMJQ", "3": "vmEK", "4": "ePQM", "5": "blBd"}
for _i in xrange(60):
- action, inputs = self.parseHtmlForm('free_download_form')
- self.logDebug(action, inputs)
+ action, inputs = self.parse_html_form('free_download_form')
+ self.log_debug(action, inputs)
if not action or not inputs:
self.error(_("free_download_form"))
@@ -40,13 +40,13 @@ class DataportCz(SimpleHoster):
self.download("http://www.dataport.cz%s" % action, post=inputs)
- check = self.checkDownload({"captcha": 'alert("\u0160patn\u011b opsan\u00fd k\u00f3d z obr\u00e1zu");',
+ check = self.check_download({"captcha": 'alert("\u0160patn\u011b opsan\u00fd k\u00f3d z obr\u00e1zu");',
"slot" : 'alert("Je n\u00e1m l\u00edto, ale moment\u00e1ln\u011b nejsou'})
if check == "captcha":
self.error(_("invalid captcha"))
elif check == "slot":
- self.logDebug("No free slots - wait 60s and retry")
+ self.log_debug("No free slots - wait 60s and retry")
self.wait(60, False)
self.html = self.load(pyfile.url)
continue
diff --git a/module/plugins/hoster/DateiTo.py b/module/plugins/hoster/DateiTo.py
index 92a96b9ec..fe1a65e12 100644
--- a/module/plugins/hoster/DateiTo.py
+++ b/module/plugins/hoster/DateiTo.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DateiTo(SimpleHoster):
__name__ = "DateiTo"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.10"
__pattern__ = r'http://(?:www\.)?datei\.to/datei/(?P<ID>\w+)\.html'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -29,19 +29,19 @@ class DateiTo(SimpleHoster):
DATA_PATTERN = r'url: "(.*?)", data: "(.*?)",'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
url = 'http://datei.to/ajax/download.php'
data = {'P': 'I', 'ID': self.info['pattern']['ID']}
recaptcha = ReCaptcha(self)
for _i in xrange(10):
- self.logDebug("URL", url, "POST", data)
+ self.log_debug("URL", url, "POST", data)
self.html = self.load(url, post=data)
- self.checkErrors()
+ self.check_errors()
if url.endswith('download.php') and 'P' in data:
if data['P'] == 'I':
- self.doWait()
+ self.do_wait()
elif data['P'] == 'IV':
break
@@ -60,7 +60,7 @@ class DateiTo(SimpleHoster):
self.link = self.html
- def doWait(self):
+ def do_wait(self):
m = re.search(self.WAIT_PATTERN, self.html)
wait_time = int(m.group(1)) if m else 30
diff --git a/module/plugins/hoster/DdlstorageCom.py b/module/plugins/hoster/DdlstorageCom.py
index 976d9ccf9..e4abeac2a 100644
--- a/module/plugins/hoster/DdlstorageCom.py
+++ b/module/plugins/hoster/DdlstorageCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class DdlstorageCom(DeadHoster):
__name__ = "DdlstorageCom"
__type__ = "hoster"
- __version__ = "1.02"
+ __version__ = "1.03"
__pattern__ = r'https?://(?:www\.)?ddlstorage\.com/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/DebridItaliaCom.py b/module/plugins/hoster/DebridItaliaCom.py
index 9e3d87934..d67836d20 100644
--- a/module/plugins/hoster/DebridItaliaCom.py
+++ b/module/plugins/hoster/DebridItaliaCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class DebridItaliaCom(MultiHoster):
__name__ = "DebridItaliaCom"
__type__ = "hoster"
- __version__ = "0.18"
+ __version__ = "0.19"
__pattern__ = r'https?://(?:www\.|s\d+\.)?debriditalia\.com/dl/\d+'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -23,9 +23,9 @@ class DebridItaliaCom(MultiHoster):
URL_REPLACEMENTS = [("https://", "http://")]
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
self.html = self.load("http://www.debriditalia.com/api.php",
- get={'generate': "on", 'link': pyfile.url, 'p': self.getPassword()})
+ get={'generate': "on", 'link': pyfile.url, 'p': self.get_password()})
if "ERROR:" not in self.html:
self.link = self.html.strip()
@@ -35,7 +35,7 @@ class DebridItaliaCom(MultiHoster):
self.html = self.load("http://debriditalia.com/linkgen2.php",
post={'xjxfun' : "convertiLink",
'xjxargs[]': "S<![CDATA[%s]]>" % pyfile.url,
- 'xjxargs[]': "S%s" % self.getPassword()})
+ 'xjxargs[]': "S%s" % self.get_password()})
try:
self.link = re.search(r'<a href="(.+?)"', self.html).group(1)
except AttributeError:
diff --git a/module/plugins/hoster/DepositfilesCom.py b/module/plugins/hoster/DepositfilesCom.py
index 18f23f552..4e4265391 100644
--- a/module/plugins/hoster/DepositfilesCom.py
+++ b/module/plugins/hoster/DepositfilesCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DepositfilesCom(SimpleHoster):
__name__ = "DepositfilesCom"
__type__ = "hoster"
- __version__ = "0.56"
+ __version__ = "0.57"
__pattern__ = r'https?://(?:www\.)?(depositfiles\.com|dfiles\.(eu|ru))(/\w{1,3})?/files/(?P<ID>\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -40,18 +40,18 @@ class DepositfilesCom(SimpleHoster):
LINK_MIRROR_PATTERN = r'class="repeat_mirror"><a href="(.+?)"'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.html = self.load(pyfile.url, post={'gateway_result': "1"})
- self.checkErrors()
+ self.check_errors()
m = re.search(r"var fid = '(\w+)';", self.html)
if m is None:
self.retry(wait_time=5)
params = {'fid': m.group(1)}
- self.logDebug("FID: %s" % params['fid'])
+ self.log_debug("FID: %s" % params['fid'])
- self.checkErrors()
+ self.check_errors()
recaptcha = ReCaptcha(self)
captcha_key = recaptcha.detect_key()
@@ -69,9 +69,9 @@ class DepositfilesCom(SimpleHoster):
self.link = urllib.unquote(m.group(1))
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
if '<span class="html_download_api-gold_traffic_limit">' in self.html:
- self.logWarning(_("Download limit reached"))
+ self.log_warning(_("Download limit reached"))
self.retry(25, 60 * 60, "Download limit reached")
elif 'onClick="show_gold_offer' in self.html:
diff --git a/module/plugins/hoster/DevhostSt.py b/module/plugins/hoster/DevhostSt.py
index a8a031aaf..27bf100de 100644
--- a/module/plugins/hoster/DevhostSt.py
+++ b/module/plugins/hoster/DevhostSt.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DevhostSt(SimpleHoster):
__name__ = "DevhostSt"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'http://(?:www\.)?d-h\.st/(?!users/)\w{3}'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -30,8 +30,8 @@ class DevhostSt(SimpleHoster):
def setup(self):
- self.multiDL = True
- self.chunkLimit = 1
+ self.multi_dl = True
+ self.chunk_limit = 1
getInfo = create_getInfo(DevhostSt)
diff --git a/module/plugins/hoster/DlFreeFr.py b/module/plugins/hoster/DlFreeFr.py
index e3be19782..f8c684ed4 100644
--- a/module/plugins/hoster/DlFreeFr.py
+++ b/module/plugins/hoster/DlFreeFr.py
@@ -35,7 +35,7 @@ class CustomBrowser(Browser):
class DlFreeFr(SimpleHoster):
__name__ = "DlFreeFr"
__type__ = "hoster"
- __version__ = "0.30"
+ __version__ = "0.31"
__pattern__ = r'http://(?:www\.)?dl\.free\.fr/(\w+|getfile\.pl\?file=/\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -53,10 +53,10 @@ class DlFreeFr(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
- self.limitDL = 5
- self.chunkLimit = 1
+ self.resume_download = True
+ self.multi_dl = True
+ self.limit_dl = 5
+ self.chunk_limit = 1
def init(self):
@@ -78,7 +78,7 @@ class DlFreeFr(SimpleHoster):
if content_type and content_type.startswith("text/html"):
#: Undirect acces to requested file, with a web page providing it (captcha)
self.html = self.load(valid_url)
- self.handleFree(pyfile)
+ self.handle_free(pyfile)
else:
#: Direct access to requested file for users using free.fr as Internet Service Provider.
self.link = valid_url
@@ -92,10 +92,10 @@ class DlFreeFr(SimpleHoster):
self.fail(_("Invalid return code: ") + str(headers.get('code')))
- def handleFree(self, pyfile):
- action, inputs = self.parseHtmlForm('action="getfile.pl"')
+ def handle_free(self, pyfile):
+ action, inputs = self.parse_html_form('action="getfile.pl"')
self.load("http://dl.free.fr/getfile.pl", post=inputs)
- headers = self.getLastHeaders()
+ headers = self.get_last_headers()
if headers.get("code") == 302 and "set-cookie" in headers and "location" in headers:
m = re.search("(.*?)=(.*?); path=(.*?); domain=(.*)", headers.get("set-cookie"))
cj = CookieJar(__name__)
@@ -110,8 +110,8 @@ class DlFreeFr(SimpleHoster):
self.fail(_("Invalid response"))
- def getLastHeaders(self):
- #parse header
+ def get_last_headers(self):
+ # parse header
header = {"code": self.req.code}
for line in self.req.http.header.splitlines():
line = line.strip()
diff --git a/module/plugins/hoster/DodanePl.py b/module/plugins/hoster/DodanePl.py
index 46f748cc4..c0aeaafbe 100644
--- a/module/plugins/hoster/DodanePl.py
+++ b/module/plugins/hoster/DodanePl.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class DodanePl(DeadHoster):
__name__ = "DodanePl"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'http://(?:www\.)?dodane\.pl/file/\d+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/DropboxCom.py b/module/plugins/hoster/DropboxCom.py
index eec968f5a..9bc022515 100644
--- a/module/plugins/hoster/DropboxCom.py
+++ b/module/plugins/hoster/DropboxCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DropboxCom(SimpleHoster):
__name__ = "DropboxCom"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__pattern__ = r'https?://(?:www\.)?dropbox\.com/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -27,12 +27,12 @@ class DropboxCom(SimpleHoster):
def setup(self):
- self.multiDL = True
- self.chunkLimit = 1
- self.resumeDownload = True
+ self.multi_dl = True
+ self.chunk_limit = 1
+ self.resume_download = True
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.download(pyfile.url, get={'dl': "1"})
diff --git a/module/plugins/hoster/DuploadOrg.py b/module/plugins/hoster/DuploadOrg.py
index 076171544..57535c46a 100644
--- a/module/plugins/hoster/DuploadOrg.py
+++ b/module/plugins/hoster/DuploadOrg.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class DuploadOrg(DeadHoster):
__name__ = "DuploadOrg"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'http://(?:www\.)?dupload\.org/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/EasybytezCom.py b/module/plugins/hoster/EasybytezCom.py
index 693910c1b..5de267cde 100644
--- a/module/plugins/hoster/EasybytezCom.py
+++ b/module/plugins/hoster/EasybytezCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class EasybytezCom(XFSHoster):
__name__ = "EasybytezCom"
__type__ = "hoster"
- __version__ = "0.23"
+ __version__ = "0.24"
__pattern__ = r'http://(?:www\.)?easybytez\.com/\w{12}'
diff --git a/module/plugins/hoster/EdiskCz.py b/module/plugins/hoster/EdiskCz.py
index 96be21860..100c6d269 100644
--- a/module/plugins/hoster/EdiskCz.py
+++ b/module/plugins/hoster/EdiskCz.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class EdiskCz(SimpleHoster):
__name__ = "EdiskCz"
__type__ = "hoster"
- __version__ = "0.23"
+ __version__ = "0.24"
__pattern__ = r'http://(?:www\.)?edisk\.(cz|sk|eu)/(stahni|sk/stahni|en/download)/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -26,13 +26,13 @@ class EdiskCz(SimpleHoster):
def setup(self):
- self.multiDL = False
+ self.multi_dl = False
def process(self, pyfile):
url = re.sub("/(stahni|sk/stahni)/", "/en/download/", pyfile.url)
- self.logDebug("URL:" + url)
+ self.log_debug("URL:" + url)
m = re.search(self.ACTION_PATTERN, url)
if m is None:
diff --git a/module/plugins/hoster/EgoFilesCom.py b/module/plugins/hoster/EgoFilesCom.py
index 78108962f..3f081da41 100644
--- a/module/plugins/hoster/EgoFilesCom.py
+++ b/module/plugins/hoster/EgoFilesCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class EgoFilesCom(DeadHoster):
__name__ = "EgoFilesCom"
__type__ = "hoster"
- __version__ = "0.16"
+ __version__ = "0.17"
__pattern__ = r'https?://(?:www\.)?egofiles\.com/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/EnteruploadCom.py b/module/plugins/hoster/EnteruploadCom.py
index 8ef994e1e..46215f5a2 100644
--- a/module/plugins/hoster/EnteruploadCom.py
+++ b/module/plugins/hoster/EnteruploadCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class EnteruploadCom(DeadHoster):
__name__ = "EnteruploadCom"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'http://(?:www\.)?enterupload\.com/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/EpicShareNet.py b/module/plugins/hoster/EpicShareNet.py
index 7e3c8ba0e..91858ef3f 100644
--- a/module/plugins/hoster/EpicShareNet.py
+++ b/module/plugins/hoster/EpicShareNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class EpicShareNet(DeadHoster):
__name__ = "EpicShareNet"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'https?://(?:www\.)?epicshare\.net/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/EuroshareEu.py b/module/plugins/hoster/EuroshareEu.py
index deb138ec7..4401391a9 100644
--- a/module/plugins/hoster/EuroshareEu.py
+++ b/module/plugins/hoster/EuroshareEu.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class EuroshareEu(SimpleHoster):
__name__ = "EuroshareEu"
__type__ = "hoster"
- __version__ = "0.29"
+ __version__ = "0.30"
__pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|hu|pl)/file/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -29,25 +29,25 @@ class EuroshareEu(SimpleHoster):
URL_REPLACEMENTS = [(r"(http://[^/]*\.)(sk|cz|hu|pl)/", r"\1eu/")]
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
if self.ERROR_PATTERN in self.html:
self.account.relogin(self.user)
self.retry(reason=_("User not logged in"))
self.link = pyfile.url.rstrip('/') + "/download/"
- check = self.checkDownload({"login": re.compile(self.ERROR_PATTERN),
+ check = self.check_download({"login": re.compile(self.ERROR_PATTERN),
"json" : re.compile(r'\{"status":"error".*?"message":"(.*?)"')})
- if check == "login" or (check == "json" and self.lastCheck.group(1) == "Access token expired"):
+ if check == "login" or (check == "json" and self.last_check.group(1) == "Access token expired"):
self.account.relogin(self.user)
self.retry(reason=_("Access token expired"))
elif check == "json":
- self.fail(self.lastCheck.group(1))
+ self.fail(self.last_check.group(1))
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
if re.search(self.DL_LIMIT_PATTERN, self.html):
self.wait(5 * 60, 12, _("Download limit reached"))
diff --git a/module/plugins/hoster/ExashareCom.py b/module/plugins/hoster/ExashareCom.py
index d70ca6d3a..6c117f596 100644
--- a/module/plugins/hoster/ExashareCom.py
+++ b/module/plugins/hoster/ExashareCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class ExashareCom(XFSHoster):
__name__ = "ExashareCom"
__type__ = "hoster"
- __version__ = "0.01"
+ __version__ = "0.02"
__pattern__ = r'http://(?:www\.)?exashare\.com/\w{12}'
@@ -21,12 +21,12 @@ class ExashareCom(XFSHoster):
def setup(self):
- self.multiDL = True
- self.chunkLimit = 1
- self.resumeDownload = self.premium
+ self.multi_dl = True
+ self.chunk_limit = 1
+ self.resume_download = self.premium
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m is None:
self.error(_("Free download link not found"))
diff --git a/module/plugins/hoster/ExtabitCom.py b/module/plugins/hoster/ExtabitCom.py
index ead2e1e53..c2ae32099 100644
--- a/module/plugins/hoster/ExtabitCom.py
+++ b/module/plugins/hoster/ExtabitCom.py
@@ -5,13 +5,13 @@ import re
from module.common.json_layer import json_loads
from module.plugins.internal.ReCaptcha import ReCaptcha
-from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, secondsToMidnight
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, seconds_to_midnight
class ExtabitCom(SimpleHoster):
__name__ = "ExtabitCom"
__type__ = "hoster"
- __version__ = "0.66"
+ __version__ = "0.67"
__pattern__ = r'http://(?:www\.)?extabit\.com/(file|go|fid)/(?P<ID>\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -29,7 +29,7 @@ class ExtabitCom(SimpleHoster):
LINK_FREE_PATTERN = r'[\'"](http://guest\d+\.extabit\.com/\w+/.*?)[\'"]'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
if r">Only premium users can download this file" in self.html:
self.fail(_("Only premium users can download this file"))
@@ -37,10 +37,10 @@ class ExtabitCom(SimpleHoster):
if m:
self.wait(int(m.group(1)) * 60, True)
elif "The daily downloads limit from your IP is exceeded" in self.html:
- self.logWarning(_("You have reached your daily downloads limit for today"))
- self.wait(secondsToMidnight(gmt=2), True)
+ self.log_warning(_("You have reached your daily downloads limit for today"))
+ self.wait(seconds_to_midnight(gmt=2), True)
- self.logDebug("URL: " + self.req.http.lastEffectiveURL)
+ self.log_debug("URL: " + self.req.http.lastEffectiveURL)
m = re.match(self.__pattern__, self.req.http.lastEffectiveURL)
fileID = m.group('ID') if m else self.info['pattern']['ID']
@@ -54,10 +54,10 @@ class ExtabitCom(SimpleHoster):
get_data['capture'], get_data['challenge'] = recaptcha.challenge(captcha_key)
res = json_loads(self.load("http://extabit.com/file/%s/" % fileID, get=get_data))
if "ok" in res:
- self.correctCaptcha()
+ self.correct_captcha()
break
else:
- self.invalidCaptcha()
+ self.invalid_captcha()
else:
self.fail(_("Invalid captcha"))
else:
diff --git a/module/plugins/hoster/FastixRu.py b/module/plugins/hoster/FastixRu.py
index 468bcc8af..4e6b2e236 100644
--- a/module/plugins/hoster/FastixRu.py
+++ b/module/plugins/hoster/FastixRu.py
@@ -10,7 +10,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class FastixRu(MultiHoster):
__name__ = "FastixRu"
__type__ = "hoster"
- __version__ = "0.12"
+ __version__ = "0.13"
__pattern__ = r'http://(?:www\.)?fastix\.(ru|it)/file/\w{24}'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -22,10 +22,10 @@ class FastixRu(MultiHoster):
def setup(self):
- self.chunkLimit = 3
+ self.chunk_limit = 3
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
api_key = self.account.getAccountData(self.user)
api_key = api_key['api']
@@ -34,7 +34,7 @@ class FastixRu(MultiHoster):
data = json_loads(self.html)
- self.logDebug("Json data", data)
+ self.log_debug("Json data", data)
if "error\":true" in self.html:
self.offline()
diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py
index e56a05d37..1ed3213ff 100644
--- a/module/plugins/hoster/FastshareCz.py
+++ b/module/plugins/hoster/FastshareCz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FastshareCz(SimpleHoster):
__name__ = "FastshareCz"
__type__ = "hoster"
- __version__ = "0.30"
+ __version__ = "0.31"
__pattern__ = r'http://(?:www\.)?fastshare\.cz/\d+/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -33,20 +33,20 @@ class FastshareCz(SimpleHoster):
CREDIT_ERROR = " credit for "
- def checkErrors(self):
+ def check_errors(self):
if self.SLOT_ERROR in self.html:
errmsg = self.info['error'] = _("No free slots")
self.retry(12, 60, errmsg)
if self.CREDIT_ERROR in self.html:
errmsg = self.info['error'] = _("Not enough traffic left")
- self.logWarning(errmsg)
- self.resetAccount()
+ self.log_warning(errmsg)
+ self.reset_account()
self.info.pop('error', None)
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
m = re.search(self.FREE_URL_PATTERN, self.html)
if m:
action, captcha_src = m.groups()
@@ -54,12 +54,12 @@ class FastshareCz(SimpleHoster):
self.error(_("FREE_URL_PATTERN not found"))
baseurl = "http://www.fastshare.cz"
- captcha = self.decryptCaptcha(urlparse.urljoin(baseurl, captcha_src))
+ captcha = self.decrypt_captcha(urlparse.urljoin(baseurl, captcha_src))
self.download(urlparse.urljoin(baseurl, action), post={'code': captcha, 'btn.x': 77, 'btn.y': 18})
- def checkFile(self):
- check = self.checkDownload({
+ def check_file(self):
+ check = self.check_download({
'paralell-dl' : re.compile(r"<title>FastShare.cz</title>|<script>alert\('Pres FREE muzete stahovat jen jeden soubor najednou.'\)"),
'wrong captcha': re.compile(r'Download for FREE'),
'credit' : re.compile(self.CREDIT_ERROR)
@@ -72,7 +72,7 @@ class FastshareCz(SimpleHoster):
self.retry(max_tries=5, reason=_("Wrong captcha"))
elif check == "credit":
- self.resetAccount()
+ self.reset_account()
return super(FastshareCz, self).checkFile()
diff --git a/module/plugins/hoster/FileApeCom.py b/module/plugins/hoster/FileApeCom.py
index 79157539b..3dbbfc4e4 100644
--- a/module/plugins/hoster/FileApeCom.py
+++ b/module/plugins/hoster/FileApeCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FileApeCom(DeadHoster):
__name__ = "FileApeCom"
__type__ = "hoster"
- __version__ = "0.12"
+ __version__ = "0.13"
__pattern__ = r'http://(?:www\.)?fileape\.com/(index\.php\?act=download\&id=|dl/)\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/FileSharkPl.py b/module/plugins/hoster/FileSharkPl.py
index d01a34bad..595d0c7ed 100644
--- a/module/plugins/hoster/FileSharkPl.py
+++ b/module/plugins/hoster/FileSharkPl.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FileSharkPl(SimpleHoster):
__name__ = "FileSharkPl"
__type__ = "hoster"
- __version__ = "0.11"
+ __version__ = "0.12"
__pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -37,16 +37,16 @@ class FileSharkPl(SimpleHoster):
def setup(self):
- self.resumeDownload = True
+ self.resume_download = True
if self.premium:
- self.multiDL = True
- self.limitDL = 20
+ self.multi_dl = True
+ self.limit_dl = 20
else:
- self.multiDL = False
+ self.multi_dl = False
- def checkErrors(self):
+ def check_errors(self):
#: check if file is now available for download (-> file name can be found in html body)
m = re.search(self.WAIT_PATTERN, self.html)
if m:
@@ -62,7 +62,7 @@ class FileSharkPl(SimpleHoster):
elif re.match(self.SLOT_ERROR_PATTERN, alert):
errmsg = self.info['error'] = _("No free download slots available")
- self.logWarning(errmsg)
+ self.log_warning(errmsg)
self.retry(10, 30 * 60, _("Still no free download slots available"))
else:
@@ -72,7 +72,7 @@ class FileSharkPl(SimpleHoster):
self.info.pop('error', None)
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m is None:
self.error(_("Download url not found"))
@@ -84,10 +84,10 @@ class FileSharkPl(SimpleHoster):
m = re.search(self.WAIT_PATTERN, self.html)
if m:
seconds = int(m.group(1))
- self.logDebug("Wait %s seconds" % seconds)
+ self.log_debug("Wait %s seconds" % seconds)
self.wait(seconds)
- action, inputs = self.parseHtmlForm('action=""')
+ action, inputs = self.parse_html_form('action=""')
m = re.search(self.TOKEN_PATTERN, self.html)
if m is None:
@@ -102,7 +102,7 @@ class FileSharkPl(SimpleHoster):
tmp_load = self.load
self.load = self._decode64 #: work-around: injects decode64 inside decryptCaptcha
- inputs['form[captcha]'] = self.decryptCaptcha(m.group(1), imgtype='jpeg')
+ inputs['form[captcha]'] = self.decrypt_captcha(m.group(1), imgtype='jpeg')
inputs['form[start]'] = ""
self.load = tmp_load
diff --git a/module/plugins/hoster/FileStoreTo.py b/module/plugins/hoster/FileStoreTo.py
index 3262b73ad..e17e16f55 100644
--- a/module/plugins/hoster/FileStoreTo.py
+++ b/module/plugins/hoster/FileStoreTo.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FileStoreTo(SimpleHoster):
__name__ = "FileStoreTo"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'http://(?:www\.)?filestore\.to/\?d=(?P<ID>\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -25,11 +25,11 @@ class FileStoreTo(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
+ self.resume_download = True
+ self.multi_dl = True
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.wait(10)
self.link = self.load("http://filestore.to/ajax/download.php",
get={'D': re.search(r'"D=(\w+)', self.html).group(1)})
diff --git a/module/plugins/hoster/FilebeerInfo.py b/module/plugins/hoster/FilebeerInfo.py
index 244131dc7..adfb35454 100644
--- a/module/plugins/hoster/FilebeerInfo.py
+++ b/module/plugins/hoster/FilebeerInfo.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FilebeerInfo(DeadHoster):
__name__ = "FilebeerInfo"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'http://(?:www\.)?filebeer\.info/(?!\d*~f)(?P<ID>\w+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/FileboomMe.py b/module/plugins/hoster/FileboomMe.py
index 9cdeebe3d..717ce549d 100644
--- a/module/plugins/hoster/FileboomMe.py
+++ b/module/plugins/hoster/FileboomMe.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FileboomMe(SimpleHoster):
__name__ = "FileboomMe"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'https?://f(?:ile)?boom\.me/file/(?P<ID>\w+)'
@@ -30,12 +30,12 @@ class FileboomMe(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = False
- self.chunkLimit = 1
+ self.resume_download = True
+ self.multi_dl = False
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
post_url = urljoin(pyfile.url, "/file/" + self.info['pattern']['ID'])
m = re.search(r'data-slow-id="(\w+)"', self.html)
@@ -55,7 +55,7 @@ class FileboomMe(SimpleHoster):
m = re.search(self.CAPTCHA_PATTERN, self.html)
if m:
- captcha = self.decryptCaptcha(urljoin(pyfile.url, m.group(1)))
+ captcha = self.decrypt_captcha(urljoin(pyfile.url, m.group(1)))
self.html = self.load(post_url,
post={'CaptchaForm[code]' : captcha,
@@ -64,10 +64,10 @@ class FileboomMe(SimpleHoster):
'uniqueId' : uniqueId})
if 'The verification code is incorrect' in self.html:
- self.invalidCaptcha()
+ self.invalid_captcha()
else:
- self.checkErrors()
+ self.check_errors()
self.html = self.load(post_url,
post={'free' : 1,
@@ -78,7 +78,7 @@ class FileboomMe(SimpleHoster):
self.link = urljoin(pyfile.url, m.group(0))
else:
- self.invalidCaptcha()
+ self.invalid_captcha()
break
diff --git a/module/plugins/hoster/FilecloudIo.py b/module/plugins/hoster/FilecloudIo.py
index 346e9c444..d9013630d 100644
--- a/module/plugins/hoster/FilecloudIo.py
+++ b/module/plugins/hoster/FilecloudIo.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FilecloudIo(SimpleHoster):
__name__ = "FilecloudIo"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.10"
__pattern__ = r'http://(?:www\.)?(?:filecloud\.io|ifile\.it|mihd\.net)/(?P<ID>\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -39,12 +39,12 @@ class FilecloudIo(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
- self.chunkLimit = 1
+ self.resume_download = True
+ self.multi_dl = True
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
data = {"ukey": self.info['pattern']['ID']}
m = re.search(self.AB1_PATTERN, self.html)
@@ -68,13 +68,13 @@ class FilecloudIo(SimpleHoster):
json_url = "http://filecloud.io/download-request.json"
res = self.load(json_url, post=data)
- self.logDebug(res)
+ self.log_debug(res)
res = json_loads(res)
if "error" in res and res['error']:
self.fail(res)
- self.logDebug(res)
+ self.log_debug(res)
if res['captcha']:
data['ctype'] = "recaptcha"
@@ -83,13 +83,13 @@ class FilecloudIo(SimpleHoster):
json_url = "http://filecloud.io/download-request.json"
res = self.load(json_url, post=data)
- self.logDebug(res)
+ self.log_debug(res)
res = json_loads(res)
if "retry" in res and res['retry']:
- self.invalidCaptcha()
+ self.invalid_captcha()
else:
- self.correctCaptcha()
+ self.correct_captcha()
break
else:
self.fail(_("Incorrect captcha"))
@@ -109,13 +109,13 @@ class FilecloudIo(SimpleHoster):
self.fail(_("Unexpected server response"))
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
akey = self.account.getAccountData(self.user)['akey']
ukey = self.info['pattern']['ID']
- self.logDebug("Akey: %s | Ukey: %s" % (akey, ukey))
+ self.log_debug("Akey: %s | Ukey: %s" % (akey, ukey))
rep = self.load("http://api.filecloud.io/api-fetch_download_url.api",
post={"akey": akey, "ukey": ukey})
- self.logDebug("FetchDownloadUrl: " + rep)
+ self.log_debug("FetchDownloadUrl: " + rep)
rep = json_loads(rep)
if rep['status'] == 'ok':
self.link = rep['download_url']
diff --git a/module/plugins/hoster/FiledropperCom.py b/module/plugins/hoster/FiledropperCom.py
index 73bab2d64..b4b94ff87 100644
--- a/module/plugins/hoster/FiledropperCom.py
+++ b/module/plugins/hoster/FiledropperCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FiledropperCom(SimpleHoster):
__name__ = "FiledropperCom"
__type__ = "hoster"
- __version__ = "0.01"
+ __version__ = "0.02"
__pattern__ = r'https?://(?:www\.)?filedropper\.com/\w+'
@@ -24,16 +24,16 @@ class FiledropperCom(SimpleHoster):
def setup(self):
- self.multiDL = False
- self.chunkLimit = 1
+ self.multi_dl = False
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
m = re.search(r'img id="img" src="(.+?)"', self.html)
if m is None:
self.fail("Captcha not found")
- captcha_code = self.decryptCaptcha("http://www.filedropper.com/%s" % m.group(1))
+ captcha_code = self.decrypt_captcha("http://www.filedropper.com/%s" % m.group(1))
m = re.search(r'method="post" action="(.+?)"', self.html)
if m is None:
diff --git a/module/plugins/hoster/FilefactoryCom.py b/module/plugins/hoster/FilefactoryCom.py
index 3aa9dc2a9..8d7409824 100644
--- a/module/plugins/hoster/FilefactoryCom.py
+++ b/module/plugins/hoster/FilefactoryCom.py
@@ -7,7 +7,7 @@ from module.network.RequestFactory import getURL
from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo
-def getInfo(urls):
+def get_info(urls):
for url in urls:
h = getURL(url, just_header=True)
m = re.search(r'Location: (.+)\r\n', h)
@@ -20,7 +20,7 @@ def getInfo(urls):
class FilefactoryCom(SimpleHoster):
__name__ = "FilefactoryCom"
__type__ = "hoster"
- __version__ = "0.56"
+ __version__ = "0.57"
__pattern__ = r'https?://(?:www\.)?filefactory\.com/(file|trafficshare/\w+)/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -42,7 +42,7 @@ class FilefactoryCom(SimpleHoster):
COOKIES = [("filefactory.com", "locale", "en_US.utf8")]
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
if "Currently only Premium Members can download files larger than" in self.html:
self.fail(_("File too large for free download"))
elif "All free download slots on this server are currently in use" in self.html:
@@ -59,12 +59,12 @@ class FilefactoryCom(SimpleHoster):
self.wait(m.group(1))
- def checkFile(self):
- check = self.checkDownload({'multiple': "You are currently downloading too many files at once.",
+ def check_file(self):
+ check = self.check_download({'multiple': "You are currently downloading too many files at once.",
'error' : '<div id="errorMessage">'})
if check == "multiple":
- self.logDebug("Parallel downloads detected; waiting 15 minutes")
+ self.log_debug("Parallel downloads detected; waiting 15 minutes")
self.retry(wait_time=15 * 60, reason=_("Parallel downloads"))
elif check == "error":
@@ -73,8 +73,8 @@ class FilefactoryCom(SimpleHoster):
return super(FilefactoryCom, self).checkFile()
- def handlePremium(self, pyfile):
- self.link = self.directLink(self.load(pyfile.url, just_header=True))
+ def handle_premium(self, pyfile):
+ self.link = self.direct_link(self.load(pyfile.url, just_header=True))
if not self.link:
html = self.load(pyfile.url)
diff --git a/module/plugins/hoster/FilejungleCom.py b/module/plugins/hoster/FilejungleCom.py
index 68f578096..e29ad1fbd 100644
--- a/module/plugins/hoster/FilejungleCom.py
+++ b/module/plugins/hoster/FilejungleCom.py
@@ -7,7 +7,7 @@ from module.plugins.internal.Plugin import chunks
class FilejungleCom(FileserveCom):
__name__ = "FilejungleCom"
__type__ = "hoster"
- __version__ = "0.52"
+ __version__ = "0.53"
__pattern__ = r'http://(?:www\.)?filejungle\.com/f/(?P<ID>[^/]+)'
@@ -24,6 +24,6 @@ class FilejungleCom(FileserveCom):
LONG_WAIT_PATTERN = r'<h1>Please wait for (\d+) (\w+)\s*to download the next file\.</h1>'
-def getInfo(urls):
+def get_info(urls):
for chunk in chunks(urls, 100):
yield checkFile(FilejungleCom, chunk)
diff --git a/module/plugins/hoster/FileomCom.py b/module/plugins/hoster/FileomCom.py
index 306953b84..df7fc0aeb 100644
--- a/module/plugins/hoster/FileomCom.py
+++ b/module/plugins/hoster/FileomCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class FileomCom(XFSHoster):
__name__ = "FileomCom"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'https?://(?:www\.)?fileom\.com/\w{12}'
@@ -25,9 +25,9 @@ class FileomCom(XFSHoster):
def setup(self):
- self.multiDL = True
- self.chunkLimit = 1
- self.resumeDownload = self.premium
+ self.multi_dl = True
+ self.chunk_limit = 1
+ self.resume_download = self.premium
getInfo = create_getInfo(FileomCom)
diff --git a/module/plugins/hoster/FilepostCom.py b/module/plugins/hoster/FilepostCom.py
index b2891a9e8..30ea6a869 100644
--- a/module/plugins/hoster/FilepostCom.py
+++ b/module/plugins/hoster/FilepostCom.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FilepostCom(SimpleHoster):
__name__ = "FilepostCom"
__type__ = "hoster"
- __version__ = "0.34"
+ __version__ = "0.35"
__pattern__ = r'https?://(?:www\.)?(?:filepost\.com/files|fp\.io)/(?P<ID>[^/]+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -29,7 +29,7 @@ class FilepostCom(SimpleHoster):
FLP_TOKEN_PATTERN = r'set_store_options\({token: \'(.+?)\''
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
m = re.search(self.FLP_TOKEN_PATTERN, self.html)
if m is None:
self.error(_("Token"))
@@ -43,7 +43,7 @@ class FilepostCom(SimpleHoster):
#: Get wait time
get_dict = {'SID': self.req.cj.getCookie('SID'), 'JsHttpRequest': str(int(time.time() * 10000)) + '-xml'}
post_dict = {'action': 'set_download', 'token': flp_token, 'code': self.info['pattern']['ID']}
- wait_time = int(self.getJsonResponse(get_dict, post_dict, 'wait_time'))
+ wait_time = int(self.get_json_response(get_dict, post_dict, 'wait_time'))
if wait_time > 0:
self.wait(wait_time)
@@ -52,15 +52,15 @@ class FilepostCom(SimpleHoster):
if 'var is_pass_exists = true;' in self.html:
#: Solve password
- password = self.getPassword()
+ password = self.get_password()
if password:
- self.logInfo(_("Password protected link, trying ") + file_pass)
+ self.log_info(_("Password protected link, trying ") + file_pass)
get_dict['JsHttpRequest'] = str(int(time.time() * 10000)) + '-xml'
post_dict['file_pass'] = file_pass
- self.link = self.getJsonResponse(get_dict, post_dict, 'link')
+ self.link = self.get_json_response(get_dict, post_dict, 'link')
if not self.link:
self.fail(_("Incorrect password"))
@@ -76,19 +76,19 @@ class FilepostCom(SimpleHoster):
if i:
post_dict['recaptcha_response_field'], post_dict['recaptcha_challenge_field'] = recaptcha.challenge(
captcha_key)
- self.logDebug(u"RECAPTCHA: %s : %s : %s" % (
+ self.log_debug(u"RECAPTCHA: %s : %s : %s" % (
captcha_key, post_dict['recaptcha_challenge_field'], post_dict['recaptcha_response_field']))
- self.link = self.getJsonResponse(get_dict, post_dict, 'link')
+ self.link = self.get_json_response(get_dict, post_dict, 'link')
else:
self.fail(_("Invalid captcha"))
- def getJsonResponse(self, get_dict, post_dict, field):
+ def get_json_response(self, get_dict, post_dict, field):
res = json_loads(self.load('https://filepost.com/files/get/', get=get_dict, post=post_dict))
- self.logDebug(res)
+ self.log_debug(res)
if not 'js' in res:
self.error(_("JSON %s 1") % field)
@@ -109,7 +109,7 @@ class FilepostCom(SimpleHoster):
return None
elif 'CAPTCHA' in res['js']['error']:
- self.logDebug("Error response is unknown, but mentions CAPTCHA")
+ self.log_debug("Error response is unknown, but mentions CAPTCHA")
return None
else:
diff --git a/module/plugins/hoster/FilepupNet.py b/module/plugins/hoster/FilepupNet.py
index 874fde3c8..439f9f8f8 100644
--- a/module/plugins/hoster/FilepupNet.py
+++ b/module/plugins/hoster/FilepupNet.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FilepupNet(SimpleHoster):
__name__ = "FilepupNet"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'http://(?:www\.)?filepup\.net/files/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -32,11 +32,11 @@ class FilepupNet(SimpleHoster):
def setup(self):
- self.multiDL = False
- self.chunkLimit = 1
+ self.multi_dl = False
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m is None:
self.error(_("Download link not found"))
diff --git a/module/plugins/hoster/FilerNet.py b/module/plugins/hoster/FilerNet.py
index ecf656926..1912f06dc 100644
--- a/module/plugins/hoster/FilerNet.py
+++ b/module/plugins/hoster/FilerNet.py
@@ -15,7 +15,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FilerNet(SimpleHoster):
__name__ = "FilerNet"
__type__ = "hoster"
- __version__ = "0.20"
+ __version__ = "0.21"
__pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -34,14 +34,14 @@ class FilerNet(SimpleHoster):
LINK_FREE_PATTERN = LINK_PREMIUM_PATTERN = r'href="([^"]+)">Get download</a>'
- def handleFree(self, pyfile):
- inputs = self.parseHtmlForm(input_names={'token': re.compile(r'.+')})[1]
+ def handle_free(self, pyfile):
+ inputs = self.parse_html_form(input_names={'token': re.compile(r'.+')})[1]
if 'token' not in inputs:
self.error(_("Unable to detect token"))
self.html = self.load(pyfile.url, post={'token': inputs['token']})
- inputs = self.parseHtmlForm(input_names={'hash': re.compile(r'.+')})[1]
+ inputs = self.parse_html_form(input_names={'hash': re.compile(r'.+')})[1]
if 'hash' not in inputs:
self.error(_("Unable to detect hash"))
@@ -58,9 +58,9 @@ class FilerNet(SimpleHoster):
if 'location' in self.req.http.header.lower():
self.link = re.search(r'location: (\S+)', self.req.http.header, re.I).group(1)
- self.correctCaptcha()
+ self.correct_captcha()
else:
- self.invalidCaptcha()
+ self.invalid_captcha()
getInfo = create_getInfo(FilerNet)
diff --git a/module/plugins/hoster/FilerioCom.py b/module/plugins/hoster/FilerioCom.py
index c6ebbd444..948a46f31 100644
--- a/module/plugins/hoster/FilerioCom.py
+++ b/module/plugins/hoster/FilerioCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class FilerioCom(XFSHoster):
__name__ = "FilerioCom"
__type__ = "hoster"
- __version__ = "0.07"
+ __version__ = "0.08"
__pattern__ = r'http://(?:www\.)?(filerio\.(in|com)|filekeen\.com)/\w{12}'
diff --git a/module/plugins/hoster/FilesMailRu.py b/module/plugins/hoster/FilesMailRu.py
index f93281702..71ef231b1 100644
--- a/module/plugins/hoster/FilesMailRu.py
+++ b/module/plugins/hoster/FilesMailRu.py
@@ -7,7 +7,7 @@ from module.plugins.internal.Hoster import Hoster
from module.plugins.internal.Plugin import chunks
-def getInfo(urls):
+def get_info(urls):
result = []
for chunk in chunks(urls, 10):
for url in chunk:
@@ -32,7 +32,7 @@ def getInfo(urls):
class FilesMailRu(Hoster):
__name__ = "FilesMailRu"
__type__ = "hoster"
- __version__ = "0.33"
+ __version__ = "0.34"
__pattern__ = r'http://(?:www\.)?files\.mail\.ru/.+'
@@ -42,57 +42,57 @@ class FilesMailRu(Hoster):
def setup(self):
- self.multiDL = bool(self.account)
+ self.multi_dl = bool(self.account)
def process(self, pyfile):
self.html = self.load(pyfile.url)
self.url_pattern = '<a href="(.+?)" onclick="return Act\(this\, \'dlink\'\, event\)">(.+?)</a>'
- #marks the file as "offline" when the pattern was found on the html-page'''
+ # marks the file as "offline" when the pattern was found on the html-page'''
if r'<div class="errorMessage mb10">' in self.html:
self.offline()
elif r'Page cannot be displayed' in self.html:
self.offline()
- #the filename that will be showed in the list (e.g. test.part1.rar)'''
- pyfile.name = self.getFileName()
+ # the filename that will be showed in the list (e.g. test.part1.rar)'''
+ pyfile.name = self.get_file_name()
- #prepare and download'''
+ # prepare and download'''
if not self.account:
self.prepare()
- self.download(self.getFileUrl())
- self.myPostProcess()
+ self.download(self.get_file_url())
+ self.my_post_process()
else:
- self.download(self.getFileUrl())
- self.myPostProcess()
+ self.download(self.get_file_url())
+ self.my_post_process()
def prepare(self):
"""
You have to wait some seconds. Otherwise you will get a 40Byte HTML Page instead of the file you expected
"""
- self.setWait(10)
+ self.set_wait(10)
self.wait()
return True
- def getFileUrl(self):
+ def get_file_url(self):
"""
Gives you the URL to the file. Extracted from the Files.mail.ru HTML-page stored in self.html
"""
return re.search(self.url_pattern, self.html).group(0).split('<a href="')[1].split('" onclick="return Act')[0]
- def getFileName(self):
+ def get_file_name(self):
"""
Gives you the Name for each file. Also extracted from the HTML-Page
"""
return re.search(self.url_pattern, self.html).group(0).split(', event)">')[1].split('</a>')[0]
- def myPostProcess(self):
+ def my_post_process(self):
#: searches the file for HTMl-Code. Sometimes the Redirect
#: doesn't work (maybe a curl Problem) and you get only a small
#: HTML file and the Download is marked as "finished"
@@ -103,9 +103,9 @@ class FilesMailRu(Hoster):
#: so i set it to check every download because sometimes there are downloads
#: that contain the HTML-Text and 60MB ZEROs after that in a xyzfile.part1.rar file
#: (Loading 100MB in to ram is not an option)
- check = self.checkDownload({"html": "<meta name="}, read_size=50000)
+ check = self.check_download({"html": "<meta name="}, read_size=50000)
if check == "html":
- self.logInfo(_(
+ self.log_info(_(
"There was HTML Code in the Downloaded File (%s)...redirect error? The Download will be restarted." %
self.pyfile.name))
self.retry()
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index 71cdb1fae..8ba963588 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -7,11 +7,11 @@ from module.network.RequestFactory import getURL
from module.plugins.internal.Hoster import Hoster
from module.plugins.internal.Plugin import chunks
from module.plugins.internal.ReCaptcha import ReCaptcha
-from module.plugins.internal.SimpleHoster import secondsToMidnight
+from module.plugins.internal.SimpleHoster import seconds_to_midnight
from module.utils import parseFileSize
-def checkFile(plugin, urls):
+def check_file(plugin, urls):
html = getURL(plugin.URLS[1], post={"urls": "\n".join(urls)})
file_info = []
@@ -33,7 +33,7 @@ def checkFile(plugin, urls):
class FileserveCom(Hoster):
__name__ = "FileserveCom"
__type__ = "hoster"
- __version__ = "0.56"
+ __version__ = "0.57"
__pattern__ = r'http://(?:www\.)?fileserve\.com/file/(?P<ID>[^/]+)'
@@ -60,39 +60,39 @@ class FileserveCom(Hoster):
def setup(self):
- self.resumeDownload = self.multiDL = self.premium
+ self.resume_download = self.multi_dl = self.premium
self.file_id = re.match(self.__pattern__, self.pyfile.url).group('ID')
self.url = "%s%s" % (self.URLS[0], self.file_id)
- self.logDebug("File ID: %s URL: %s" % (self.file_id, self.url))
+ self.log_debug("File ID: %s URL: %s" % (self.file_id, self.url))
def process(self, pyfile):
pyfile.name, pyfile.size, status, self.url = checkFile(self, [self.url])[0]
if status != 2:
self.offline()
- self.logDebug("File Name: %s Size: %d" % (pyfile.name, pyfile.size))
+ self.log_debug("File Name: %s Size: %d" % (pyfile.name, pyfile.size))
if self.premium:
- self.handlePremium()
+ self.handle_premium()
else:
- self.handleFree()
+ self.handle_free()
- def handleFree(self):
+ def handle_free(self):
self.html = self.load(self.url)
action = self.load(self.url, post={"checkDownload": "check"})
action = json_loads(action)
- self.logDebug(action)
+ self.log_debug(action)
if "fail" in action:
if action['fail'] == "timeLimit":
self.html = self.load(self.url, post={"checkDownload": "showError", "errorType": "timeLimit"})
- self.doLongWait(re.search(self.LONG_WAIT_PATTERN, self.html))
+ self.do_long_wait(re.search(self.LONG_WAIT_PATTERN, self.html))
elif action['fail'] == "parallelDownload":
- self.logWarning(_("Parallel download error, now waiting 60s"))
+ self.log_warning(_("Parallel download error, now waiting 60s"))
self.retry(wait_time=60, reason=_("parallelDownload"))
else:
@@ -100,47 +100,47 @@ class FileserveCom(Hoster):
elif "success" in action:
if action['success'] == "showCaptcha":
- self.doCaptcha()
- self.doTimmer()
+ self.do_captcha()
+ self.do_timmer()
elif action['success'] == "showTimmer":
- self.doTimmer()
+ self.do_timmer()
else:
self.error(_("Unknown server response"))
#: show download link
res = self.load(self.url, post={"downloadLink": "show"})
- self.logDebug("Show downloadLink response: %s" % res)
+ self.log_debug("Show downloadLink response: %s" % res)
if "fail" in res:
self.error(_("Couldn't retrieve download url"))
#: this may either download our file or forward us to an error page
self.download(self.url, post={"download": "normal"})
- self.logDebug(self.req.http.lastEffectiveURL)
+ self.log_debug(self.req.http.lastEffectiveURL)
- check = self.checkDownload({"expired": self.LINK_EXPIRED_PATTERN,
+ check = self.check_download({"expired": self.LINK_EXPIRED_PATTERN,
"wait" : re.compile(self.LONG_WAIT_PATTERN),
"limit" : self.DL_LIMIT_PATTERN})
if check == "expired":
- self.logDebug("Download link was expired")
+ self.log_debug("Download link was expired")
self.retry()
elif check == "wait":
- self.doLongWait(self.lastCheck)
+ self.do_long_wait(self.last_check)
elif check == "limit":
- self.logWarning(_("Download limited reached for today"))
- self.setWait(secondsToMidnight(gmt=2), True)
+ self.log_warning(_("Download limited reached for today"))
+ self.set_wait(seconds_to_midnight(gmt=2), True)
self.wait()
self.retry()
self.thread.m.reconnecting.wait(3) #: Ease issue with later downloads appearing to be in parallel
- def doTimmer(self):
+ def do_timmer(self):
res = self.load(self.url, post={"downloadLink": "wait"})
- self.logDebug("Wait response: %s" % res[:80])
+ self.log_debug("Wait response: %s" % res[:80])
if "fail" in res:
self.fail(_("Failed getting wait time"))
@@ -153,11 +153,11 @@ class FileserveCom(Hoster):
else:
wait_time = int(res) + 3
- self.setWait(wait_time)
+ self.set_wait(wait_time)
self.wait()
- def doCaptcha(self):
+ def do_captcha(self):
captcha_key = re.search(self.CAPTCHA_KEY_PATTERN, self.html).group(1)
recaptcha = ReCaptcha(self)
@@ -168,25 +168,25 @@ class FileserveCom(Hoster):
'recaptcha_response_field' : response,
'recaptcha_shortencode_field': self.file_id}))
if not res['success']:
- self.invalidCaptcha()
+ self.invalid_captcha()
else:
- self.correctCaptcha()
+ self.correct_captcha()
break
else:
self.fail(_("Invalid captcha"))
- def doLongWait(self, m):
+ def do_long_wait(self, m):
wait_time = (int(m.group(1)) * {'seconds': 1, 'minutes': 60, 'hours': 3600}[m.group(2)]) if m else 12 * 60
- self.setWait(wait_time, True)
+ self.set_wait(wait_time, True)
self.wait()
self.retry()
- def handlePremium(self):
+ def handle_premium(self):
premium_url = None
if self.__name__ == "FileserveCom":
- #try api download
+ # try api download
res = self.load("http://app.fileserve.com/api/download/premium/",
post={"username": self.user,
"password": self.account.getAccountData(self.user)['password'],
@@ -196,21 +196,21 @@ class FileserveCom(Hoster):
if res['error_code'] == "302":
premium_url = res['next']
elif res['error_code'] in ["305", "500"]:
- self.tempOffline()
+ self.temp_offline()
elif res['error_code'] in ["403", "605"]:
- self.resetAccount()
+ self.reset_account()
elif res['error_code'] in ["606", "607", "608"]:
self.offline()
else:
- self.logError(res['error_code'], res['error_message'])
+ self.log_error(res['error_code'], res['error_message'])
self.download(premium_url or self.pyfile.url)
- if not premium_url and self.checkDownload({"login": re.compile(self.NOT_LOGGED_IN_PATTERN)}):
+ if not premium_url and self.check_download({"login": re.compile(self.NOT_LOGGED_IN_PATTERN)}):
self.account.relogin(self.user)
self.retry(reason=_("Not logged in"))
-def getInfo(urls):
+def get_info(urls):
for chunk in chunks(urls, 100):
yield checkFile(FileserveCom, chunk)
diff --git a/module/plugins/hoster/FileshareInUa.py b/module/plugins/hoster/FileshareInUa.py
index aa1785f19..baeffa735 100644
--- a/module/plugins/hoster/FileshareInUa.py
+++ b/module/plugins/hoster/FileshareInUa.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FileshareInUa(DeadHoster):
__name__ = "FileshareInUa"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'https?://(?:www\.)?fileshare\.in\.ua/\w{7}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/FilesonicCom.py b/module/plugins/hoster/FilesonicCom.py
index 5254a6f9b..2d825f77e 100644
--- a/module/plugins/hoster/FilesonicCom.py
+++ b/module/plugins/hoster/FilesonicCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FilesonicCom(DeadHoster):
__name__ = "FilesonicCom"
__type__ = "hoster"
- __version__ = "0.35"
+ __version__ = "0.36"
__pattern__ = r'http://(?:www\.)?filesonic\.com/file/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/FileuploadNet.py b/module/plugins/hoster/FileuploadNet.py
index 0f2875318..acddc4c0a 100644
--- a/module/plugins/hoster/FileuploadNet.py
+++ b/module/plugins/hoster/FileuploadNet.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FileuploadNet(SimpleHoster):
__name__ = "FileuploadNet"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'https?://(?:www\.)?(en\.)?file-upload\.net/download-\d+/.+'
@@ -25,8 +25,8 @@ class FileuploadNet(SimpleHoster):
def setup(self):
- self.multiDL = True
- self.chunkLimit = 1
+ self.multi_dl = True
+ self.chunk_limit = 1
getInfo = create_getInfo(FileuploadNet)
diff --git a/module/plugins/hoster/FilezyNet.py b/module/plugins/hoster/FilezyNet.py
index 9f442c846..9df311ecf 100644
--- a/module/plugins/hoster/FilezyNet.py
+++ b/module/plugins/hoster/FilezyNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FilezyNet(DeadHoster):
__name__ = "FilezyNet"
__type__ = "hoster"
- __version__ = "0.20"
+ __version__ = "0.21"
__pattern__ = r'http://(?:www\.)?filezy\.net/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/FiredriveCom.py b/module/plugins/hoster/FiredriveCom.py
index 8faee5b52..57752b341 100644
--- a/module/plugins/hoster/FiredriveCom.py
+++ b/module/plugins/hoster/FiredriveCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FiredriveCom(DeadHoster):
__name__ = "FiredriveCom"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'https?://(?:www\.)?(firedrive|putlocker)\.com/(mobile/)?(file|embed)/(?P<ID>\w+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/FlyFilesNet.py b/module/plugins/hoster/FlyFilesNet.py
index fb57baffd..63cabda66 100644
--- a/module/plugins/hoster/FlyFilesNet.py
+++ b/module/plugins/hoster/FlyFilesNet.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster
class FlyFilesNet(SimpleHoster):
__name__ = "FlyFilesNet"
__type__ = "hoster"
- __version__ = "0.10"
+ __version__ = "0.11"
__pattern__ = r'http://(?:www\.)?flyfiles\.net/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -33,10 +33,10 @@ class FlyFilesNet(SimpleHoster):
#: get download URL
parsed_url = getURL(url, post={"getDownLink": session})
- self.logDebug("Parsed URL: %s" % parsed_url)
+ self.log_debug("Parsed URL: %s" % parsed_url)
if parsed_url == '#downlink|' or parsed_url == "#downlink|#":
- self.logWarning(_("Could not get the download URL. Please wait 10 minutes"))
+ self.log_warning(_("Could not get the download URL. Please wait 10 minutes"))
self.wait(10 * 60, True)
self.retry()
diff --git a/module/plugins/hoster/FourSharedCom.py b/module/plugins/hoster/FourSharedCom.py
index 79eb1fb83..52f311550 100644
--- a/module/plugins/hoster/FourSharedCom.py
+++ b/module/plugins/hoster/FourSharedCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FourSharedCom(SimpleHoster):
__name__ = "FourSharedCom"
__type__ = "hoster"
- __version__ = "0.31"
+ __version__ = "0.32"
__pattern__ = r'https?://(?:www\.)?4shared(\-china)?\.com/(account/)?(download|get|file|document|photo|video|audio|mp3|office|rar|zip|archive|music)/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -35,7 +35,7 @@ class FourSharedCom(SimpleHoster):
ID_PATTERN = r'name="d3fid" value="(.*?)"'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
m = re.search(self.LINK_BTN_PATTERN, self.html)
if m:
link = m.group(1)
@@ -53,7 +53,7 @@ class FourSharedCom(SimpleHoster):
try:
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)
+ self.log_debug(res)
except Exception:
pass
diff --git a/module/plugins/hoster/FreakshareCom.py b/module/plugins/hoster/FreakshareCom.py
index f8e72e62f..86dc45585 100644
--- a/module/plugins/hoster/FreakshareCom.py
+++ b/module/plugins/hoster/FreakshareCom.py
@@ -4,13 +4,13 @@ import re
from module.plugins.internal.Hoster import Hoster
from module.plugins.internal.ReCaptcha import ReCaptcha
-from module.plugins.internal.SimpleHoster import secondsToMidnight
+from module.plugins.internal.SimpleHoster import seconds_to_midnight
class FreakshareCom(Hoster):
__name__ = "FreakshareCom"
__type__ = "hoster"
- __version__ = "0.42"
+ __version__ = "0.43"
__pattern__ = r'http://(?:www\.)?freakshare\.(net|com)/files/\S*?/'
@@ -23,7 +23,7 @@ class FreakshareCom(Hoster):
def setup(self):
- self.multiDL = False
+ self.multi_dl = False
self.req_opts = []
@@ -43,7 +43,7 @@ class FreakshareCom(Hoster):
self.download(pyfile.url, post=self.req_opts)
- check = self.checkDownload({"bad" : "bad try",
+ check = self.check_download({"bad" : "bad try",
"paralell" : "> Sorry, you cant download more then 1 files at time. <",
"empty" : "Warning: Unknown: Filename cannot be empty",
"wrong_captcha" : "Wrong Captcha!",
@@ -53,7 +53,7 @@ class FreakshareCom(Hoster):
self.fail(_("Bad Try"))
elif check == "paralell":
- self.setWait(300, True)
+ self.set_wait(300, True)
self.wait()
self.retry()
@@ -61,7 +61,7 @@ class FreakshareCom(Hoster):
self.fail(_("File not downloadable"))
elif check == "wrong_captcha":
- self.invalidCaptcha()
+ self.invalid_captcha()
self.retry()
elif check == "downloadserver":
@@ -76,7 +76,7 @@ class FreakshareCom(Hoster):
if not self.file_exists():
self.offline()
- self.setWait(self.get_waiting_time())
+ self.set_wait(self.get_waiting_time())
pyfile.name = self.get_file_name()
pyfile.size = self.get_file_size()
@@ -97,10 +97,10 @@ class FreakshareCom(Hoster):
"""
if not self.html:
self.download_html()
- if not self.wantReconnect:
+ if not self.want_reconnect:
self.req_opts = self.get_download_options() #: get the Post options for the Request
- #file_url = self.pyfile.url
- #return file_url
+ # file_url = self.pyfile.url
+ # return file_url
else:
self.offline()
@@ -109,7 +109,7 @@ class FreakshareCom(Hoster):
if not self.html:
self.download_html()
- if not self.wantReconnect:
+ if not self.want_reconnect:
m = re.search(r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">([^ ]+)", self.html)
if m:
file_name = m.group(1)
@@ -126,7 +126,7 @@ class FreakshareCom(Hoster):
if not self.html:
self.download_html()
- if not self.wantReconnect:
+ if not self.want_reconnect:
m = re.search(r"<h1\sclass=\"box_heading\"\sstyle=\"text-align:center;\">[^ ]+ - ([^ ]+) (\w\w)yte", self.html)
if m:
units = float(m.group(1).replace(",", ""))
@@ -141,8 +141,8 @@ class FreakshareCom(Hoster):
self.download_html()
if "Your Traffic is used up for today" in self.html:
- self.wantReconnect = True
- return secondsToMidnight(gmt=2)
+ self.want_reconnect = True
+ return seconds_to_midnight(gmt=2)
timestring = re.search('\s*var\s(?:downloadWait|time)\s=\s(\d*)[\d.]*;', self.html)
if timestring:
diff --git a/module/plugins/hoster/FreeWayMe.py b/module/plugins/hoster/FreeWayMe.py
index 59b3d93bb..3750e6069 100644
--- a/module/plugins/hoster/FreeWayMe.py
+++ b/module/plugins/hoster/FreeWayMe.py
@@ -6,7 +6,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class FreeWayMe(MultiHoster):
__name__ = "FreeWayMe"
__type__ = "hoster"
- __version__ = "0.18"
+ __version__ = "0.19"
__pattern__ = r'https?://(?:www\.)?free-way\.(bz|me)/.+'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -18,12 +18,12 @@ class FreeWayMe(MultiHoster):
def setup(self):
- self.resumeDownload = False
- self.multiDL = self.premium
- self.chunkLimit = 1
+ self.resume_download = False
+ self.multi_dl = self.premium
+ self.chunk_limit = 1
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
user, data = self.account.selectAccount()
for _i in xrange(5):
@@ -40,14 +40,14 @@ class FreeWayMe(MultiHoster):
headers = self.load(header['location'], just_header=True)
if headers['code'] == 500:
#: error on 2nd stage
- self.logError(_("Error [stage2]"))
+ self.log_error(_("Error [stage2]"))
else:
#: seems to work..
self.download(header['location'])
break
else:
#: error page first stage
- self.logError(_("Error [stage1]"))
+ self.log_error(_("Error [stage1]"))
#@TODO: handle errors
diff --git a/module/plugins/hoster/FreevideoCz.py b/module/plugins/hoster/FreevideoCz.py
index 49f02a28b..32403caf5 100644
--- a/module/plugins/hoster/FreevideoCz.py
+++ b/module/plugins/hoster/FreevideoCz.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class FreevideoCz(DeadHoster):
__name__ = "FreevideoCz"
__type__ = "hoster"
- __version__ = "0.30"
+ __version__ = "0.31"
__pattern__ = r'http://(?:www\.)?freevideo\.cz/vase-videa/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/FshareVn.py b/module/plugins/hoster/FshareVn.py
index 717265014..7e1d573d8 100644
--- a/module/plugins/hoster/FshareVn.py
+++ b/module/plugins/hoster/FshareVn.py
@@ -8,7 +8,7 @@ from module.network.RequestFactory import getURL
from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo
-def getInfo(urls):
+def get_info(urls):
for url in urls:
html = getURL("http://www.fshare.vn/check_link.php",
post={'action': "check_link", 'arrlinks': url})
@@ -16,14 +16,14 @@ def getInfo(urls):
yield parseFileInfo(FshareVn, url, html)
-def doubleDecode(m):
+def double_decode(m):
return m.group(1).decode('raw_unicode_escape')
class FshareVn(SimpleHoster):
__name__ = "FshareVn"
__type__ = "hoster"
- __version__ = "0.20"
+ __version__ = "0.21"
__pattern__ = r'http://(?:www\.)?fshare\.vn/file/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -47,22 +47,22 @@ class FshareVn(SimpleHoster):
post={'action': "check_link", 'arrlinks': pyfile.url})
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.html = self.load(pyfile.url)
- self.checkErrors()
+ self.check_errors()
- action, inputs = self.parseHtmlForm('frm_download')
+ action, inputs = self.parse_html_form('frm_download')
url = urlparse.urljoin(pyfile.url, action)
if not inputs:
self.error(_("No FORM"))
elif 'link_file_pwd_dl' in inputs:
- password = self.getPassword()
+ password = self.get_password()
if password:
- self.logInfo(_("Password protected link, trying ") + password)
+ self.log_info(_("Password protected link, trying ") + password)
inputs['link_file_pwd_dl'] = password
self.html = self.load(url, post=inputs)
@@ -74,10 +74,10 @@ class FshareVn(SimpleHoster):
else:
self.html = self.load(url, post=inputs)
- self.checkErrors()
+ self.check_errors()
m = re.search(r'var count = (\d+)', self.html)
- self.setWait(int(m.group(1)) if m else 30)
+ self.set_wait(int(m.group(1)) if m else 30)
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m is None:
@@ -87,19 +87,19 @@ class FshareVn(SimpleHoster):
self.wait()
- def checkErrors(self):
+ def check_errors(self):
if '/error.php?' in self.req.lastEffectiveURL or u"Liên kết bạn chọn khÃŽng tồn" in self.html:
self.offline()
m = re.search(self.WAIT_PATTERN, self.html)
if m:
- self.logInfo(_("Wait until %s ICT") % m.group(1))
+ self.log_info(_("Wait until %s ICT") % m.group(1))
wait_until = time.mktime.time(time.strptime.time(m.group(1), "%d/%m/%Y %H:%M"))
self.wait(wait_until - time.mktime.time(time.gmtime.time()) - 7 * 60 * 60, True)
self.retry()
elif '<ul class="message-error">' in self.html:
msg = "Unknown error occured or wait time not parsed"
- self.logError(msg)
+ self.log_error(msg)
self.retry(30, 2 * 60, msg)
self.info.pop('error', None)
diff --git a/module/plugins/hoster/Ftp.py b/module/plugins/hoster/Ftp.py
index f4d6380ee..8c269b255 100644
--- a/module/plugins/hoster/Ftp.py
+++ b/module/plugins/hoster/Ftp.py
@@ -11,7 +11,7 @@ from module.plugins.internal.Hoster import Hoster
class Ftp(Hoster):
__name__ = "Ftp"
__type__ = "hoster"
- __version__ = "0.53"
+ __version__ = "0.54"
__pattern__ = r'(?:ftps?|sftp)://([\w.-]+(:[\w.-]+)?@)?[\w.-]+(:\d+)?/.+'
@@ -23,8 +23,8 @@ class Ftp(Hoster):
def setup(self):
- self.chunkLimit = -1
- self.resumeDownload = True
+ self.chunk_limit = -1
+ self.resume_download = True
def process(self, pyfile):
@@ -41,10 +41,10 @@ class Ftp(Hoster):
servers = [x['login'] for x in self.account.getAllAccounts()] if self.account else []
if netloc in servers:
- self.logDebug("Logging on to %s" % netloc)
+ self.log_debug("Logging on to %s" % netloc)
self.req.addAuth(self.account.getAccountInfo(netloc)['password'])
else:
- pwd = self.getPassword()
+ pwd = self.get_password()
if ':' in pwd:
self.req.addAuth(pwd)
@@ -56,14 +56,14 @@ class Ftp(Hoster):
self.fail(_("Error %d: %s") % e.args)
self.req.http.c.setopt(pycurl.NOBODY, 0)
- self.logDebug(self.req.http.header)
+ self.log_debug(self.req.http.header)
m = re.search(r"Content-Length:\s*(\d+)", res)
if m:
pyfile.size = int(m.group(1))
self.download(pyfile.url)
else:
- #Naive ftp directory listing
+ # Naive ftp directory listing
if re.search(r'^25\d.*?"', self.req.http.header, re.M):
pyfile.url = pyfile.url.rstrip('/')
pkgname = "/".join([pyfile.package().name, urlparse.urlparse(pyfile.url).path.rpartition('/')[2]])
@@ -71,7 +71,7 @@ class Ftp(Hoster):
self.req.http.c.setopt(48, 1) #: CURLOPT_DIRLISTONLY
res = self.load(pyfile.url, decode=False)
links = [pyfile.url + x for x in res.splitlines()]
- self.logDebug("LINKS", links)
+ self.log_debug("LINKS", links)
self.core.api.addPackage(pkgname, links)
else:
self.fail(_("Unexpected server response"))
diff --git a/module/plugins/hoster/GamefrontCom.py b/module/plugins/hoster/GamefrontCom.py
index f987a371a..915ebca7c 100644
--- a/module/plugins/hoster/GamefrontCom.py
+++ b/module/plugins/hoster/GamefrontCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class GamefrontCom(SimpleHoster):
__name__ = "GamefrontCom"
__type__ = "hoster"
- __version__ = "0.08"
+ __version__ = "0.09"
__pattern__ = r'http://(?:www\.)?gamefront\.com/files/(?P<ID>\d+)'
@@ -23,14 +23,14 @@ class GamefrontCom(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
+ self.resume_download = True
+ self.multi_dl = True
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.html = self.load("http://www.gamefront.com/files/service/thankyou",
get={'id': self.info['pattern']['ID']})
- return super(GamefrontCom, self).handleFree(pyfile)
+ return super(GamefrontCom, self).handle_free(pyfile)
getInfo = create_getInfo(GamefrontCom)
diff --git a/module/plugins/hoster/GigapetaCom.py b/module/plugins/hoster/GigapetaCom.py
index c2feeb6f8..bfa30358e 100644
--- a/module/plugins/hoster/GigapetaCom.py
+++ b/module/plugins/hoster/GigapetaCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class GigapetaCom(SimpleHoster):
__name__ = "GigapetaCom"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__pattern__ = r'http://(?:www\.)?gigapeta\.com/dl/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -29,16 +29,16 @@ class GigapetaCom(SimpleHoster):
COOKIES = [("gigapeta.com", "lang", "us")]
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
captcha_key = str(random.randint(1, 100000000))
captcha_url = "http://gigapeta.com/img/captcha.gif?x=%s" % captcha_key
self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0)
for _i in xrange(5):
- self.checkErrors()
+ self.check_errors()
- captcha = self.decryptCaptcha(captcha_url)
+ captcha = self.decrypt_captcha(captcha_url)
self.html = self.load(pyfile.url, post={
"captcha_key": captcha_key,
"captcha": captcha,
@@ -49,7 +49,7 @@ class GigapetaCom(SimpleHoster):
self.link = m.group(1).rstrip() #@TODO: Remove .rstrip() in 0.4.10
break
elif "Entered figures don&#96;t coincide with the picture" in self.html:
- self.invalidCaptcha()
+ self.invalid_captcha()
else:
self.fail(_("No valid captcha code entered"))
diff --git a/module/plugins/hoster/GooIm.py b/module/plugins/hoster/GooIm.py
index 4b27e6cc8..c40a41029 100644
--- a/module/plugins/hoster/GooIm.py
+++ b/module/plugins/hoster/GooIm.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class GooIm(SimpleHoster):
__name__ = "GooIm"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__pattern__ = r'https?://(?:www\.)?goo\.im/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -26,11 +26,11 @@ class GooIm(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
+ self.resume_download = True
+ self.multi_dl = True
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.wait(10)
self.link = pyfile.url
diff --git a/module/plugins/hoster/GoogledriveCom.py b/module/plugins/hoster/GoogledriveCom.py
index d658a8ba1..85dc6989c 100644
--- a/module/plugins/hoster/GoogledriveCom.py
+++ b/module/plugins/hoster/GoogledriveCom.py
@@ -13,7 +13,7 @@ from module.utils import html_unescape
class GoogledriveCom(SimpleHoster):
__name__ = "GoogledriveCom"
__type__ = "hoster"
- __version__ = "0.12"
+ __version__ = "0.13"
__pattern__ = r'https?://(?:www\.)?(drive|docs)\.google\.com/(file/d/\w+|uc\?.*id=)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -32,12 +32,12 @@ class GoogledriveCom(SimpleHoster):
def setup(self):
- self.multiDL = True
- self.resumeDownload = True
- self.chunkLimit = 1
+ self.multi_dl = True
+ self.resume_download = True
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
for _i in xrange(2):
m = re.search(self.LINK_FREE_PATTERN, self.html)
@@ -49,7 +49,7 @@ class GoogledriveCom(SimpleHoster):
if not urlparse.urlparse(link).scheme:
link = urlparse.urljoin("https://docs.google.com/", link)
- direct_link = self.directLink(link, False)
+ direct_link = self.direct_link(link, False)
if not direct_link:
self.html = self.load(link)
else:
diff --git a/module/plugins/hoster/HellshareCz.py b/module/plugins/hoster/HellshareCz.py
index ac0043b37..9e713b30e 100644
--- a/module/plugins/hoster/HellshareCz.py
+++ b/module/plugins/hoster/HellshareCz.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class HellshareCz(SimpleHoster):
__name__ = "HellshareCz"
__type__ = "hoster"
- __version__ = "0.85"
+ __version__ = "0.86"
__pattern__ = r'http://(?:www\.)?hellshare\.(?:cz|com|sk|hu|pl)/[^?]*/\d+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -29,8 +29,8 @@ class HellshareCz(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = bool(self.account)
- self.chunkLimit = 1
+ self.resume_download = self.multi_dl = bool(self.account)
+ self.chunk_limit = 1
getInfo = create_getInfo(HellshareCz)
diff --git a/module/plugins/hoster/HellspyCz.py b/module/plugins/hoster/HellspyCz.py
index 9b10760bd..a717a0b36 100644
--- a/module/plugins/hoster/HellspyCz.py
+++ b/module/plugins/hoster/HellspyCz.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class HellspyCz(DeadHoster):
__name__ = "HellspyCz"
__type__ = "hoster"
- __version__ = "0.28"
+ __version__ = "0.29"
__pattern__ = r'http://(?:www\.)?(?:hellspy\.(?:cz|com|sk|hu|pl)|sciagaj\.pl)(/\S+/\d+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/HighWayMe.py b/module/plugins/hoster/HighWayMe.py
index a33a1137b..e51970c71 100644
--- a/module/plugins/hoster/HighWayMe.py
+++ b/module/plugins/hoster/HighWayMe.py
@@ -3,13 +3,13 @@
import re
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
-from module.plugins.internal.SimpleHoster import secondsToMidnight
+from module.plugins.internal.SimpleHoster import seconds_to_midnight
class HighWayMe(MultiHoster):
__name__ = "HighWayMe"
__type__ = "hoster"
- __version__ = "0.12"
+ __version__ = "0.13"
__pattern__ = r'https?://.+high-way\.my'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -21,10 +21,10 @@ class HighWayMe(MultiHoster):
def setup(self):
- self.chunkLimit = 4
+ self.chunk_limit = 4
- def checkErrors(self):
+ def check_errors(self):
if self.html.get('code') == 302: #@NOTE: This is not working. It should by if 302 Moved Temporarily then... But I don't now how to implement it.
self.account.relogin(self.user)
self.retry()
@@ -33,31 +33,31 @@ class HighWayMe(MultiHoster):
self.offline()
elif "downloadlimit" in self.html:
- self.logWarning(_("Reached maximum connctions"))
+ self.log_warning(_("Reached maximum connctions"))
self.retry(5, 60, _("Reached maximum connctions"))
elif "trafficlimit" in self.html:
- self.logWarning(_("Reached daily limit"))
- self.retry(wait_time=secondsToMidnight(gmt=2), reason="Daily limit for this host reached")
+ self.log_warning(_("Reached daily limit"))
+ self.retry(wait_time=seconds_to_midnight(gmt=2), reason="Daily limit for this host reached")
elif "<code>8</code>" in self.html:
- self.logWarning(_("Hoster temporarily unavailable, waiting 1 minute and retry"))
+ self.log_warning(_("Hoster temporarily unavailable, waiting 1 minute and retry"))
self.retry(5, 60, _("Hoster is temporarily unavailable"))
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
for _i in xrange(5):
self.html = self.load("https://high-way.me/load.php",
get={'link': self.pyfile.url})
if self.html:
- self.logDebug("JSON data: " + self.html)
+ self.log_debug("JSON data: " + self.html)
break
else:
- self.logInfo(_("Unable to get API data, waiting 1 minute and retry"))
+ self.log_info(_("Unable to get API data, waiting 1 minute and retry"))
self.retry(5, 60, _("Unable to get API data"))
- self.checkErrors()
+ self.check_errors()
try:
self.pyfile.name = re.search(r'<name>([^<]+)</name>', self.html).group(1)
diff --git a/module/plugins/hoster/HostujeNet.py b/module/plugins/hoster/HostujeNet.py
index ec91e50b9..18cba844f 100644
--- a/module/plugins/hoster/HostujeNet.py
+++ b/module/plugins/hoster/HostujeNet.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class HostujeNet(SimpleHoster):
__name__ = "HostujeNet"
__type__ = "hoster"
- __version__ = "0.01"
+ __version__ = "0.02"
__pattern__ = r'http://(?:www\.)?hostuje\.net/\w+'
@@ -23,11 +23,11 @@ class HostujeNet(SimpleHoster):
def setup(self):
- self.multiDL = True
- self.chunkLimit = 1
+ self.multi_dl = True
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
m = re.search(r'<script src="([\w^_]+.php)"></script>', self.html)
if m:
jscript = self.load("http://hostuje.net/" + m.group(1))
@@ -39,7 +39,7 @@ class HostujeNet(SimpleHoster):
else:
self.error(_("script not found"))
- action, inputs = self.parseHtmlForm(pyfile.url.replace(".", "\.").replace( "?", "\?"))
+ action, inputs = self.parse_html_form(pyfile.url.replace(".", "\.").replace( "?", "\?"))
if not action:
self.error(_("form not found"))
diff --git a/module/plugins/hoster/HotfileCom.py b/module/plugins/hoster/HotfileCom.py
index 082415c6b..4878b111b 100644
--- a/module/plugins/hoster/HotfileCom.py
+++ b/module/plugins/hoster/HotfileCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class HotfileCom(DeadHoster):
__name__ = "HotfileCom"
__type__ = "hoster"
- __version__ = "0.37"
+ __version__ = "0.38"
__pattern__ = r'https?://(?:www\.)?hotfile\.com/dl/\d+/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/HugefilesNet.py b/module/plugins/hoster/HugefilesNet.py
index 3fdcca1ba..d3851d137 100644
--- a/module/plugins/hoster/HugefilesNet.py
+++ b/module/plugins/hoster/HugefilesNet.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class HugefilesNet(XFSHoster):
__name__ = "HugefilesNet"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'http://(?:www\.)?hugefiles\.net/\w{12}'
diff --git a/module/plugins/hoster/HundredEightyUploadCom.py b/module/plugins/hoster/HundredEightyUploadCom.py
index 2a35a008f..74f69fd3b 100644
--- a/module/plugins/hoster/HundredEightyUploadCom.py
+++ b/module/plugins/hoster/HundredEightyUploadCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class HundredEightyUploadCom(XFSHoster):
__name__ = "HundredEightyUploadCom"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'http://(?:www\.)?180upload\.com/\w{12}'
diff --git a/module/plugins/hoster/IFileWs.py b/module/plugins/hoster/IFileWs.py
index ff263d43a..a0149d034 100644
--- a/module/plugins/hoster/IFileWs.py
+++ b/module/plugins/hoster/IFileWs.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class IFileWs(DeadHoster):
__name__ = "IFileWs"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'http://(?:www\.)?ifile\.ws/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/IcyFilesCom.py b/module/plugins/hoster/IcyFilesCom.py
index f81381c66..6d5accddb 100644
--- a/module/plugins/hoster/IcyFilesCom.py
+++ b/module/plugins/hoster/IcyFilesCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class IcyFilesCom(DeadHoster):
__name__ = "IcyFilesCom"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__pattern__ = r'http://(?:www\.)?icyfiles\.com/(.+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/IfileIt.py b/module/plugins/hoster/IfileIt.py
index 18aa0b60f..148cd57d3 100644
--- a/module/plugins/hoster/IfileIt.py
+++ b/module/plugins/hoster/IfileIt.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class IfileIt(DeadHoster):
__name__ = "IfileIt"
__type__ = "hoster"
- __version__ = "0.29"
+ __version__ = "0.30"
__pattern__ = r'^unmatchable$'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/IfolderRu.py b/module/plugins/hoster/IfolderRu.py
index 5f3b4bb51..cc39b32cb 100644
--- a/module/plugins/hoster/IfolderRu.py
+++ b/module/plugins/hoster/IfolderRu.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class IfolderRu(SimpleHoster):
__name__ = "IfolderRu"
__type__ = "hoster"
- __version__ = "0.39"
+ __version__ = "0.40"
__pattern__ = r'http://(?:www)?(files\.)?(ifolder\.ru|metalarea\.org|rusfolder\.(com|net|ru))/(files/)?(?P<ID>\d+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -34,11 +34,11 @@ class IfolderRu(SimpleHoster):
def setup(self):
- self.resumeDownload = self.multiDL = bool(self.account)
- self.chunkLimit = 1
+ self.resume_download = self.multi_dl = bool(self.account)
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
url = "http://rusfolder.com/%s" % self.info['pattern']['ID']
self.html = self.load("http://rusfolder.com/%s" % self.info['pattern']['ID'])
self.getFileInfo()
@@ -47,14 +47,14 @@ class IfolderRu(SimpleHoster):
captcha_url = "http://ints.rusfolder.com/random/images/?session=%s" % session_id
for _i in xrange(5):
- action, inputs = self.parseHtmlForm('id="download-step-one-form"')
- inputs['confirmed_number'] = self.decryptCaptcha(captcha_url, cookies=True)
+ action, inputs = self.parse_html_form('id="download-step-one-form"')
+ inputs['confirmed_number'] = self.decrypt_captcha(captcha_url, cookies=True)
inputs['action'] = '1'
- self.logDebug(inputs)
+ self.log_debug(inputs)
self.html = self.load(url, post=inputs)
if self.WRONG_CAPTCHA_PATTERN in self.html:
- self.invalidCaptcha()
+ self.invalid_captcha()
else:
break
else:
diff --git a/module/plugins/hoster/JumbofilesCom.py b/module/plugins/hoster/JumbofilesCom.py
index 4812f0224..1da6d7d3c 100644
--- a/module/plugins/hoster/JumbofilesCom.py
+++ b/module/plugins/hoster/JumbofilesCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class JumbofilesCom(SimpleHoster):
__name__ = "JumbofilesCom"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'http://(?:www\.)?jumbofiles\.com/(?P<ID>\w{12})'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -24,11 +24,11 @@ class JumbofilesCom(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
+ self.resume_download = True
+ self.multi_dl = True
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
post_data = {"id": self.info['pattern']['ID'], "op": "download3", "rand": ""}
html = self.load(self.pyfile.url, post=post_data)
self.link = re.search(self.LINK_FREE_PATTERN, html).group(1)
diff --git a/module/plugins/hoster/JunocloudMe.py b/module/plugins/hoster/JunocloudMe.py
index 415d5e2d0..fb5eae4f8 100644
--- a/module/plugins/hoster/JunocloudMe.py
+++ b/module/plugins/hoster/JunocloudMe.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class JunocloudMe(XFSHoster):
__name__ = "JunocloudMe"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'http://(?:\w+\.)?junocloud\.me/\w{12}'
diff --git a/module/plugins/hoster/Keep2ShareCc.py b/module/plugins/hoster/Keep2ShareCc.py
index d90466904..c743f4fc9 100644
--- a/module/plugins/hoster/Keep2ShareCc.py
+++ b/module/plugins/hoster/Keep2ShareCc.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class Keep2ShareCc(SimpleHoster):
__name__ = "Keep2ShareCc"
__type__ = "hoster"
- __version__ = "0.23"
+ __version__ = "0.24"
__pattern__ = r'https?://(?:www\.)?(keep2share|k2s|keep2s)\.cc/file/(?P<ID>\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -39,11 +39,11 @@ class Keep2ShareCc(SimpleHoster):
ERROR_PATTERN = r'>\s*(Free user can\'t download large files|You no can access to this file|This download available only for premium users|This is private file)'
- def checkErrors(self):
+ def check_errors(self):
m = re.search(self.TEMP_ERROR_PATTERN, self.html)
if m:
self.info['error'] = m.group(1)
- self.wantReconnect = True
+ self.want_reconnect = True
self.retry(wait_time=30 * 60, reason=m.group(0))
m = re.search(self.ERROR_PATTERN, self.html)
@@ -53,30 +53,30 @@ class Keep2ShareCc(SimpleHoster):
m = re.search(self.WAIT_PATTERN, self.html)
if m:
- self.logDebug("Hoster told us to wait for %s" % m.group(1))
+ self.log_debug("Hoster told us to wait for %s" % m.group(1))
#: string to time convert courtesy of https://stackoverflow.com/questions/10663720
ftr = [3600, 60, 1]
wait_time = sum(a * b for a, b in zip(ftr, map(int, m.group(1).split(':'))))
- self.wantReconnect = True
+ self.want_reconnect = True
self.retry(wait_time=wait_time, reason="Please wait to download this file")
self.info.pop('error', None)
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.fid = re.search(r'<input type="hidden" name="slow_id" value="(.+?)">', self.html).group(1)
self.html = self.load(pyfile.url, post={'yt0': '', 'slow_id': self.fid})
- #: self.logDebug(self.fid)
- #: self.logDebug(pyfile.url)
+ #: self.log_debug(self.fid)
+ #: self.log_debug(pyfile.url)
- self.checkErrors()
+ self.check_errors()
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m is None:
- self.handleCaptcha()
+ self.handle_captcha()
self.wait(31)
self.html = self.load(pyfile.url)
@@ -87,20 +87,20 @@ class Keep2ShareCc(SimpleHoster):
self.link = m.group(1)
- def handleCaptcha(self):
+ def handle_captcha(self):
post_data = {'free' : 1,
'freeDownloadRequest': 1,
'uniqueId' : self.fid,
'yt0' : ''}
m = re.search(r'id="(captcha\-form)"', self.html)
- self.logDebug("captcha-form found %s" % m)
+ self.log_debug("captcha-form found %s" % m)
m = re.search(self.CAPTCHA_PATTERN, self.html)
- self.logDebug("CAPTCHA_PATTERN found %s" % m)
+ self.log_debug("CAPTCHA_PATTERN found %s" % m)
if m:
captcha_url = urlparse.urljoin("http://keep2s.cc/", m.group(1))
- post_data['CaptchaForm[code]'] = self.decryptCaptcha(captcha_url)
+ post_data['CaptchaForm[code]'] = self.decrypt_captcha(captcha_url)
else:
recaptcha = ReCaptcha(self)
response, challenge = recaptcha.challenge()
@@ -110,9 +110,9 @@ class Keep2ShareCc(SimpleHoster):
self.html = self.load(self.pyfile.url, post=post_data)
if 'verification code is incorrect' not in self.html:
- self.correctCaptcha()
+ self.correct_captcha()
else:
- self.invalidCaptcha()
+ self.invalid_captcha()
getInfo = create_getInfo(Keep2ShareCc)
diff --git a/module/plugins/hoster/KickloadCom.py b/module/plugins/hoster/KickloadCom.py
index 7690c85c8..2be82bcfd 100644
--- a/module/plugins/hoster/KickloadCom.py
+++ b/module/plugins/hoster/KickloadCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class KickloadCom(DeadHoster):
__name__ = "KickloadCom"
__type__ = "hoster"
- __version__ = "0.21"
+ __version__ = "0.22"
__pattern__ = r'http://(?:www\.)?kickload\.com/get/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/KingfilesNet.py b/module/plugins/hoster/KingfilesNet.py
index f14cbd8b4..41e6f1c46 100644
--- a/module/plugins/hoster/KingfilesNet.py
+++ b/module/plugins/hoster/KingfilesNet.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class KingfilesNet(SimpleHoster):
__name__ = "KingfilesNet"
__type__ = "hoster"
- __version__ = "0.08"
+ __version__ = "0.09"
__pattern__ = r'http://(?:www\.)?kingfiles\.net/(?P<ID>\w{12})'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -31,11 +31,11 @@ class KingfilesNet(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
+ self.resume_download = True
+ self.multi_dl = True
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
#: Click the free user button
post_data = {'op' : "download1",
'usr_login' : "",
@@ -55,7 +55,7 @@ class KingfilesNet(SimpleHoster):
self.error(_("Random key not found"))
rand = m.group(1)
- self.logDebug("rand = ", rand)
+ self.log_debug("rand = ", rand)
post_data = {'op' : "download2",
'id' : self.info['pattern']['ID'],
diff --git a/module/plugins/hoster/LemUploadsCom.py b/module/plugins/hoster/LemUploadsCom.py
index 098867c8b..71ad1c5db 100644
--- a/module/plugins/hoster/LemUploadsCom.py
+++ b/module/plugins/hoster/LemUploadsCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class LemUploadsCom(DeadHoster):
__name__ = "LemUploadsCom"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'https?://(?:www\.)?lemuploads\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/LetitbitNet.py b/module/plugins/hoster/LetitbitNet.py
index 62afb6c7c..60634354b 100644
--- a/module/plugins/hoster/LetitbitNet.py
+++ b/module/plugins/hoster/LetitbitNet.py
@@ -12,7 +12,7 @@ import urlparse
from module.common.json_layer import json_loads, json_dumps
from module.network.RequestFactory import getURL
from module.plugins.internal.ReCaptcha import ReCaptcha
-from module.plugins.internal.SimpleHoster import SimpleHoster, secondsToMidnight
+from module.plugins.internal.SimpleHoster import SimpleHoster, seconds_to_midnight
def api_response(url):
@@ -22,7 +22,7 @@ def api_response(url):
return json_loads(api_rep)
-def getInfo(urls):
+def get_info(urls):
for url in urls:
api_rep = api_response(url)
if api_rep['status'] == 'OK':
@@ -35,7 +35,7 @@ def getInfo(urls):
class LetitbitNet(SimpleHoster):
__name__ = "LetitbitNet"
__type__ = "hoster"
- __version__ = "0.31"
+ __version__ = "0.32"
__pattern__ = r'https?://(?:www\.)?(letitbit|shareflare)\.net/download/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -53,16 +53,16 @@ class LetitbitNet(SimpleHoster):
def setup(self):
- self.resumeDownload = True
+ self.resume_download = True
- def handleFree(self, pyfile):
- action, inputs = self.parseHtmlForm('id="ifree_form"')
+ def handle_free(self, pyfile):
+ action, inputs = self.parse_html_form('id="ifree_form"')
if not action:
self.error(_("ifree_form"))
pyfile.size = float(inputs['sssize'])
- self.logDebug(action, inputs)
+ self.log_debug(action, inputs)
inputs['desc'] = ""
self.html = self.load(urlparse.urljoin("http://letitbit.net/", action), post=inputs)
@@ -70,12 +70,12 @@ class LetitbitNet(SimpleHoster):
m = re.search(self.SECONDS_PATTERN, self.html)
seconds = int(m.group(1)) if m else 60
- self.logDebug("Seconds found", seconds)
+ self.log_debug("Seconds found", seconds)
m = re.search(self.CAPTCHA_CONTROL_FIELD, self.html)
recaptcha_control_field = m.group(1)
- self.logDebug("ReCaptcha control field found", recaptcha_control_field)
+ self.log_debug("ReCaptcha control field found", recaptcha_control_field)
self.wait(seconds)
@@ -83,7 +83,7 @@ class LetitbitNet(SimpleHoster):
if res != '1':
self.error(_("Unknown response - ajax_check_url"))
- self.logDebug(res)
+ self.log_debug(res)
recaptcha = ReCaptcha(self)
response, challenge = recaptcha.challenge()
@@ -92,21 +92,21 @@ class LetitbitNet(SimpleHoster):
"recaptcha_response_field": response,
"recaptcha_control_field": recaptcha_control_field}
- self.logDebug("Post data to send", post_data)
+ self.log_debug("Post data to send", post_data)
res = self.load("http://letitbit.net/ajax/check_recaptcha.php", post=post_data)
- self.logDebug(res)
+ self.log_debug(res)
if not res:
- self.invalidCaptcha()
+ self.invalid_captcha()
if res == "error_free_download_blocked":
- self.logWarning(_("Daily limit reached"))
- self.wait(secondsToMidnight(gmt=2), True)
+ self.log_warning(_("Daily limit reached"))
+ self.wait(seconds_to_midnight(gmt=2), True)
if res == "error_wrong_captcha":
- self.invalidCaptcha()
+ self.invalid_captcha()
self.retry()
elif res.startswith('['):
@@ -121,13 +121,13 @@ class LetitbitNet(SimpleHoster):
self.link = urls[0]
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
api_key = self.user
premium_key = self.account.getAccountData(self.user)['password']
json_data = [api_key, ["download/direct_links", {"pass": premium_key, "link": pyfile.url}]]
api_rep = self.load('http://api.letitbit.net/json', post={'r': json_dumps(json_data)})
- self.logDebug("API Data: " + api_rep)
+ self.log_debug("API Data: " + api_rep)
api_rep = json_loads(api_rep)
if api_rep['status'] == 'FAIL':
diff --git a/module/plugins/hoster/LinksnappyCom.py b/module/plugins/hoster/LinksnappyCom.py
index f7bdef0dd..19cad7b97 100644
--- a/module/plugins/hoster/LinksnappyCom.py
+++ b/module/plugins/hoster/LinksnappyCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class LinksnappyCom(MultiHoster):
__name__ = "LinksnappyCom"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.10"
__pattern__ = r'https?://(?:[^/]+\.)?linksnappy\.com'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -24,7 +24,7 @@ class LinksnappyCom(MultiHoster):
SINGLE_CHUNK_HOSTERS = ["easybytez.com"]
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
host = self._get_host(pyfile.url)
json_params = json_dumps({'link' : pyfile.url,
'type' : host,
@@ -34,7 +34,7 @@ class LinksnappyCom(MultiHoster):
r = self.load("http://gen.linksnappy.com/genAPI.php",
post={'genLinks': json_params})
- self.logDebug("JSON data: " + r)
+ self.log_debug("JSON data: " + r)
j = json_loads(r)['links'][0]
@@ -45,7 +45,7 @@ class LinksnappyCom(MultiHoster):
self.link = j['generated']
if host in self.SINGLE_CHUNK_HOSTERS:
- self.chunkLimit = 1
+ self.chunk_limit = 1
else:
self.setup()
diff --git a/module/plugins/hoster/LoadTo.py b/module/plugins/hoster/LoadTo.py
index e974b9f3d..5c276ff38 100644
--- a/module/plugins/hoster/LoadTo.py
+++ b/module/plugins/hoster/LoadTo.py
@@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class LoadTo(SimpleHoster):
__name__ = "LoadTo"
__type__ = "hoster"
- __version__ = "0.24"
+ __version__ = "0.25"
__pattern__ = r'http://(?:www\.)?load\.to/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -35,11 +35,11 @@ class LoadTo(SimpleHoster):
def setup(self):
- self.multiDL = True
- self.chunkLimit = 1
+ self.multi_dl = True
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
#: Search for Download URL
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m is None:
diff --git a/module/plugins/hoster/LolabitsEs.py b/module/plugins/hoster/LolabitsEs.py
index 08773888b..e5656b6a0 100644
--- a/module/plugins/hoster/LolabitsEs.py
+++ b/module/plugins/hoster/LolabitsEs.py
@@ -9,7 +9,7 @@ from module.utils import html_unescape
class LolabitsEs(SimpleHoster):
__name__ = "LolabitsEs"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'https?://(?:www\.)?lolabits\.es/.+'
@@ -28,15 +28,15 @@ class LolabitsEs(SimpleHoster):
def setup(self):
- self.chunkLimit = 1
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
fileid = re.search(self.FILEID_PATTERN, self.html).group(1)
- self.logDebug("FileID: " + fileid)
+ self.log_debug("FileID: " + fileid)
token = re.search(self.TOKEN_PATTERN, self.html).group(1)
- self.logDebug("Token: " + token)
+ self.log_debug("Token: " + token)
self.html = self.load("http://lolabits.es/action/License/Download",
post={'fileId' : fileid,
diff --git a/module/plugins/hoster/LomafileCom.py b/module/plugins/hoster/LomafileCom.py
index ef05cd1ea..67cb32608 100644
--- a/module/plugins/hoster/LomafileCom.py
+++ b/module/plugins/hoster/LomafileCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class LomafileCom(DeadHoster):
__name__ = "LomafileCom"
__type__ = "hoster"
- __version__ = "0.52"
+ __version__ = "0.53"
__pattern__ = r'http://lomafile\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/LuckyShareNet.py b/module/plugins/hoster/LuckyShareNet.py
index c08203346..ec5e87f12 100644
--- a/module/plugins/hoster/LuckyShareNet.py
+++ b/module/plugins/hoster/LuckyShareNet.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class LuckyShareNet(SimpleHoster):
__name__ = "LuckyShareNet"
__type__ = "hoster"
- __version__ = "0.07"
+ __version__ = "0.08"
__pattern__ = r'https?://(?:www\.)?luckyshare\.net/(?P<ID>\d{10,})'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -25,13 +25,13 @@ class LuckyShareNet(SimpleHoster):
OFFLINE_PATTERN = r'There is no such file available'
- def parseJson(self, rep):
+ def parse_json(self, rep):
if 'AJAX Error' in rep:
html = self.load(self.pyfile.url)
m = re.search(r"waitingtime = (\d+);", html)
if m:
seconds = int(m.group(1))
- self.logDebug("You have to wait %d seconds between free downloads" % seconds)
+ self.log_debug("You have to wait %d seconds between free downloads" % seconds)
self.retry(wait_time=seconds)
else:
self.error(_("Unable to detect wait time between free downloads"))
@@ -42,12 +42,12 @@ class LuckyShareNet(SimpleHoster):
#@TODO: There should be a filesize limit for free downloads
# Some files could not be downloaded in free mode
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
rep = self.load(r"http://luckyshare.net/download/request/type/time/file/" + self.info['pattern']['ID'])
- self.logDebug("JSON: " + rep)
+ self.log_debug("JSON: " + rep)
- json = self.parseJson(rep)
+ json = self.parse_json(rep)
self.wait(json['time'])
recaptcha = ReCaptcha(self)
@@ -56,13 +56,13 @@ class LuckyShareNet(SimpleHoster):
response, challenge = recaptcha.challenge()
rep = self.load(r"http://luckyshare.net/download/verify/challenge/%s/response/%s/hash/%s" %
(challenge, response, json['hash']))
- self.logDebug("JSON: " + rep)
+ self.log_debug("JSON: " + rep)
if 'link' in rep:
- json.update(self.parseJson(rep))
- self.correctCaptcha()
+ json.update(self.parse_json(rep))
+ self.correct_captcha()
break
elif 'Verification failed' in rep:
- self.invalidCaptcha()
+ self.invalid_captcha()
else:
self.error(_("Unable to get downlaod link"))
diff --git a/module/plugins/hoster/MediafireCom.py b/module/plugins/hoster/MediafireCom.py
index 56f13362a..b1a7477e1 100644
--- a/module/plugins/hoster/MediafireCom.py
+++ b/module/plugins/hoster/MediafireCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class MediafireCom(SimpleHoster):
__name__ = "MediafireCom"
__type__ = "hoster"
- __version__ = "0.89"
+ __version__ = "0.90"
__pattern__ = r'https?://(?:www\.)?mediafire\.com/(file/|view/\??|download(\.php\?|/)|\?)(?P<ID>\w{15})'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -31,11 +31,11 @@ class MediafireCom(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
+ self.resume_download = True
+ self.multi_dl = True
- def handleCaptcha(self):
+ def handle_captcha(self):
solvemedia = SolveMedia(self)
captcha_key = solvemedia.detect_key()
@@ -55,22 +55,22 @@ class MediafireCom(SimpleHoster):
post={'g-recaptcha-response': response})
- def handleFree(self, pyfile):
- self.handleCaptcha()
+ def handle_free(self, pyfile):
+ self.handle_captcha()
if self.PASSWORD_PATTERN in self.html:
- password = self.getPassword()
+ password = self.get_password()
if not password:
self.fail(_("No password found"))
else:
- self.logInfo(_("Password protected link, trying: ") + password)
+ self.log_info(_("Password protected link, trying: ") + password)
self.html = self.load(self.link, post={'downloadp': password})
if self.PASSWORD_PATTERN in self.html:
self.fail(_("Incorrect password"))
- return super(MediafireCom, self).handleFree(pyfile)
+ return super(MediafireCom, self).handle_free(pyfile)
getInfo = create_getInfo(MediafireCom)
diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py
index 2e6dcfda6..411c12c4a 100644
--- a/module/plugins/hoster/MegaCoNz.py
+++ b/module/plugins/hoster/MegaCoNz.py
@@ -48,7 +48,7 @@ from module.utils import decode, fs_decode, fs_encode
class MegaCoNz(Hoster):
__name__ = "MegaCoNz"
__type__ = "hoster"
- __version__ = "0.30"
+ __version__ = "0.31"
__pattern__ = r'(https?://(?:www\.)?mega(\.co)?\.nz/|mega:|chrome:.+?)#(?P<TYPE>N|)!(?P<ID>[\w^_]+)!(?P<KEY>[\w,-]+)'
@@ -67,7 +67,7 @@ class MegaCoNz(Hoster):
return standard_b64decode(data + '=' * (-len(data) % 4))
- def getCipherKey(self, key):
+ def get_cipher_key(self, key):
"""
Construct the cipher key from the given data
"""
@@ -88,16 +88,16 @@ class MegaCoNz(Hoster):
uid = random.randint(10 << 9, 10 ** 10)
res = self.load(self.API_URL, get={'id': uid}, post=json_dumps([kwargs]))
- self.logDebug("Api Response: " + res)
+ self.log_debug("Api Response: " + res)
return json_loads(res)
- def decryptAttr(self, data, key):
- k, iv, meta_mac = self.getCipherKey(key)
+ def decrypt_attr(self, data, key):
+ k, iv, meta_mac = self.get_cipher_key(key)
cbc = AES.new(k, AES.MODE_CBC, "\0" * 16)
attr = decode(cbc.decrypt(self.b64_decode(data)))
- self.logDebug("Decrypted Attr: %s" % attr)
+ self.log_debug("Decrypted Attr: %s" % attr)
if not attr.startswith("MEGA"):
self.fail(_("Decryption failed"))
@@ -105,7 +105,7 @@ class MegaCoNz(Hoster):
return json_loads(re.search(r'{.+?}', attr).group(0))
- def decryptFile(self, key):
+ def decrypt_file(self, key):
"""
Decrypts the file at lastDownload`
"""
@@ -113,14 +113,14 @@ class MegaCoNz(Hoster):
n = self.b64_decode(key)[16:24]
#: convert counter to long and shift bytes
- k, iv, meta_mac = self.getCipherKey(key)
+ k, iv, meta_mac = self.get_cipher_key(key)
ctr = Counter.new(128, initial_value=long(n.encode("hex"), 16) << 64)
cipher = AES.new(k, AES.MODE_CTR, counter=ctr)
self.pyfile.setStatus("decrypting")
self.pyfile.setProgress(0)
- file_crypted = fs_encode(self.lastDownload)
+ file_crypted = fs_encode(self.last_download)
file_decrypted = file_crypted.rsplit(self.FILE_SUFFIX)[0]
try:
@@ -167,17 +167,17 @@ class MegaCoNz(Hoster):
#: self.fail(_("Checksum mismatch"))
os.remove(file_crypted)
- self.lastDownload = fs_decode(file_decrypted)
+ self.last_download = fs_decode(file_decrypted)
- def checkError(self, code):
+ def check_error(self, code):
ecode = abs(code)
if ecode in (9, 16, 21):
self.offline()
elif ecode in (3, 13, 17, 18, 19):
- self.tempOffline()
+ self.temp_offline()
elif ecode in (1, 4, 6, 10, 15, 21):
self.retry(5, 30, _("Error code: [%s]") % -ecode)
@@ -192,7 +192,7 @@ class MegaCoNz(Hoster):
key = pattern['KEY']
public = pattern['TYPE'] == ''
- self.logDebug("ID: %s" % id, "Key: %s" % key, "Type: %s" % ("public" if public else "node"))
+ self.log_debug("ID: %s" % id, "Key: %s" % key, "Type: %s" % ("public" if public else "node"))
#: g is for requesting a download url
#: this is similar to the calls in the mega js app, documentation is very bad
@@ -202,11 +202,11 @@ class MegaCoNz(Hoster):
mega = self.api_response(a="g", g=1, n=id, ssl=1)[0]
if isinstance(mega, int):
- self.checkError(mega)
+ self.check_error(mega)
elif "e" in mega:
- self.checkError(mega['e'])
+ self.check_error(mega['e'])
- attr = self.decryptAttr(mega['at'], key)
+ attr = self.decrypt_attr(mega['at'], key)
pyfile.name = attr['n'] + self.FILE_SUFFIX
pyfile.size = mega['s']
@@ -215,7 +215,7 @@ class MegaCoNz(Hoster):
self.download(mega['g'])
- self.decryptFile(key)
+ self.decrypt_file(key)
#: Everything is finished and final name can be set
pyfile.name = attr['n']
diff --git a/module/plugins/hoster/MegaDebridEu.py b/module/plugins/hoster/MegaDebridEu.py
index e4a002f9b..67c8f087b 100644
--- a/module/plugins/hoster/MegaDebridEu.py
+++ b/module/plugins/hoster/MegaDebridEu.py
@@ -10,7 +10,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class MegaDebridEu(MultiHoster):
__name__ = "MegaDebridEu"
__type__ = "hoster"
- __version__ = "0.48"
+ __version__ = "0.49"
__pattern__ = r'http://((?:www\d+\.|s\d+\.)?mega-debrid\.eu|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/download/file/[\w^_]+'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -41,7 +41,7 @@ class MegaDebridEu(MultiHoster):
return False
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
"""
Debrid a link
Return The debrided link if succeed or original link if fail
diff --git a/module/plugins/hoster/MegaFilesSe.py b/module/plugins/hoster/MegaFilesSe.py
index 249eff952..f592c940b 100644
--- a/module/plugins/hoster/MegaFilesSe.py
+++ b/module/plugins/hoster/MegaFilesSe.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class MegaFilesSe(DeadHoster):
__name__ = "MegaFilesSe"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'http://(?:www\.)?megafiles\.se/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/MegaRapidCz.py b/module/plugins/hoster/MegaRapidCz.py
index ed6e0a3ad..e00efc1a9 100644
--- a/module/plugins/hoster/MegaRapidCz.py
+++ b/module/plugins/hoster/MegaRapidCz.py
@@ -8,7 +8,7 @@ from module.network.RequestFactory import getRequest
from module.plugins.internal.SimpleHoster import SimpleHoster, parseFileInfo
-def getInfo(urls):
+def get_info(urls):
h = getRequest()
h.c.setopt(pycurl.HTTPHEADER,
["Accept: text/html",
@@ -22,7 +22,7 @@ def getInfo(urls):
class MegaRapidCz(SimpleHoster):
__name__ = "MegaRapidCz"
__type__ = "hoster"
- __version__ = "0.56"
+ __version__ = "0.57"
__pattern__ = r'http://(?:www\.)?(share|mega)rapid\.cz/soubor/\d+/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -48,10 +48,10 @@ class MegaRapidCz(SimpleHoster):
def setup(self):
- self.chunkLimit = 1
+ self.chunk_limit = 1
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
m = re.search(self.LINK_PREMIUM_PATTERN, self.html)
if m:
self.link = m.group(1)
diff --git a/module/plugins/hoster/MegaRapidoNet.py b/module/plugins/hoster/MegaRapidoNet.py
index 4b0465e44..cc5be0ea3 100644
--- a/module/plugins/hoster/MegaRapidoNet.py
+++ b/module/plugins/hoster/MegaRapidoNet.py
@@ -5,7 +5,7 @@ import random
from module.plugins.internal.MultiHoster import MultiHoster
-def random_with_N_digits(n):
+def random_with_n_digits(n):
rand = "0."
not_zero = 0
for i in xrange(1, n + 1):
@@ -23,7 +23,7 @@ def random_with_N_digits(n):
class MegaRapidoNet(MultiHoster):
__name__ = "MegaRapidoNet"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'http://(?:www\.)?\w+\.megarapido\.net/\?file=\w+'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -39,7 +39,7 @@ class MegaRapidoNet(MultiHoster):
ERROR_PATTERN = r'<\s*?div[^>]*?class\s*?=\s*?["\']?alert-message error.*?>([^<]*)'
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
self.html = self.load("http://megarapido.net/gerar.php",
post={'rand' :random_with_N_digits(16),
'urllist' : pyfile.url,
@@ -52,4 +52,4 @@ class MegaRapidoNet(MultiHoster):
if "desloga e loga novamente para gerar seus links" in self.html.lower():
self.error("You have logged in at another place")
- return super(MegaRapidoNet, self).handlePremium(pyfile)
+ return super(MegaRapidoNet, self).handle_premium(pyfile)
diff --git a/module/plugins/hoster/MegacrypterCom.py b/module/plugins/hoster/MegacrypterCom.py
index 27c3c7253..7152a1cbc 100644
--- a/module/plugins/hoster/MegacrypterCom.py
+++ b/module/plugins/hoster/MegacrypterCom.py
@@ -10,7 +10,7 @@ from module.plugins.hoster.MegaCoNz import MegaCoNz
class MegacrypterCom(MegaCoNz):
__name__ = "MegacrypterCom"
__type__ = "hoster"
- __version__ = "0.22"
+ __version__ = "0.23"
__pattern__ = r'https?://\w{0,10}\.?megacrypter\.com/[\w!-]+'
@@ -27,9 +27,9 @@ class MegacrypterCom(MegaCoNz):
"""
Dispatch a call to the api, see megacrypter.com/api_doc
"""
- self.logDebug("JSON request: " + json_dumps(kwargs))
+ self.log_debug("JSON request: " + json_dumps(kwargs))
res = self.load(self.API_URL, post=json_dumps(kwargs))
- self.logDebug("API Response: " + res)
+ self.log_debug("API Response: " + res)
return json_loads(res)
@@ -53,7 +53,7 @@ class MegacrypterCom(MegaCoNz):
self.download(dl['url'])
- self.decryptFile(key)
+ self.decrypt_file(key)
#: Everything is finished and final name can be set
pyfile.name = info['name']
diff --git a/module/plugins/hoster/MegareleaseOrg.py b/module/plugins/hoster/MegareleaseOrg.py
index 6349144ec..5273a1d5e 100644
--- a/module/plugins/hoster/MegareleaseOrg.py
+++ b/module/plugins/hoster/MegareleaseOrg.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class MegareleaseOrg(DeadHoster):
__name__ = "MegareleaseOrg"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'https?://(?:www\.)?megarelease\.org/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/MegasharesCom.py b/module/plugins/hoster/MegasharesCom.py
index 0c74e380d..34ed8bf8b 100644
--- a/module/plugins/hoster/MegasharesCom.py
+++ b/module/plugins/hoster/MegasharesCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class MegasharesCom(SimpleHoster):
__name__ = "MegasharesCom"
__type__ = "hoster"
- __version__ = "0.28"
+ __version__ = "0.29"
__pattern__ = r'http://(?:www\.)?(d\d{2}\.)?megashares\.com/((index\.php)?\?d\d{2}=|dl/)\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -35,15 +35,15 @@ class MegasharesCom(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = self.premium
+ self.resume_download = True
+ self.multi_dl = self.premium
- def handlePremium(self, pyfile):
- self.handleDownload(True)
+ def handle_premium(self, pyfile):
+ self.handle_download(True)
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
if self.NO_SLOTS_PATTERN in self.html:
self.retry(wait_time=5 * 60)
@@ -55,10 +55,10 @@ class MegasharesCom(SimpleHoster):
for _i in xrange(5):
random_num = re.search(self.REACTIVATE_NUM_PATTERN, self.html).group(1)
- verifyinput = self.decryptCaptcha("http://d01.megashares.com/index.php",
+ verifyinput = self.decrypt_captcha("http://d01.megashares.com/index.php",
get={'secgfx': "gfx", 'random_num': random_num})
- self.logInfo(_("Reactivating passport %s: %s %s") % (passport_num, random_num, verifyinput))
+ self.log_info(_("Reactivating passport %s: %s %s") % (passport_num, random_num, verifyinput))
res = self.load("http://d01.megashares.com%s" % request_uri,
get={'rs' : "check_passport_renewal",
@@ -69,10 +69,10 @@ class MegasharesCom(SimpleHoster):
'rsrnd[]' : str(int(time.time() * 1000))})
if 'Thank you for reactivating your passport.' in res:
- self.correctCaptcha()
+ self.correct_captcha()
self.retry()
else:
- self.invalidCaptcha()
+ self.invalid_captcha()
else:
self.fail(_("Failed to reactivate passport"))
@@ -80,7 +80,7 @@ class MegasharesCom(SimpleHoster):
if m:
time = [int(x) for x in m.groups()]
renew = time[0] + (time[1] * 60) + (time[2] * 60)
- self.logDebug("Waiting %d seconds for a new passport" % renew)
+ self.log_debug("Waiting %d seconds for a new passport" % renew)
self.retry(wait_time=renew, reason=_("Passport renewal"))
#: Check traffic left on passport
@@ -88,17 +88,17 @@ class MegasharesCom(SimpleHoster):
if m is None:
self.fail(_("Passport not found"))
- self.logInfo(_("Download passport: %s") % m.group(1))
+ self.log_info(_("Download passport: %s") % m.group(1))
data_left = float(m.group(2)) * 1024 ** {'B': 0, 'KB': 1, 'MB': 2, 'GB': 3}[m.group(3)]
- self.logInfo(_("Data left: %s %s (%d MB needed)") % (m.group(2), m.group(3), self.pyfile.size / 1048576))
+ self.log_info(_("Data left: %s %s (%d MB needed)") % (m.group(2), m.group(3), self.pyfile.size / 1048576))
if not data_left:
self.retry(wait_time=600, reason=_("Passport renewal"))
- self.handleDownload(False)
+ self.handle_download(False)
- def handleDownload(self, premium=False):
+ def handle_download(self, premium=False):
#: Find download link
m = re.search(self.LINK_PATTERN % (1 if premium else 2), self.html)
msg = _('%s download URL' % ('Premium' if premium else 'Free'))
@@ -106,7 +106,7 @@ class MegasharesCom(SimpleHoster):
self.error(msg)
self.link = m.group(1)
- self.logDebug("%s: %s" % (msg, self.link))
+ self.log_debug("%s: %s" % (msg, self.link))
getInfo = create_getInfo(MegasharesCom)
diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py
index 590819f7f..b2f177dd6 100644
--- a/module/plugins/hoster/MegauploadCom.py
+++ b/module/plugins/hoster/MegauploadCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class MegauploadCom(DeadHoster):
__name__ = "MegauploadCom"
__type__ = "hoster"
- __version__ = "0.31"
+ __version__ = "0.32"
__pattern__ = r'http://(?:www\.)?megaupload\.com/\?.*&?(d|v)=\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/MegavideoCom.py b/module/plugins/hoster/MegavideoCom.py
index accd079fc..c2051703f 100644
--- a/module/plugins/hoster/MegavideoCom.py
+++ b/module/plugins/hoster/MegavideoCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class MegavideoCom(DeadHoster):
__name__ = "MegavideoCom"
__type__ = "hoster"
- __version__ = "0.21"
+ __version__ = "0.22"
__pattern__ = r'http://(?:www\.)?megavideo\.com/\?.*&?(d|v)=\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/MovReelCom.py b/module/plugins/hoster/MovReelCom.py
index 2fe5184ae..c7de30841 100644
--- a/module/plugins/hoster/MovReelCom.py
+++ b/module/plugins/hoster/MovReelCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class MovReelCom(XFSHoster):
__name__ = "MovReelCom"
__type__ = "hoster"
- __version__ = "1.24"
+ __version__ = "1.25"
__pattern__ = r'http://(?:www\.)?movreel\.com/\w{12}'
diff --git a/module/plugins/hoster/MultihostersCom.py b/module/plugins/hoster/MultihostersCom.py
index bcd7c6237..97894030d 100644
--- a/module/plugins/hoster/MultihostersCom.py
+++ b/module/plugins/hoster/MultihostersCom.py
@@ -6,7 +6,7 @@ from module.plugins.hoster.ZeveraCom import ZeveraCom
class MultihostersCom(ZeveraCom):
__name__ = "MultihostersCom"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'https?://(?:www\.)multihosters\.com/(getFiles\.ashx|Members/download\.ashx)\?.*ourl=.+'
diff --git a/module/plugins/hoster/MultishareCz.py b/module/plugins/hoster/MultishareCz.py
index 2a5031f08..1f6ed4334 100644
--- a/module/plugins/hoster/MultishareCz.py
+++ b/module/plugins/hoster/MultishareCz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class MultishareCz(SimpleHoster):
__name__ = "MultishareCz"
__type__ = "hoster"
- __version__ = "0.40"
+ __version__ = "0.41"
__pattern__ = r'http://(?:www\.)?multishare\.cz/stahnout/(?P<ID>\d+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -28,20 +28,20 @@ class MultishareCz(SimpleHoster):
OFFLINE_PATTERN = ur'<h1>Stáhnout soubor</h1><p><strong>PoşadovanÜ soubor neexistuje.</strong></p>'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.download("http://www.multishare.cz/html/download_free.php", get={'ID': self.info['pattern']['ID']})
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
self.download("http://www.multishare.cz/html/download_premium.php", get={'ID': self.info['pattern']['ID']})
- def handleMulti(self, pyfile):
+ def handle_multi(self, pyfile):
self.html = self.load('http://www.multishare.cz/html/mms_ajax.php', post={"link": pyfile.url})
- self.checkInfo()
+ self.check_info()
- if not self.checkTrafficLeft():
+ if not self.check_traffic_left():
self.fail(_("Not enough credit left to download file"))
self.download("http://dl%d.mms.multishare.cz/html/mms_process.php" % round(random.random() * 10000 * random.random()),
diff --git a/module/plugins/hoster/MyfastfileCom.py b/module/plugins/hoster/MyfastfileCom.py
index 1211a532f..f68bfab18 100644
--- a/module/plugins/hoster/MyfastfileCom.py
+++ b/module/plugins/hoster/MyfastfileCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class MyfastfileCom(MultiHoster):
__name__ = "MyfastfileCom"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.10"
__pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/dl/'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -21,14 +21,14 @@ class MyfastfileCom(MultiHoster):
def setup(self):
- self.chunkLimit = -1
+ self.chunk_limit = -1
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
self.html = self.load('http://myfastfile.com/api.php',
get={'user': self.user, 'pass': self.account.getAccountData(self.user)['password'],
'link': pyfile.url})
- self.logDebug("JSON data: " + self.html)
+ self.log_debug("JSON data: " + self.html)
self.html = json_loads(self.html)
if self.html['status'] != 'ok':
diff --git a/module/plugins/hoster/MystoreTo.py b/module/plugins/hoster/MystoreTo.py
index 531368134..1609abf7e 100644
--- a/module/plugins/hoster/MystoreTo.py
+++ b/module/plugins/hoster/MystoreTo.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class MystoreTo(SimpleHoster):
__name__ = "MystoreTo"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'https?://(?:www\.)?mystore\.to/dl/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -27,12 +27,12 @@ class MystoreTo(SimpleHoster):
def setup(self):
- self.chunkLimit = 1
- self.resumeDownload = True
- self.multiDL = True
+ self.chunk_limit = 1
+ self.resume_download = True
+ self.multi_dl = True
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
try:
fid = re.search(r'wert="(.+?)"', self.html).group(1)
diff --git a/module/plugins/hoster/MyvideoDe.py b/module/plugins/hoster/MyvideoDe.py
index 2194069f5..ce43c0764 100644
--- a/module/plugins/hoster/MyvideoDe.py
+++ b/module/plugins/hoster/MyvideoDe.py
@@ -9,7 +9,7 @@ from module.utils import html_unescape
class MyvideoDe(Hoster):
__name__ = "MyvideoDe"
__type__ = "hoster"
- __version__ = "0.91"
+ __version__ = "0.92"
__pattern__ = r'http://(?:www\.)?myvideo\.de/watch/'
diff --git a/module/plugins/hoster/NahrajCz.py b/module/plugins/hoster/NahrajCz.py
index cf708be09..c463fbcfb 100644
--- a/module/plugins/hoster/NahrajCz.py
+++ b/module/plugins/hoster/NahrajCz.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class NahrajCz(DeadHoster):
__name__ = "NahrajCz"
__type__ = "hoster"
- __version__ = "0.21"
+ __version__ = "0.22"
__pattern__ = r'http://(?:www\.)?nahraj\.cz/content/download/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/NarodRu.py b/module/plugins/hoster/NarodRu.py
index 0a44cd6eb..3c3b0d124 100644
--- a/module/plugins/hoster/NarodRu.py
+++ b/module/plugins/hoster/NarodRu.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class NarodRu(SimpleHoster):
__name__ = "NarodRu"
__type__ = "hoster"
- __version__ = "0.12"
+ __version__ = "0.13"
__pattern__ = r'http://(?:www\.)?narod(\.yandex)?\.ru/(disk|start/\d+\.\w+-narod\.yandex\.ru)/(?P<ID>\d+)/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -32,7 +32,7 @@ class NarodRu(SimpleHoster):
LINK_FREE_PATTERN = r'<a class="h-link" rel="yandex_bar" href="(.+?)">'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
for _i in xrange(5):
self.html = self.load('http://narod.ru/disk/getcapchaxml/?rnd=%d' % int(random.random() * 777))
@@ -42,18 +42,18 @@ class NarodRu(SimpleHoster):
post_data = {"action": "sendcapcha"}
captcha_url, post_data['key'] = m.groups()
- post_data['rep'] = self.decryptCaptcha(captcha_url)
+ post_data['rep'] = self.decrypt_captcha(captcha_url)
self.html = self.load(pyfile.url, post=post_data)
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m:
self.link = urlparse.urljoin("http://narod.ru", m.group(1))
- self.correctCaptcha()
+ self.correct_captcha()
break
elif u'<b class="error-msg"><strong>ОшОблОсь?</strong>' in self.html:
- self.invalidCaptcha()
+ self.invalid_captcha()
else:
self.error(_("Download link"))
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py
index 82f5c22fb..208b8fb6a 100644
--- a/module/plugins/hoster/NetloadIn.py
+++ b/module/plugins/hoster/NetloadIn.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class NetloadIn(DeadHoster):
__name__ = "NetloadIn"
__type__ = "hoster"
- __version__ = "0.50"
+ __version__ = "0.51"
__pattern__ = r'https?://(?:www\.)?netload\.(in|me)/(?P<PATH>datei|index\.php\?id=10&file_id=)(?P<ID>\w+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/NitroflareCom.py b/module/plugins/hoster/NitroflareCom.py
index efd54dd62..f60a9c2e2 100644
--- a/module/plugins/hoster/NitroflareCom.py
+++ b/module/plugins/hoster/NitroflareCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster
class NitroflareCom(SimpleHoster):
__name__ = "NitroflareCom"
__type__ = "hoster"
- __version__ = "0.14"
+ __version__ = "0.15"
__pattern__ = r'https?://(?:www\.)?nitroflare\.com/view/(?P<ID>[\w^_]+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -31,7 +31,7 @@ class NitroflareCom(SimpleHoster):
# ERROR_PATTERN = r'downloading is not possible'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
#: used here to load the cookies which will be required later
self.load(pyfile.url, post={'goToFreePage': ""})
@@ -39,7 +39,7 @@ class NitroflareCom(SimpleHoster):
self.html = self.load("http://nitroflare.com/ajax/freeDownload.php",
post={'method': "startTimer", 'fileId': self.info['pattern']['ID']})
- self.checkErrors()
+ self.check_errors()
try:
js_file = self.load("http://nitroflare.com/js/downloadFree.js?v=1.0.1")
@@ -59,4 +59,4 @@ class NitroflareCom(SimpleHoster):
'recaptcha_challenge_field': challenge,
'recaptcha_response_field' : response})
- return super(NitroflareCom, self).handleFree(pyfile)
+ return super(NitroflareCom, self).handle_free(pyfile)
diff --git a/module/plugins/hoster/NoPremiumPl.py b/module/plugins/hoster/NoPremiumPl.py
index e300194a6..9e935cd08 100644
--- a/module/plugins/hoster/NoPremiumPl.py
+++ b/module/plugins/hoster/NoPremiumPl.py
@@ -7,7 +7,7 @@ from module.plugins.internal.MultiHoster import MultiHoster
class NoPremiumPl(MultiHoster):
__name__ = "NoPremiumPl"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'https?://direct\.nopremium\.pl.+'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -44,7 +44,7 @@ class NoPremiumPl(MultiHoster):
self.pwd = data['pwd']
- def runFileQuery(self, url, mode=None):
+ def run_file_query(self, url, mode=None):
query = self.API_QUERY.copy()
query['username'] = self.usr
@@ -55,27 +55,27 @@ class NoPremiumPl(MultiHoster):
query['check'] = 2
query['loc'] = 1
- self.logDebug(query)
+ self.log_debug(query)
return self.load(self.API_URL, post=query)
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
try:
- data = self.runFileQuery(pyfile.url, 'fileinfo')
+ data = self.run_file_query(pyfile.url, 'fileinfo')
except Exception:
- self.logDebug("runFileQuery error")
- self.tempOffline()
+ self.log_debug("runFileQuery error")
+ self.temp_offline()
try:
parsed = json_loads(data)
except Exception:
- self.logDebug("loads error")
- self.tempOffline()
+ self.log_debug("loads error")
+ self.temp_offline()
- self.logDebug(parsed)
+ self.log_debug(parsed)
if "errno" in parsed.keys():
if parsed['errno'] in self.ERROR_CODES:
@@ -98,8 +98,8 @@ class NoPremiumPl(MultiHoster):
pyfile.size = parsed['filesize']
try:
- self.link = self.runFileQuery(pyfile.url, 'filedownload')
+ self.link = self.run_file_query(pyfile.url, 'filedownload')
except Exception:
- self.logDebug("runFileQuery error #2")
- self.tempOffline()
+ self.log_debug("runFileQuery error #2")
+ self.temp_offline()
diff --git a/module/plugins/hoster/NosuploadCom.py b/module/plugins/hoster/NosuploadCom.py
index 4f3f34ddb..922fd7654 100644
--- a/module/plugins/hoster/NosuploadCom.py
+++ b/module/plugins/hoster/NosuploadCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class NosuploadCom(XFSHoster):
__name__ = "NosuploadCom"
__type__ = "hoster"
- __version__ = "0.31"
+ __version__ = "0.32"
__pattern__ = r'http://(?:www\.)?nosupload\.com/\?d=\w{12}'
@@ -23,15 +23,15 @@ class NosuploadCom(XFSHoster):
WAIT_PATTERN = r'Please wait.*?>(\d+)</span>'
- def getDownloadLink(self):
+ def get_download_link(self):
#: stage1: press the "Free Download" button
- data = self.getPostParameters()
+ data = self.get_post_parameters()
self.html = self.load(self.pyfile.url, post=data)
#: stage2: wait some time and press the "Download File" button
- data = self.getPostParameters()
+ data = self.get_post_parameters()
wait_time = re.search(self.WAIT_PATTERN, self.html, re.M | re.S).group(1)
- self.logDebug("Hoster told us to wait %s seconds" % wait_time)
+ self.log_debug("Hoster told us to wait %s seconds" % wait_time)
self.wait(wait_time)
self.html = self.load(self.pyfile.url, post=data)
diff --git a/module/plugins/hoster/NovafileCom.py b/module/plugins/hoster/NovafileCom.py
index b00f71635..8de511ed5 100644
--- a/module/plugins/hoster/NovafileCom.py
+++ b/module/plugins/hoster/NovafileCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class NovafileCom(XFSHoster):
__name__ = "NovafileCom"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'http://(?:www\.)?novafile\.com/\w{12}'
diff --git a/module/plugins/hoster/NowDownloadSx.py b/module/plugins/hoster/NowDownloadSx.py
index 7be699ae4..ef43c7c94 100644
--- a/module/plugins/hoster/NowDownloadSx.py
+++ b/module/plugins/hoster/NowDownloadSx.py
@@ -9,7 +9,7 @@ from module.utils import fixup
class NowDownloadSx(SimpleHoster):
__name__ = "NowDownloadSx"
__type__ = "hoster"
- __version__ = "0.10"
+ __version__ = "0.11"
__pattern__ = r'http://(?:www\.)?(nowdownload\.[a-zA-Z]{2,}/(dl/|download\.php.+?id=|mobile/(#/files/|.+?id=))|likeupload\.org/)\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -32,12 +32,12 @@ class NowDownloadSx(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
- self.chunkLimit = -1
+ self.resume_download = True
+ self.multi_dl = True
+ self.chunk_limit = -1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
tokenlink = re.search(self.TOKEN_PATTERN, self.html)
continuelink = re.search(self.CONTINUE_PATTERN, self.html)
if tokenlink is None or continuelink is None:
diff --git a/module/plugins/hoster/NowVideoSx.py b/module/plugins/hoster/NowVideoSx.py
index 477379597..849a35edd 100644
--- a/module/plugins/hoster/NowVideoSx.py
+++ b/module/plugins/hoster/NowVideoSx.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class NowVideoSx(SimpleHoster):
__name__ = "NowVideoSx"
__type__ = "hoster"
- __version__ = "0.12"
+ __version__ = "0.13"
__pattern__ = r'http://(?:www\.)?nowvideo\.[a-zA-Z]{2,}/(video/|mobile/(#/videos/|.+?id=))(?P<ID>\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -28,11 +28,11 @@ class NowVideoSx(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
+ self.resume_download = True
+ self.multi_dl = True
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.html = self.load("http://www.nowvideo.sx/mobile/video.php", get={'id': self.info['pattern']['ID']})
m = re.search(self.LINK_FREE_PATTERN, self.html)
diff --git a/module/plugins/hoster/OboomCom.py b/module/plugins/hoster/OboomCom.py
index 4f845394a..fb42243c5 100644
--- a/module/plugins/hoster/OboomCom.py
+++ b/module/plugins/hoster/OboomCom.py
@@ -13,7 +13,7 @@ from module.plugins.internal.ReCaptcha import ReCaptcha
class OboomCom(Hoster):
__name__ = "OboomCom"
__type__ = "hoster"
- __version__ = "0.34"
+ __version__ = "0.35"
__pattern__ = r'https?://(?:www\.)?oboom\.com/(?:#(?:id=|/)?)?(?P<ID>\w{8})'
@@ -26,52 +26,52 @@ class OboomCom(Hoster):
def setup(self):
- self.chunkLimit = 1
- self.multiDL = self.resumeDownload = self.premium
+ self.chunk_limit = 1
+ self.multi_dl = self.resume_download = self.premium
def process(self, pyfile):
self.pyfile.url.replace(".com/#id=", ".com/#")
self.pyfile.url.replace(".com/#/", ".com/#")
self.html = self.load(pyfile.url)
- self.getFileId(self.pyfile.url)
- self.getSessionToken()
- self.getFileInfo(self.sessionToken, self.fileId)
- self.pyfile.name = self.fileName
- self.pyfile.size = self.fileSize
+ self.get_file_id(self.pyfile.url)
+ self.get_session_token()
+ self.getFileInfo(self.session_token, self.file_id)
+ self.pyfile.name = self.file_name
+ self.pyfile.size = self.file_size
if not self.premium:
- self.solveCaptcha()
- self.getDownloadTicket()
- self.download("https://%s/1.0/dlh" % self.downloadDomain, get={"ticket": self.downloadTicket, "http_errors": 0})
+ self.solve_captcha()
+ self.get_download_ticket()
+ self.download("https://%s/1.0/dlh" % self.download_domain, get={"ticket": self.download_ticket, "http_errors": 0})
- def loadUrl(self, url, get=None):
+ def load_url(self, url, get=None):
if get is None:
get = dict()
return json_loads(self.load(url, get))
- def getFileId(self, url):
- self.fileId = re.match(OboomCom.__pattern__, url).group('ID')
+ def get_file_id(self, url):
+ self.file_id = re.match(OboomCom.__pattern__, url).group('ID')
- def getSessionToken(self):
+ def get_session_token(self):
if self.premium:
accountInfo = self.account.getAccountInfo(self.user, True)
if "session" in accountInfo:
- self.sessionToken = accountInfo['session']
+ self.session_token = accountInfo['session']
else:
self.fail(_("Could not retrieve premium session"))
else:
apiUrl = "https://www.oboom.com/1.0/guestsession"
- result = self.loadUrl(apiUrl)
+ result = self.load_url(apiUrl)
if result[0] == 200:
- self.sessionToken = result[1]
+ self.session_token = result[1]
else:
self.fail(_("Could not retrieve token for guest session. Error code: %s") % result[0])
- def solveCaptcha(self):
+ def solve_captcha(self):
recaptcha = ReCaptcha(self)
for _i in xrange(5):
@@ -79,35 +79,35 @@ class OboomCom(Hoster):
apiUrl = "https://www.oboom.com/1.0/download/ticket"
params = {"recaptcha_challenge_field": challenge,
"recaptcha_response_field": response,
- "download_id": self.fileId,
- "token": self.sessionToken}
- result = self.loadUrl(apiUrl, params)
+ "download_id": self.file_id,
+ "token": self.session_token}
+ result = self.load_url(apiUrl, params)
if result[0] == 200:
- self.downloadToken = result[1]
- self.downloadAuth = result[2]
- self.correctCaptcha()
- self.setWait(30)
+ self.download_token = result[1]
+ self.download_auth = result[2]
+ self.correct_captcha()
+ self.set_wait(30)
self.wait()
break
elif result[0] == 400:
if result[1] == "incorrect-captcha-sol":
- self.invalidCaptcha()
+ self.invalid_captcha()
elif result[1] == "captcha-timeout":
- self.invalidCaptcha()
+ self.invalid_captcha()
elif result[1] == "forbidden":
self.retry(5, 15 * 60, _("Service unavailable"))
elif result[0] == 403:
if result[1] == -1: #: another download is running
- self.setWait(15 * 60)
+ self.set_wait(15 * 60)
else:
- self.setWait(result[1], True)
+ self.set_wait(result[1], True)
self.wait()
self.retry(5)
else:
- self.invalidCaptcha()
+ self.invalid_captcha()
self.fail(_("Received invalid captcha 5 times"))
@@ -115,31 +115,31 @@ class OboomCom(Hoster):
apiUrl = "https://api.oboom.com/1.0/info"
params = {"token": token, "items": fileId, "http_errors": 0}
- result = self.loadUrl(apiUrl, params)
+ result = self.load_url(apiUrl, params)
if result[0] == 200:
item = result[1][0]
if item['state'] == "online":
- self.fileSize = item['size']
- self.fileName = item['name']
+ self.file_size = item['size']
+ self.file_name = item['name']
else:
self.offline()
else:
self.fail(_("Could not retrieve file info. Error code %s: %s") % (result[0], result[1]))
- def getDownloadTicket(self):
+ def get_download_ticket(self):
apiUrl = "https://api.oboom.com/1/dl"
- params = {"item": self.fileId, "http_errors": 0}
+ params = {"item": self.file_id, "http_errors": 0}
if self.premium:
- params['token'] = self.sessionToken
+ params['token'] = self.session_token
else:
- params['token'] = self.downloadToken
- params['auth'] = self.downloadAuth
+ params['token'] = self.download_token
+ params['auth'] = self.download_auth
- result = self.loadUrl(apiUrl, params)
+ result = self.load_url(apiUrl, params)
if result[0] == 200:
- self.downloadDomain = result[1]
- self.downloadTicket = result[2]
+ self.download_domain = result[1]
+ self.download_ticket = result[2]
elif result[0] == 421:
self.retry(wait_time=result[2] + 60, reason=_("Connection limit exceeded"))
else:
diff --git a/module/plugins/hoster/OneFichierCom.py b/module/plugins/hoster/OneFichierCom.py
index 4b947c554..5ea400b8d 100644
--- a/module/plugins/hoster/OneFichierCom.py
+++ b/module/plugins/hoster/OneFichierCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class OneFichierCom(SimpleHoster):
__name__ = "OneFichierCom"
__type__ = "hoster"
- __version__ = "0.84"
+ __version__ = "0.85"
__pattern__ = r'https?://(?:www\.)?(?:(?P<ID1>\w+)\.)?(?P<HOST>1fichier\.com|alterupload\.com|cjoint\.net|d(es)?fichiers\.com|dl4free\.com|megadl\.fr|mesfichiers\.org|piecejointe\.net|pjointe\.com|tenvoi\.com)(?:/\?(?P<ID2>\w+))?'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -36,26 +36,26 @@ class OneFichierCom(SimpleHoster):
def setup(self):
- self.multiDL = self.premium
- self.resumeDownload = True
+ self.multi_dl = self.premium
+ self.resume_download = True
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
id = self.info['pattern']['ID1'] or self.info['pattern']['ID2']
- url, inputs = self.parseHtmlForm('action="https://1fichier.com/\?%s' % id)
+ url, inputs = self.parse_html_form('action="https://1fichier.com/\?%s' % id)
if not url:
self.fail(_("Download link not found"))
if "pass" in inputs:
- inputs['pass'] = self.getPassword()
+ inputs['pass'] = self.get_password()
inputs['submit'] = "Download"
self.download(url, post=inputs)
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
self.download(pyfile.url, post={'dl': "Download", 'did': 0})
diff --git a/module/plugins/hoster/OpenloadIo.py b/module/plugins/hoster/OpenloadIo.py
index 5a60b6787..fbdb95383 100644
--- a/module/plugins/hoster/OpenloadIo.py
+++ b/module/plugins/hoster/OpenloadIo.py
@@ -6,7 +6,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class OpenloadIo(SimpleHoster):
__name__ = "OpenloadIo"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'https?://(?:www\.)?openload\.io/f/\w{11}'
@@ -20,7 +20,7 @@ class OpenloadIo(SimpleHoster):
LINK_FREE_PATTERN = r'id="realdownload"><a href="(https?://[\w\.]+\.openload\.io/dl/.*?)"'
def setup(self):
- self.multiDL = True
- self.chunkLimit = 1
+ self.multi_dl = True
+ self.chunk_limit = 1
getInfo = create_getInfo(OpenloadIo)
diff --git a/module/plugins/hoster/OronCom.py b/module/plugins/hoster/OronCom.py
index 2e4961704..b3527e439 100644
--- a/module/plugins/hoster/OronCom.py
+++ b/module/plugins/hoster/OronCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class OronCom(DeadHoster):
__name__ = "OronCom"
__type__ = "hoster"
- __version__ = "0.14"
+ __version__ = "0.15"
__pattern__ = r'https?://(?:www\.)?oron\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/OverLoadMe.py b/module/plugins/hoster/OverLoadMe.py
index 944d4c664..ab0440a2e 100644
--- a/module/plugins/hoster/OverLoadMe.py
+++ b/module/plugins/hoster/OverLoadMe.py
@@ -11,7 +11,7 @@ from module.utils import parseFileSize
class OverLoadMe(MultiHoster):
__name__ = "OverLoadMe"
__type__ = "hoster"
- __version__ = "0.12"
+ __version__ = "0.13"
__pattern__ = r'https?://.*overload\.me/.+'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -23,10 +23,10 @@ class OverLoadMe(MultiHoster):
def setup(self):
- self.chunkLimit = 5
+ self.chunk_limit = 5
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
data = self.account.getAccountData(self.user)
page = self.load("https://api.over-load.me/getdownload.php",
get={'auth': data['password'],
@@ -34,11 +34,11 @@ class OverLoadMe(MultiHoster):
data = json_loads(page)
- self.logDebug(data)
+ self.log_debug(data)
if data['error'] == 1:
- self.logWarning(data['msg'])
- self.tempOffline()
+ self.log_warning(data['msg'])
+ self.temp_offline()
else:
self.link = data['downloadlink']
if pyfile.name and pyfile.name.endswith('.tmp') and data['filename']:
diff --git a/module/plugins/hoster/PandaplaNet.py b/module/plugins/hoster/PandaplaNet.py
index ae8406d82..3f088081e 100644
--- a/module/plugins/hoster/PandaplaNet.py
+++ b/module/plugins/hoster/PandaplaNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class PandaplaNet(DeadHoster):
__name__ = "PandaplaNet"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'http://(?:www\.)?pandapla\.net/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/PornhostCom.py b/module/plugins/hoster/PornhostCom.py
index 708abf40a..cf3d39f29 100644
--- a/module/plugins/hoster/PornhostCom.py
+++ b/module/plugins/hoster/PornhostCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Hoster import Hoster
class PornhostCom(Hoster):
__name__ = "PornhostCom"
__type__ = "hoster"
- __version__ = "0.21"
+ __version__ = "0.22"
__pattern__ = r'http://(?:www\.)?pornhost\.com/(\d+/\d+\.html|\d+)'
diff --git a/module/plugins/hoster/PornhubCom.py b/module/plugins/hoster/PornhubCom.py
index 92119df56..ad0eebb28 100644
--- a/module/plugins/hoster/PornhubCom.py
+++ b/module/plugins/hoster/PornhubCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Hoster import Hoster
class PornhubCom(Hoster):
__name__ = "PornhubCom"
__type__ = "hoster"
- __version__ = "0.51"
+ __version__ = "0.52"
__pattern__ = r'http://(?:www\.)?pornhub\.com/view_video\.php\?viewkey=\w+'
diff --git a/module/plugins/hoster/PotloadCom.py b/module/plugins/hoster/PotloadCom.py
index 5a41f7d3c..654ae8e1b 100644
--- a/module/plugins/hoster/PotloadCom.py
+++ b/module/plugins/hoster/PotloadCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class PotloadCom(DeadHoster):
__name__ = "PotloadCom"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'http://(?:www\.)?potload\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/PremiumTo.py b/module/plugins/hoster/PremiumTo.py
index 082f17474..aeeef2847 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.24"
+ __version__ = "0.25"
__pattern__ = r'^unmatchable$'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -27,8 +27,8 @@ class PremiumTo(MultiHoster):
CHECK_TRAFFIC = True
- def handlePremium(self, pyfile):
- #raise timeout to 2min
+ def handle_premium(self, pyfile):
+ # raise timeout to 2min
self.download("http://premium.to/api/getfile.php",
get={'username': self.account.username,
'password': self.account.password,
@@ -36,14 +36,14 @@ class PremiumTo(MultiHoster):
disposition=True)
- def checkFile(self):
- if self.checkDownload({'nopremium': "No premium account available"}):
+ def check_file(self):
+ if self.check_download({'nopremium': "No premium account available"}):
self.retry(60, 5 * 60, "No premium account available")
err = ''
if self.req.http.code == '420':
#: Custom error code send - fail
- file = fs_encode(self.lastDownload)
+ file = fs_encode(self.last_download)
with open(file, "rb") as f:
err = f.read(256).strip()
os.remove(file)
diff --git a/module/plugins/hoster/PremiumizeMe.py b/module/plugins/hoster/PremiumizeMe.py
index bfd78853b..e87742839 100644
--- a/module/plugins/hoster/PremiumizeMe.py
+++ b/module/plugins/hoster/PremiumizeMe.py
@@ -7,7 +7,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class PremiumizeMe(MultiHoster):
__name__ = "PremiumizeMe"
__type__ = "hoster"
- __version__ = "0.18"
+ __version__ = "0.19"
__pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -18,7 +18,7 @@ class PremiumizeMe(MultiHoster):
__authors__ = [("Florian Franzen", "FlorianFranzen@gmail.com")]
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
#: In some cases hostsers do not supply us with a filename at download, so we
#: are going to set a fall back filename (e.g. for freakshare or xfileshare)
pyfile.name = pyfile.name.split('/').pop() #: Remove everthing before last slash
@@ -53,7 +53,7 @@ class PremiumizeMe(MultiHoster):
self.offline()
elif status >= 500:
- self.tempOffline()
+ self.temp_offline()
else:
self.fail(data['statusmessage'])
diff --git a/module/plugins/hoster/PromptfileCom.py b/module/plugins/hoster/PromptfileCom.py
index c6878cbb0..ddfce8e19 100644
--- a/module/plugins/hoster/PromptfileCom.py
+++ b/module/plugins/hoster/PromptfileCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class PromptfileCom(SimpleHoster):
__name__ = "PromptfileCom"
__type__ = "hoster"
- __version__ = "0.13"
+ __version__ = "0.14"
__pattern__ = r'https?://(?:www\.)?promptfile\.com/'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -25,20 +25,20 @@ class PromptfileCom(SimpleHoster):
LINK_FREE_PATTERN = r'<a href=\"(.+)\" target=\"_blank\" class=\"view_dl_link\">Download File</a>'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
# STAGE 1: get link to continue
m = re.search(self.CHASH_PATTERN, self.html)
if m is None:
self.error(_("CHASH_PATTERN not found"))
chash = m.group(1)
- self.logDebug("Read chash %s" % chash)
+ self.log_debug("Read chash %s" % chash)
#: continue to stage2
self.html = self.load(pyfile.url, post={'chash': chash})
# STAGE 2: get the direct link
- return super(PromptfileCom, self).handleFree(pyfile)
+ return super(PromptfileCom, self).handle_free(pyfile)
getInfo = create_getInfo(PromptfileCom)
diff --git a/module/plugins/hoster/PrzeklejPl.py b/module/plugins/hoster/PrzeklejPl.py
index e984d0033..591428757 100644
--- a/module/plugins/hoster/PrzeklejPl.py
+++ b/module/plugins/hoster/PrzeklejPl.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class PrzeklejPl(DeadHoster):
__name__ = "PrzeklejPl"
__type__ = "hoster"
- __version__ = "0.11"
+ __version__ = "0.12"
__pattern__ = r'http://(?:www\.)?przeklej\.pl/plik/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/PutdriveCom.py b/module/plugins/hoster/PutdriveCom.py
index 7f4b7b6cc..a04b43cdb 100644
--- a/module/plugins/hoster/PutdriveCom.py
+++ b/module/plugins/hoster/PutdriveCom.py
@@ -6,7 +6,7 @@ from module.plugins.hoster.ZeveraCom import ZeveraCom
class PutdriveCom(ZeveraCom):
__name__ = "PutdriveCom"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'https?://(?:www\.)putdrive\.com/(getFiles\.ashx|Members/download\.ashx)\?.*ourl=.+'
diff --git a/module/plugins/hoster/QuickshareCz.py b/module/plugins/hoster/QuickshareCz.py
index 26bb1e2df..e9cfdb085 100644
--- a/module/plugins/hoster/QuickshareCz.py
+++ b/module/plugins/hoster/QuickshareCz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class QuickshareCz(SimpleHoster):
__name__ = "QuickshareCz"
__type__ = "hoster"
- __version__ = "0.56"
+ __version__ = "0.57"
__pattern__ = r'http://(?:[^/]*\.)?quickshare\.cz/stahnout-soubor/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -30,34 +30,34 @@ class QuickshareCz(SimpleHoster):
#: parse js variables
self.jsvars = dict((x, y.strip("'")) for x, y in re.findall(r"var (\w+) = ([\d.]+|'.+?')", self.html))
- self.logDebug(self.jsvars)
+ self.log_debug(self.jsvars)
pyfile.name = self.jsvars['ID3']
#: determine download type - free or premium
if self.premium:
if 'UU_prihlasen' in self.jsvars:
if self.jsvars['UU_prihlasen'] == '0':
- self.logWarning(_("User not logged in"))
+ self.log_warning(_("User not logged in"))
self.relogin(self.user)
self.retry()
elif float(self.jsvars['UU_kredit']) < float(self.jsvars['kredit_odecet']):
- self.logWarning(_("Not enough credit left"))
+ self.log_warning(_("Not enough credit left"))
self.premium = False
if self.premium:
- self.handlePremium(pyfile)
+ self.handle_premium(pyfile)
else:
- self.handleFree(pyfile)
+ self.handle_free(pyfile)
- if self.checkDownload({"error": re.compile(r"\AChyba!")}, max_size=100):
+ if self.check_download({"error": re.compile(r"\AChyba!")}, max_size=100):
self.fail(_("File not m or plugin defect"))
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
#: get download url
download_url = '%s/download.php' % self.jsvars['server']
data = dict((x, self.jsvars[x]) for x in self.jsvars if x in ("ID1", "ID2", "ID3", "ID4"))
- self.logDebug("FREE URL1:" + download_url, data)
+ self.log_debug("FREE URL1:" + download_url, data)
self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0)
self.load(download_url, post=data)
@@ -69,7 +69,7 @@ class QuickshareCz(SimpleHoster):
self.fail(_("File not found"))
self.link = m.group(1).rstrip() #@TODO: Remove .rstrip() in 0.4.10
- self.logDebug("FREE URL2:" + self.link)
+ self.log_debug("FREE URL2:" + self.link)
#: check errors
m = re.search(r'/chyba/(\d+)', self.link)
@@ -82,7 +82,7 @@ class QuickshareCz(SimpleHoster):
self.fail(_("Error %d") % m.group(1))
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
download_url = '%s/download_premium.php' % self.jsvars['server']
data = dict((x, self.jsvars[x]) for x in self.jsvars if x in ("ID1", "ID2", "ID4", "ID5"))
self.download(download_url, get=data)
diff --git a/module/plugins/hoster/RPNetBiz.py b/module/plugins/hoster/RPNetBiz.py
index 2e6271ac6..a548e1670 100644
--- a/module/plugins/hoster/RPNetBiz.py
+++ b/module/plugins/hoster/RPNetBiz.py
@@ -9,7 +9,7 @@ from module.common.json_layer import json_loads
class RPNetBiz(MultiHoster):
__name__ = "RPNetBiz"
__type__ = "hoster"
- __version__ = "0.15"
+ __version__ = "0.16"
__pattern__ = r'https?://.+rpnet\.biz'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -21,10 +21,10 @@ class RPNetBiz(MultiHoster):
def setup(self):
- self.chunkLimit = -1
+ self.chunk_limit = -1
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
user, data = self.account.selectAccount()
#: Get the download link
@@ -34,36 +34,36 @@ class RPNetBiz(MultiHoster):
"action" : "generate",
"links" : pyfile.url})
- self.logDebug("JSON data: %s" % res)
+ self.log_debug("JSON data: %s" % res)
link_status = json_loads(res)['links'][0] #: get the first link... since we only queried one
#: Check if we only have an id as a HDD link
if 'id' in link_status:
- self.logDebug("Need to wait at least 30 seconds before requery")
- self.setWait(30) #: wait for 30 seconds
+ self.log_debug("Need to wait at least 30 seconds before requery")
+ self.set_wait(30) #: wait for 30 seconds
self.wait()
#: Lets query the server again asking for the status on the link,
#: we need to keep doing this until we reach 100
max_tries = 30
my_try = 0
while (my_try <= max_tries):
- self.logDebug("Try: %d ; Max Tries: %d" % (my_try, max_tries))
+ self.log_debug("Try: %d ; Max Tries: %d" % (my_try, max_tries))
res = self.load("https://premium.rpnet.biz/client_api.php",
get={"username": user,
"password": data['password'],
"action": "downloadInformation",
"id": link_status['id']})
- self.logDebug("JSON data hdd query: %s" % res)
+ self.log_debug("JSON data hdd query: %s" % res)
download_status = json_loads(res)['download']
if download_status['status'] == '100':
link_status['generated'] = download_status['rpnet_link']
- self.logDebug("Successfully downloaded to rpnet HDD: %s" % link_status['generated'])
+ self.log_debug("Successfully downloaded to rpnet HDD: %s" % link_status['generated'])
break
else:
- self.logDebug("At %s%% for the file download" % download_status['status'])
+ self.log_debug("At %s%% for the file download" % download_status['status'])
- self.setWait(30)
+ self.set_wait(30)
self.wait()
my_try += 1
diff --git a/module/plugins/hoster/RapideoPl.py b/module/plugins/hoster/RapideoPl.py
index dc6e9253e..a9a0b354a 100644
--- a/module/plugins/hoster/RapideoPl.py
+++ b/module/plugins/hoster/RapideoPl.py
@@ -7,7 +7,7 @@ from module.plugins.internal.MultiHoster import MultiHoster
class RapideoPl(MultiHoster):
__name__ = "RapideoPl"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'^unmatchable$'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -44,7 +44,7 @@ class RapideoPl(MultiHoster):
self.pwd = data['pwd']
- def runFileQuery(self, url, mode=None):
+ def run_file_query(self, url, mode=None):
query = self.API_QUERY.copy()
query['username'] = self.usr
@@ -55,27 +55,27 @@ class RapideoPl(MultiHoster):
query['check'] = 2
query['loc'] = 1
- self.logDebug(query)
+ self.log_debug(query)
return self.load(self.API_URL, post=query)
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
try:
- data = self.runFileQuery(pyfile.url, 'fileinfo')
+ data = self.run_file_query(pyfile.url, 'fileinfo')
except Exception:
- self.logDebug("RunFileQuery error")
- self.tempOffline()
+ self.log_debug("RunFileQuery error")
+ self.temp_offline()
try:
parsed = json_loads(data)
except Exception:
- self.logDebug("Loads error")
- self.tempOffline()
+ self.log_debug("Loads error")
+ self.temp_offline()
- self.logDebug(parsed)
+ self.log_debug(parsed)
if "errno" in parsed.keys():
if parsed['errno'] in self.ERROR_CODES:
@@ -98,8 +98,8 @@ class RapideoPl(MultiHoster):
pyfile.size = parsed['filesize']
try:
- self.link = self.runFileQuery(pyfile.url, 'filedownload')
+ self.link = self.run_file_query(pyfile.url, 'filedownload')
except Exception:
- self.logDebug("runFileQuery error #2")
- self.tempOffline()
+ self.log_debug("runFileQuery error #2")
+ self.temp_offline()
diff --git a/module/plugins/hoster/RapidfileshareNet.py b/module/plugins/hoster/RapidfileshareNet.py
index 0bbaed57f..b10cf9aff 100644
--- a/module/plugins/hoster/RapidfileshareNet.py
+++ b/module/plugins/hoster/RapidfileshareNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class RapidfileshareNet(XFSHoster):
__name__ = "RapidfileshareNet"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'http://(?:www\.)?rapidfileshare\.net/\w{12}'
diff --git a/module/plugins/hoster/RapidgatorNet.py b/module/plugins/hoster/RapidgatorNet.py
index e5298726c..b2962af10 100644
--- a/module/plugins/hoster/RapidgatorNet.py
+++ b/module/plugins/hoster/RapidgatorNet.py
@@ -14,7 +14,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class RapidgatorNet(SimpleHoster):
__name__ = "RapidgatorNet"
__type__ = "hoster"
- __version__ = "0.34"
+ __version__ = "0.35"
__pattern__ = r'http://(?:www\.)?(rapidgator\.net|rg\.to)/file/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -57,8 +57,8 @@ class RapidgatorNet(SimpleHoster):
if self.sid:
self.premium = True
- self.resumeDownload = self.multiDL = self.premium
- self.chunkLimit = 1
+ self.resume_download = self.multi_dl = self.premium
+ self.chunk_limit = 1
def api_response(self, cmd):
@@ -66,13 +66,13 @@ class RapidgatorNet(SimpleHoster):
json = self.load('%s/%s' % (self.API_URL, cmd),
get={'sid': self.sid,
'url': self.pyfile.url})
- self.logDebug("API:%s" % cmd, json, "SID: %s" % self.sid)
+ self.log_debug("API:%s" % cmd, json, "SID: %s" % self.sid)
json = json_loads(json)
status = json['response_status']
msg = json['response_details']
except BadHeader, e:
- self.logError("API: %s" % cmd, e, "SID: %s" % self.sid)
+ self.log_error("API: %s" % cmd, e, "SID: %s" % self.sid)
status = e.code
msg = e
@@ -88,7 +88,7 @@ class RapidgatorNet(SimpleHoster):
self.retry(wait_time=60)
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
self.api_data = self.api_response('info')
self.api_data['md5'] = self.api_data['hash']
@@ -98,22 +98,22 @@ class RapidgatorNet(SimpleHoster):
self.link = self.api_response('download')['url']
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
jsvars = dict(re.findall(self.JSVARS_PATTERN, self.html))
- self.logDebug(jsvars)
+ self.log_debug(jsvars)
self.req.http.lastURL = pyfile.url
self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"])
url = "http://rapidgator.net%s?fid=%s" % (
jsvars.get('startTimerUrl', '/download/AjaxStartTimer'), jsvars['fid'])
- jsvars.update(self.getJsonResponse(url))
+ jsvars.update(self.get_json_response(url))
self.wait(jsvars.get('secs', 45), False)
url = "http://rapidgator.net%s?sid=%s" % (
jsvars.get('getDownloadUrl', '/download/AjaxGetDownload'), jsvars['sid'])
- jsvars.update(self.getJsonResponse(url))
+ jsvars.update(self.get_json_response(url))
self.req.http.lastURL = pyfile.url
self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With:"])
@@ -127,7 +127,7 @@ class RapidgatorNet(SimpleHoster):
self.link = m.group(1)
break
else:
- captcha = self.handleCaptcha()
+ captcha = self.handle_captcha()
if not captcha:
self.error(_("Captcha pattern not found"))
@@ -139,25 +139,25 @@ class RapidgatorNet(SimpleHoster):
'adcopy_response' : response})
if "The verification code is incorrect" in self.html:
- self.invalidCaptcha()
+ self.invalid_captcha()
else:
- self.correctCaptcha()
+ self.correct_captcha()
else:
self.error(_("Download link"))
- def handleCaptcha(self):
+ def handle_captcha(self):
for klass in (AdsCaptcha, ReCaptcha, SolveMedia):
inst = klass(self)
if inst.detect_key():
return inst
- def getJsonResponse(self, url):
+ def get_json_response(self, url):
res = self.load(url)
if not res.startswith('{'):
self.retry()
- self.logDebug(url, res)
+ self.log_debug(url, res)
return json_loads(res)
diff --git a/module/plugins/hoster/RapiduNet.py b/module/plugins/hoster/RapiduNet.py
index f2f1abfb7..30e453b93 100644
--- a/module/plugins/hoster/RapiduNet.py
+++ b/module/plugins/hoster/RapiduNet.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class RapiduNet(SimpleHoster):
__name__ = "RapiduNet"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.10"
__pattern__ = r'https?://(?:www\.)?rapidu\.net/(?P<ID>\d{10})'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -33,22 +33,22 @@ class RapiduNet(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = self.premium
+ self.resume_download = True
+ self.multi_dl = self.premium
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.req.http.lastURL = pyfile.url
self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"])
- jsvars = self.getJsonResponse("https://rapidu.net/ajax.php",
+ jsvars = self.get_json_response("https://rapidu.net/ajax.php",
get={'a': "getLoadTimeToDownload"},
post={'_go': ""})
if str(jsvars['timeToDownload']) is "stop":
t = (24 * 60 * 60) - (int(time.time()) % (24 * 60 * 60)) + time.altzone
- self.logInfo("You've reach your daily download transfer")
+ self.log_info("You've reach your daily download transfer")
self.retry(10, 10 if t < 1 else None, _("Try tomorrow again")) #@NOTE: check t in case of not synchronised clock
@@ -58,7 +58,7 @@ class RapiduNet(SimpleHoster):
recaptcha = ReCaptcha(self)
response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY)
- jsvars = self.getJsonResponse("https://rapidu.net/ajax.php",
+ jsvars = self.get_json_response("https://rapidu.net/ajax.php",
get={'a': "getCheckCaptcha"},
post={'_go' : "",
'captcha1': challenge,
@@ -69,12 +69,12 @@ class RapiduNet(SimpleHoster):
self.link = jsvars['url']
- def getJsonResponse(self, *args, **kwargs):
+ def get_json_response(self, *args, **kwargs):
res = self.load(*args, **kwargs)
if not res.startswith('{'):
self.retry()
- self.logDebug(res)
+ self.log_debug(res)
return json_loads(res)
diff --git a/module/plugins/hoster/RarefileNet.py b/module/plugins/hoster/RarefileNet.py
index a45e4ed4d..e3ac29b7d 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.09"
+ __version__ = "0.10"
__pattern__ = r'http://(?:www\.)?rarefile\.net/\w{12}'
diff --git a/module/plugins/hoster/RealdebridCom.py b/module/plugins/hoster/RealdebridCom.py
index 54cd54008..812598f77 100644
--- a/module/plugins/hoster/RealdebridCom.py
+++ b/module/plugins/hoster/RealdebridCom.py
@@ -12,7 +12,7 @@ from module.utils import parseFileSize
class RealdebridCom(MultiHoster):
__name__ = "RealdebridCom"
__type__ = "hoster"
- __version__ = "0.68"
+ __version__ = "0.69"
__pattern__ = r'https?://((?:www\.|s\d+\.)?real-debrid\.com/dl/|[\w^_]\.rdb\.so/d/)[\w^_]+'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -24,24 +24,24 @@ class RealdebridCom(MultiHoster):
def setup(self):
- self.chunkLimit = 3
+ self.chunk_limit = 3
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
data = json_loads(self.load("https://real-debrid.com/ajax/unrestrict.php",
get={'lang' : "en",
'link' : pyfile.url,
- 'password': self.getPassword(),
+ 'password': self.get_password(),
'time' : int(time.time() * 1000)}))
- self.logDebug("Returned Data: %s" % data)
+ self.log_debug("Returned Data: %s" % data)
if data['error'] != 0:
if data['message'] == "Your file is unavailable on the hoster.":
self.offline()
else:
- self.logWarning(data['message'])
- self.tempOffline()
+ self.log_warning(data['message'])
+ self.temp_offline()
else:
if pyfile.name and pyfile.name.endswith('.tmp') and data['file_name']:
pyfile.name = data['file_name']
diff --git a/module/plugins/hoster/RedtubeCom.py b/module/plugins/hoster/RedtubeCom.py
index 15ce3b2b1..43647b8cf 100644
--- a/module/plugins/hoster/RedtubeCom.py
+++ b/module/plugins/hoster/RedtubeCom.py
@@ -9,7 +9,7 @@ from module.utils import html_unescape
class RedtubeCom(Hoster):
__name__ = "RedtubeCom"
__type__ = "hoster"
- __version__ = "0.21"
+ __version__ = "0.22"
__pattern__ = r'http://(?:www\.)?redtube\.com/\d+'
diff --git a/module/plugins/hoster/RehostTo.py b/module/plugins/hoster/RehostTo.py
index 54778ef00..f3a011067 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.22"
+ __version__ = "0.23"
__pattern__ = r'https?://.*rehost\.to\..+'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -19,7 +19,7 @@ class RehostTo(MultiHoster):
__authors__ = [("RaNaN", "RaNaN@pyload.org")]
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
self.download("http://rehost.to/process_download.php",
get={'user': "cookie",
'pass': self.account.getAccountInfo(self.user)['session'],
diff --git a/module/plugins/hoster/RemixshareCom.py b/module/plugins/hoster/RemixshareCom.py
index d60101aed..78b88459b 100644
--- a/module/plugins/hoster/RemixshareCom.py
+++ b/module/plugins/hoster/RemixshareCom.py
@@ -16,7 +16,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class RemixshareCom(SimpleHoster):
__name__ = "RemixshareCom"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'https?://remixshare\.com/(download|dl)/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -39,11 +39,11 @@ class RemixshareCom(SimpleHoster):
def setup(self):
- self.multiDL = True
- self.chunkLimit = 1
+ self.multi_dl = True
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
b = re.search(self.LINK_PATTERN, self.html)
if not b:
self.error(_("File url"))
diff --git a/module/plugins/hoster/RgHostNet.py b/module/plugins/hoster/RgHostNet.py
index 1a45def44..bc6f4f9ce 100644
--- a/module/plugins/hoster/RgHostNet.py
+++ b/module/plugins/hoster/RgHostNet.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class RgHostNet(SimpleHoster):
__name__ = "RgHostNet"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__pattern__ = r'http://(?:www\.)?rghost\.(net|ru)/[\d-]+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
diff --git a/module/plugins/hoster/SafesharingEu.py b/module/plugins/hoster/SafesharingEu.py
index 08612e413..cfea37016 100644
--- a/module/plugins/hoster/SafesharingEu.py
+++ b/module/plugins/hoster/SafesharingEu.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class SafesharingEu(XFSHoster):
__name__ = "SafesharingEu"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'https?://(?:www\.)?safesharing\.eu/\w{12}'
diff --git a/module/plugins/hoster/SecureUploadEu.py b/module/plugins/hoster/SecureUploadEu.py
index 6bfbce328..80892932e 100644
--- a/module/plugins/hoster/SecureUploadEu.py
+++ b/module/plugins/hoster/SecureUploadEu.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class SecureUploadEu(XFSHoster):
__name__ = "SecureUploadEu"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'https?://(?:www\.)?secureupload\.eu/\w{12}'
diff --git a/module/plugins/hoster/SendspaceCom.py b/module/plugins/hoster/SendspaceCom.py
index 0ab20949d..e645bb604 100644
--- a/module/plugins/hoster/SendspaceCom.py
+++ b/module/plugins/hoster/SendspaceCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class SendspaceCom(SimpleHoster):
__name__ = "SendspaceCom"
__type__ = "hoster"
- __version__ = "0.17"
+ __version__ = "0.18"
__pattern__ = r'https?://(?:www\.)?sendspace\.com/file/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -28,30 +28,30 @@ class SendspaceCom(SimpleHoster):
USER_CAPTCHA_PATTERN = r'<td><img src="/captchas/captcha\.php?user=(.+?))"></td>'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
params = {}
for _i in xrange(3):
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m:
if 'captcha_hash' in params:
- self.correctCaptcha()
+ self.correct_captcha()
self.link = m.group(1)
break
m = re.search(self.CAPTCHA_PATTERN, self.html)
if m:
if 'captcha_hash' in params:
- self.invalidCaptcha()
+ self.invalid_captcha()
captcha_url1 = "http://www.sendspace.com/" + m.group(1)
m = re.search(self.USER_CAPTCHA_PATTERN, self.html)
captcha_url2 = "http://www.sendspace.com/" + m.group(1)
params = {'captcha_hash': m.group(2),
'captcha_submit': 'Verify',
- 'captcha_answer': self.decryptCaptcha(captcha_url1) + " " + self.decryptCaptcha(captcha_url2)}
+ 'captcha_answer': self.decrypt_captcha(captcha_url1) + " " + self.decrypt_captcha(captcha_url2)}
else:
params = {'download': "Regular Download"}
- self.logDebug(params)
+ self.log_debug(params)
self.html = self.load(pyfile.url, post=params)
else:
self.fail(_("Download link not found"))
diff --git a/module/plugins/hoster/Share4WebCom.py b/module/plugins/hoster/Share4WebCom.py
index 7a276c1fe..5d9c8ea97 100644
--- a/module/plugins/hoster/Share4WebCom.py
+++ b/module/plugins/hoster/Share4WebCom.py
@@ -7,7 +7,7 @@ from module.plugins.internal.SimpleHoster import create_getInfo
class Share4WebCom(UnibytesCom):
__name__ = "Share4WebCom"
__type__ = "hoster"
- __version__ = "0.11"
+ __version__ = "0.12"
__pattern__ = r'https?://(?:www\.)?share4web\.com/get/\w+'
diff --git a/module/plugins/hoster/Share76Com.py b/module/plugins/hoster/Share76Com.py
index 4a4af1672..510adaf49 100644
--- a/module/plugins/hoster/Share76Com.py
+++ b/module/plugins/hoster/Share76Com.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class Share76Com(DeadHoster):
__name__ = "Share76Com"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__pattern__ = r'http://(?:www\.)?share76\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/ShareFilesCo.py b/module/plugins/hoster/ShareFilesCo.py
index d9a71d786..288cd08e4 100644
--- a/module/plugins/hoster/ShareFilesCo.py
+++ b/module/plugins/hoster/ShareFilesCo.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class ShareFilesCo(DeadHoster):
__name__ = "ShareFilesCo"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'http://(?:www\.)?sharefiles\.co/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/SharebeesCom.py b/module/plugins/hoster/SharebeesCom.py
index 9387483cc..c0846d23c 100644
--- a/module/plugins/hoster/SharebeesCom.py
+++ b/module/plugins/hoster/SharebeesCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class SharebeesCom(DeadHoster):
__name__ = "SharebeesCom"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'http://(?:www\.)?sharebees\.com/\w{12}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/ShareonlineBiz.py b/module/plugins/hoster/ShareonlineBiz.py
index 47b6ba7da..2134ec7e6 100644
--- a/module/plugins/hoster/ShareonlineBiz.py
+++ b/module/plugins/hoster/ShareonlineBiz.py
@@ -13,7 +13,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class ShareonlineBiz(SimpleHoster):
__name__ = "ShareonlineBiz"
__type__ = "hoster"
- __version__ = "0.53"
+ __version__ = "0.54"
__pattern__ = r'https?://(?:www\.)?(share-online\.biz|egoshare\.com)/(download\.php\?id=|dl/)(?P<ID>\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -36,8 +36,8 @@ class ShareonlineBiz(SimpleHoster):
@classmethod
- def apiInfo(cls, url):
- info = super(ShareonlineBiz, cls).apiInfo(url)
+ def api_info(cls, url):
+ info = super(ShareonlineBiz, cls).api_info(url)
field = getURL("http://api.share-online.biz/linkcheck.php",
get={'md5' : "1",
@@ -61,42 +61,42 @@ class ShareonlineBiz(SimpleHoster):
def setup(self):
- self.resumeDownload = self.premium
- self.multiDL = False
+ self.resume_download = self.premium
+ self.multi_dl = False
- def handleCaptcha(self):
+ def handle_captcha(self):
recaptcha = ReCaptcha(self)
for _i in xrange(5):
response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY)
m = re.search(r'var wait=(\d+);', self.html)
- self.setWait(int(m.group(1)) if m else 30)
+ self.set_wait(int(m.group(1)) if m else 30)
res = self.load("%s/free/captcha/%d" % (self.pyfile.url, int(time.time() * 1000)),
post={'dl_free' : "1",
'recaptcha_challenge_field': challenge,
'recaptcha_response_field' : response})
if not res == '0':
- self.correctCaptcha()
+ self.correct_captcha()
return res
else:
- self.invalidCaptcha()
+ self.invalid_captcha()
else:
- self.invalidCaptcha()
+ self.invalid_captcha()
self.fail(_("No valid captcha solution received"))
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.wait(3)
self.html = self.load("%s/free/" % pyfile.url,
post={'dl_free': "1", 'choice': "free"})
- self.checkErrors()
+ self.check_errors()
- res = self.handleCaptcha()
+ res = self.handle_captcha()
self.link = res.decode('base64')
if not self.link.startswith("http://"):
@@ -105,22 +105,22 @@ class ShareonlineBiz(SimpleHoster):
self.wait()
- def checkFile(self):
- check = self.checkDownload({'cookie': re.compile(r'<div id="dl_failure"'),
+ def check_file(self):
+ check = self.check_download({'cookie': re.compile(r'<div id="dl_failure"'),
'fail' : re.compile(r"<title>Share-Online")})
if check == "cookie":
- self.invalidCaptcha()
+ self.invalid_captcha()
self.retry(5, 60, _("Cookie failure"))
elif check == "fail":
- self.invalidCaptcha()
+ self.invalid_captcha()
self.retry(5, 5 * 60, _("Download failed"))
return super(ShareonlineBiz, self).checkFile()
- def handlePremium(self, pyfile): #: should be working better loading (account) api internally
+ def handle_premium(self, pyfile): #: should be working better loading (account) api internally
html = self.load("http://api.share-online.biz/account.php",
get={'username': self.user,
'password': self.account.getAccountData(self.user)['password'],
@@ -133,7 +133,7 @@ class ShareonlineBiz(SimpleHoster):
key, value = line.split(": ")
dlinfo[key.lower()] = value
- self.logDebug(dlinfo)
+ self.log_debug(dlinfo)
if not dlinfo['status'] == "online":
self.offline()
@@ -144,12 +144,12 @@ class ShareonlineBiz(SimpleHoster):
self.link = dlinfo['url']
if self.link == "server_under_maintenance":
- self.tempOffline()
+ self.temp_offline()
else:
- self.multiDL = True
+ self.multi_dl = True
- def checkErrors(self):
+ def check_errors(self):
m = re.search(r"/failure/(.*?)/1", self.req.lastEffectiveURL)
if m is None:
self.info.pop('error', None)
@@ -158,9 +158,9 @@ class ShareonlineBiz(SimpleHoster):
errmsg = m.group(1).lower()
try:
- self.logError(errmsg, re.search(self.ERROR_PATTERN, self.html).group(1))
+ self.log_error(errmsg, re.search(self.ERROR_PATTERN, self.html).group(1))
except Exception:
- self.logError("Unknown error occurred", errmsg)
+ self.log_error("Unknown error occurred", errmsg)
if errmsg is "invalid":
self.fail(_("File not available"))
@@ -172,11 +172,11 @@ class ShareonlineBiz(SimpleHoster):
self.retry(wait_time=600, reason=errmsg)
elif 'slot' in errmsg:
- self.wantReconnect = True
+ self.want_reconnect = True
self.retry(24, 3600, errmsg)
else:
- self.wantReconnect = True
+ self.want_reconnect = True
self.retry(wait_time=60, reason=errmsg)
diff --git a/module/plugins/hoster/ShareplaceCom.py b/module/plugins/hoster/ShareplaceCom.py
index 815f54c79..d917e3f35 100644
--- a/module/plugins/hoster/ShareplaceCom.py
+++ b/module/plugins/hoster/ShareplaceCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Hoster import Hoster
class ShareplaceCom(Hoster):
__name__ = "ShareplaceCom"
__type__ = "hoster"
- __version__ = "0.13"
+ __version__ = "0.14"
__pattern__ = r'http://(?:www\.)?shareplace\.(com|org)/\?\w+'
@@ -31,7 +31,7 @@ class ShareplaceCom(Hoster):
self.pyfile.name = self.get_file_name()
wait_time = self.get_waiting_time()
- self.setWait(wait_time)
+ self.set_wait(wait_time)
self.wait()
@@ -64,7 +64,7 @@ class ShareplaceCom(Hoster):
url = urllib.unquote(
url.replace("http://http:/", "").replace("vvvvvvvvv", "").replace("lllllllll", "").replace(
"teletubbies", ""))
- self.logDebug("URL: %s" % url)
+ self.log_debug("URL: %s" % url)
return url
else:
self.error(_("Absolute filepath not found"))
diff --git a/module/plugins/hoster/SharingmatrixCom.py b/module/plugins/hoster/SharingmatrixCom.py
index 3958ebbd6..5f52849bb 100644
--- a/module/plugins/hoster/SharingmatrixCom.py
+++ b/module/plugins/hoster/SharingmatrixCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class SharingmatrixCom(DeadHoster):
__name__ = "SharingmatrixCom"
__type__ = "hoster"
- __version__ = "0.01"
+ __version__ = "0.02"
__pattern__ = r'http://(?:www\.)?sharingmatrix\.com/file/\w+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/ShragleCom.py b/module/plugins/hoster/ShragleCom.py
index 689223322..d98ee08ff 100644
--- a/module/plugins/hoster/ShragleCom.py
+++ b/module/plugins/hoster/ShragleCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class ShragleCom(DeadHoster):
__name__ = "ShragleCom"
__type__ = "hoster"
- __version__ = "0.22"
+ __version__ = "0.23"
__pattern__ = r'http://(?:www\.)?(cloudnator|shragle)\.com/files/(?P<ID>.+?)/'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/SimplyPremiumCom.py b/module/plugins/hoster/SimplyPremiumCom.py
index 8ea121199..f726b0bf9 100644
--- a/module/plugins/hoster/SimplyPremiumCom.py
+++ b/module/plugins/hoster/SimplyPremiumCom.py
@@ -3,13 +3,13 @@
import re
from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
-from module.plugins.internal.SimpleHoster import secondsToMidnight
+from module.plugins.internal.SimpleHoster import seconds_to_midnight
class SimplyPremiumCom(MultiHoster):
__name__ = "SimplyPremiumCom"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.10"
__pattern__ = r'https?://.+simply-premium\.com'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -21,10 +21,10 @@ class SimplyPremiumCom(MultiHoster):
def setup(self):
- self.chunkLimit = 16
+ self.chunk_limit = 16
- def checkErrors(self):
+ def check_errors(self):
if '<valid>0</valid>' in self.html or (
"You are not allowed to download from this host" in self.html and self.premium):
self.account.relogin(self.user)
@@ -34,30 +34,30 @@ class SimplyPremiumCom(MultiHoster):
self.offline()
elif "downloadlimit" in self.html:
- self.logWarning(_("Reached maximum connctions"))
+ self.log_warning(_("Reached maximum connctions"))
self.retry(5, 60, _("Reached maximum connctions"))
elif "trafficlimit" in self.html:
- self.logWarning(_("Reached daily limit for this host"))
- self.retry(wait_time=secondsToMidnight(gmt=2), reason="Daily limit for this host reached")
+ self.log_warning(_("Reached daily limit for this host"))
+ self.retry(wait_time=seconds_to_midnight(gmt=2), reason="Daily limit for this host reached")
elif "hostererror" in self.html:
- self.logWarning(_("Hoster temporarily unavailable, waiting 1 minute and retry"))
+ self.log_warning(_("Hoster temporarily unavailable, waiting 1 minute and retry"))
self.retry(5, 60, _("Hoster is temporarily unavailable"))
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
for i in xrange(5):
self.html = self.load("http://www.simply-premium.com/premium.php", get={'info': "", 'link': self.pyfile.url})
if self.html:
- self.logDebug("JSON data: " + self.html)
+ self.log_debug("JSON data: " + self.html)
break
else:
- self.logInfo(_("Unable to get API data, waiting 1 minute and retry"))
+ self.log_info(_("Unable to get API data, waiting 1 minute and retry"))
self.retry(5, 60, _("Unable to get API data"))
- self.checkErrors()
+ self.check_errors()
try:
self.pyfile.name = re.search(r'<name>([^<]+)</name>', self.html).group(1)
diff --git a/module/plugins/hoster/SimplydebridCom.py b/module/plugins/hoster/SimplydebridCom.py
index 5e06bed88..d054a3c54 100644
--- a/module/plugins/hoster/SimplydebridCom.py
+++ b/module/plugins/hoster/SimplydebridCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo, rep
class SimplydebridCom(MultiHoster):
__name__ = "SimplydebridCom"
__type__ = "hoster"
- __version__ = "0.19"
+ __version__ = "0.20"
__pattern__ = r'http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd\.php'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -19,8 +19,8 @@ class SimplydebridCom(MultiHoster):
__authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")]
- def handlePremium(self, pyfile):
- #fix the links for simply-debrid.com!
+ def handle_premium(self, pyfile):
+ # fix the links for simply-debrid.com!
self.link = replace_patterns(pyfile.url, [("clz.to", "cloudzer.net/file")
("http://share-online", "http://www.share-online")
("ul.to", "uploaded.net/file")
@@ -40,8 +40,8 @@ class SimplydebridCom(MultiHoster):
self.wait(5)
- def checkFile(self):
- if self.checkDownload({"error": "No address associated with hostname"}):
+ def check_file(self):
+ if self.check_download({"error": "No address associated with hostname"}):
self.retry(24, 3 * 60, _("Bad file downloaded"))
return super(SimplydebridCom, self).checkFile()
diff --git a/module/plugins/hoster/SizedriveCom.py b/module/plugins/hoster/SizedriveCom.py
index 4c5aedb6d..15007695d 100644
--- a/module/plugins/hoster/SizedriveCom.py
+++ b/module/plugins/hoster/SizedriveCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class SizedriveCom(SimpleHoster):
__name__ = "SizedriveCom"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'http://(?:www\.)?sizedrive\.com/[rd]/(?P<ID>\w+)'
@@ -23,12 +23,12 @@ class SizedriveCom(SimpleHoster):
def setup(self):
- self.resumeDownload = False
- self.multiDL = False
- self.chunkLimit = 1
+ self.resume_download = False
+ self.multi_dl = False
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.wait(5)
self.html = self.load("http://www.sizedrive.com/getdownload.php",
post={'id': self.info['pattern']['ID']})
diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py
index 9b62314ad..31b5dd4d7 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.07"
+ __version__ = "0.08"
__pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -22,7 +22,7 @@ class SmoozedCom(MultiHoster):
("Retry", r'{"state":"retry"}')]
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
#: In some cases hostsers do not supply us with a filename at download, so we
#: are going to set a fall back filename (e.g. for freakshare or xfileshare)
pyfile.name = pyfile.name.split('/').pop() #: Remove everthing before last slash
diff --git a/module/plugins/hoster/SockshareCom.py b/module/plugins/hoster/SockshareCom.py
index 44eedf9d4..16f702f15 100644
--- a/module/plugins/hoster/SockshareCom.py
+++ b/module/plugins/hoster/SockshareCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class SockshareCom(DeadHoster):
__name__ = "SockshareCom"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'http://(?:www\.)?sockshare\.com/(mobile/)?(file|embed)/(?P<ID>\w+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/SolidfilesCom.py b/module/plugins/hoster/SolidfilesCom.py
index 184329a40..fc2f2741a 100644
--- a/module/plugins/hoster/SolidfilesCom.py
+++ b/module/plugins/hoster/SolidfilesCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class SolidfilesCom(SimpleHoster):
__name__ = "SolidfilesCom"
__type__ = "hoster"
- __version__ = "0.02"
+ __version__ = "0.03"
__pattern__ = r'http://(?:www\.)?solidfiles\.com\/d/\w+'
@@ -26,8 +26,8 @@ class SolidfilesCom(SimpleHoster):
def setup(self):
- self.multiDL = True
- self.chunkLimit = 1
+ self.multi_dl = True
+ self.chunk_limit = 1
getInfo = create_getInfo(SolidfilesCom)
diff --git a/module/plugins/hoster/SoundcloudCom.py b/module/plugins/hoster/SoundcloudCom.py
index 2b041bb94..97d5223be 100644
--- a/module/plugins/hoster/SoundcloudCom.py
+++ b/module/plugins/hoster/SoundcloudCom.py
@@ -9,7 +9,7 @@ from module.common.json_layer import json_loads
class SoundcloudCom(SimpleHoster):
__name__ = "SoundcloudCom"
__type__ = "hoster"
- __version__ = "0.11"
+ __version__ = "0.12"
__pattern__ = r'https?://(?:www\.)?soundcloud\.com/[\w-]+/[\w-]+'
__config__ = [("use_premium", "bool" , "Use premium account if available", True ),
@@ -24,7 +24,7 @@ class SoundcloudCom(SimpleHoster):
OFFLINE_PATTERN = r'<title>"SoundCloud - Hear the world’s sounds"</title>'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
try:
song_id = re.search(r'sounds:(\d+)"', self.html).group(1)
@@ -46,10 +46,10 @@ class SoundcloudCom(SimpleHoster):
key=lambda t: regex.sub(t[0], ''),
reverse=True)
- self.logDebug("Streams found: %s" % (http_streams or "None"))
+ self.log_debug("Streams found: %s" % (http_streams or "None"))
if http_streams:
- stream_name, self.link = http_streams[0 if self.getConfig('quality') == "Higher" else -1]
+ stream_name, self.link = http_streams[0 if self.get_config('quality') == "Higher" else -1]
pyfile.name += '.' + stream_name.split('_')[1].lower()
diff --git a/module/plugins/hoster/SpeedLoadOrg.py b/module/plugins/hoster/SpeedLoadOrg.py
index 18f04b611..97997517b 100644
--- a/module/plugins/hoster/SpeedLoadOrg.py
+++ b/module/plugins/hoster/SpeedLoadOrg.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class SpeedLoadOrg(DeadHoster):
__name__ = "SpeedLoadOrg"
__type__ = "hoster"
- __version__ = "1.02"
+ __version__ = "1.03"
__pattern__ = r'http://(?:www\.)?speedload\.org/(?P<ID>\w+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/SpeedfileCz.py b/module/plugins/hoster/SpeedfileCz.py
index cd6d65082..9f5da3c47 100644
--- a/module/plugins/hoster/SpeedfileCz.py
+++ b/module/plugins/hoster/SpeedfileCz.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class SpeedfileCz(DeadHoster):
__name__ = "SpeedFileCz"
__type__ = "hoster"
- __version__ = "0.32"
+ __version__ = "0.33"
__pattern__ = r'http://(?:www\.)?speedfile\.cz/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/SpeedyshareCom.py b/module/plugins/hoster/SpeedyshareCom.py
index 91788b2c8..4a9edb966 100644
--- a/module/plugins/hoster/SpeedyshareCom.py
+++ b/module/plugins/hoster/SpeedyshareCom.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class SpeedyshareCom(SimpleHoster):
__name__ = "SpeedyshareCom"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'https?://(?:www\.)?(speedyshare\.com|speedy\.sh)/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -31,11 +31,11 @@ class SpeedyshareCom(SimpleHoster):
def setup(self):
- self.multiDL = False
- self.chunkLimit = 1
+ self.multi_dl = False
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m is None:
self.link = m.group(1)
diff --git a/module/plugins/hoster/StorageTo.py b/module/plugins/hoster/StorageTo.py
index feb9f3300..fc23916a6 100644
--- a/module/plugins/hoster/StorageTo.py
+++ b/module/plugins/hoster/StorageTo.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class StorageTo(DeadHoster):
__name__ = "StorageTo"
__type__ = "hoster"
- __version__ = "0.01"
+ __version__ = "0.02"
__pattern__ = r'http://(?:www\.)?storage\.to/get/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/StreamCz.py b/module/plugins/hoster/StreamCz.py
index 24b725722..e2ae0ab83 100644
--- a/module/plugins/hoster/StreamCz.py
+++ b/module/plugins/hoster/StreamCz.py
@@ -6,7 +6,7 @@ from module.network.RequestFactory import getURL
from module.plugins.internal.Hoster import Hoster
-def getInfo(urls):
+def get_info(urls):
result = []
for url in urls:
@@ -23,7 +23,7 @@ def getInfo(urls):
class StreamCz(Hoster):
__name__ = "StreamCz"
__type__ = "hoster"
- __version__ = "0.21"
+ __version__ = "0.22"
__pattern__ = r'https?://(?:www\.)?stream\.cz/[^/]+/\d+'
@@ -39,8 +39,8 @@ class StreamCz(Hoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
+ self.resume_download = True
+ self.multi_dl = True
def process(self, pyfile):
@@ -53,7 +53,7 @@ class StreamCz(Hoster):
if m is None:
self.error(_("CDN_PATTERN not found"))
cdn = m.groupdict()
- self.logDebug(cdn)
+ self.log_debug(cdn)
for cdnkey in ("cdnHD", "cdnHQ", "cdnLQ"):
if cdnkey in cdn and cdn[cdnkey] > '':
cdnid = cdn[cdnkey]
@@ -67,5 +67,5 @@ class StreamCz(Hoster):
pyfile.name = "%s-%s.%s.mp4" % (m.group(2), m.group(1), cdnkey[-2:])
download_url = "http://cdn-dispatcher.stream.cz/?id=" + cdnid
- self.logInfo(_("STREAM: %s") % cdnkey[-2:], download_url)
+ self.log_info(_("STREAM: %s") % cdnkey[-2:], download_url)
self.download(download_url)
diff --git a/module/plugins/hoster/StreamcloudEu.py b/module/plugins/hoster/StreamcloudEu.py
index 0f8c08ad9..943beadb5 100644
--- a/module/plugins/hoster/StreamcloudEu.py
+++ b/module/plugins/hoster/StreamcloudEu.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class StreamcloudEu(XFSHoster):
__name__ = "StreamcloudEu"
__type__ = "hoster"
- __version__ = "0.10"
+ __version__ = "0.11"
__pattern__ = r'http://(?:www\.)?streamcloud\.eu/\w{12}'
@@ -21,9 +21,9 @@ class StreamcloudEu(XFSHoster):
def setup(self):
- self.multiDL = True
- self.chunkLimit = 1
- self.resumeDownload = self.premium
+ self.multi_dl = True
+ self.chunk_limit = 1
+ self.resume_download = self.premium
getInfo = create_getInfo(StreamcloudEu)
diff --git a/module/plugins/hoster/TurbobitNet.py b/module/plugins/hoster/TurbobitNet.py
index efff6521a..e4ff000b2 100644
--- a/module/plugins/hoster/TurbobitNet.py
+++ b/module/plugins/hoster/TurbobitNet.py
@@ -17,7 +17,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, t
class TurbobitNet(SimpleHoster):
__name__ = "TurbobitNet"
__type__ = "hoster"
- __version__ = "0.20"
+ __version__ = "0.21"
__pattern__ = r'http://(?:www\.)?turbobit\.net/(?:download/free/)?(?P<ID>\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -42,16 +42,16 @@ class TurbobitNet(SimpleHoster):
CAPTCHA_PATTERN = r'<img alt="Captcha" src="(.+?)"'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.html = self.load("http://turbobit.net/download/free/%s" % self.info['pattern']['ID'])
- rtUpdate = self.getRtUpdate()
+ rtUpdate = self.get_rt_update()
- self.solveCaptcha()
+ self.solve_captcha()
self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With: XMLHttpRequest"])
- self.html = self.load(self.getDownloadUrl(rtUpdate))
+ self.html = self.load(self.get_download_url(rtUpdate))
self.req.http.c.setopt(pycurl.HTTPHEADER, ["X-Requested-With:"])
@@ -60,7 +60,7 @@ class TurbobitNet(SimpleHoster):
self.link = m.group(1)
- def solveCaptcha(self):
+ def solve_captcha(self):
for _i in xrange(5):
m = re.search(self.LIMIT_WAIT_PATTERN, self.html)
if m:
@@ -68,10 +68,10 @@ class TurbobitNet(SimpleHoster):
self.wait(wait_time, wait_time > 60)
self.retry()
- action, inputs = self.parseHtmlForm("action='#'")
+ action, inputs = self.parse_html_form("action='#'")
if not inputs:
self.error(_("Captcha form not found"))
- self.logDebug(inputs)
+ self.log_debug(inputs)
if inputs['captcha_type'] == 'recaptcha':
recaptcha = ReCaptcha(self)
@@ -81,25 +81,25 @@ class TurbobitNet(SimpleHoster):
if m is None:
self.error(_("captcha"))
captcha_url = m.group(1)
- inputs['captcha_response'] = self.decryptCaptcha(captcha_url)
+ inputs['captcha_response'] = self.decrypt_captcha(captcha_url)
- self.logDebug(inputs)
+ self.log_debug(inputs)
self.html = self.load(self.url, post=inputs)
if '<div class="captcha-error">Incorrect, try again!<' in self.html:
- self.invalidCaptcha()
+ self.invalid_captcha()
else:
- self.correctCaptcha()
+ self.correct_captcha()
break
else:
self.fail(_("Invalid captcha"))
- def getRtUpdate(self):
- rtUpdate = self.getStorage("rtUpdate")
+ def get_rt_update(self):
+ rtUpdate = self.retrieve("rtUpdate")
if not rtUpdate:
- if self.getStorage("version") != self.__version__ \
- or int(self.getStorage("timestamp", 0)) + 86400000 < timestamp():
+ if self.retrieve("version") != self.__version__ \
+ or int(self.retrieve("timestamp", 0)) + 86400000 < timestamp():
#: that's right, we are even using jdownloader updates
rtUpdate = getURL("http://update0.jdownloader.org/pluginstuff/tbupdate.js")
rtUpdate = self.decrypt(rtUpdate.splitlines()[1])
@@ -108,17 +108,17 @@ class TurbobitNet(SimpleHoster):
r'zza=\2;for(var zzi=0;zzi<zza.length;zzi++){\1=zza[zzi];', rtUpdate)
rtUpdate = re.sub(r"for\((\w+)=", r"for(var \1=", rtUpdate)
- self.setStorage("rtUpdate", rtUpdate)
- self.setStorage("timestamp", timestamp())
- self.setStorage("version", self.__version__)
+ self.store("rtUpdate", rtUpdate)
+ self.store("timestamp", timestamp())
+ self.store("version", self.__version__)
else:
- self.logError(_("Unable to download, wait for update..."))
- self.tempOffline()
+ self.log_error(_("Unable to download, wait for update..."))
+ self.temp_offline()
return rtUpdate
- def getDownloadUrl(self, rtUpdate):
+ def get_download_url(self, rtUpdate):
self.req.http.lastURL = self.url
m = re.search("(/\w+/timeout\.js\?\w+=)([^\"\'<>]+)", self.html)
@@ -129,7 +129,7 @@ class TurbobitNet(SimpleHoster):
fun = self.load(url)
- self.setWait(65, False)
+ self.set_wait(65, False)
for b in [1, 3]:
self.jscode = "var id = \'%s\';var b = %d;var inn = \'%s\';%sout" % (
@@ -137,16 +137,16 @@ class TurbobitNet(SimpleHoster):
try:
out = self.js.eval(self.jscode)
- self.logDebug("URL", self.js.engine, out)
+ self.log_debug("URL", self.js.engine, out)
if out.startswith('/download/'):
return "http://turbobit.net%s" % out.strip()
except Exception, e:
- self.logError(e)
+ self.log_error(e)
else:
if self.retries >= 2:
#: retry with updated js
- self.delStorage("rtUpdate")
+ self.delete("rtUpdate")
else:
self.retry()
@@ -158,7 +158,7 @@ class TurbobitNet(SimpleHoster):
return binascii.unhexlify(cipher.encrypt(binascii.unhexlify(data)))
- def getLocalTimeString(self):
+ def get_local_time_string(self):
lt = time.localtime()
tz = time.altzone if lt.tm_isdst else time.timezone
return "%s GMT%+03d%02d" % (time.strftime("%a %b %d %Y %H:%M:%S", lt), -tz // 3600, tz % 3600)
diff --git a/module/plugins/hoster/TurbouploadCom.py b/module/plugins/hoster/TurbouploadCom.py
index e4b53b818..79b6ac2a5 100644
--- a/module/plugins/hoster/TurbouploadCom.py
+++ b/module/plugins/hoster/TurbouploadCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class TurbouploadCom(DeadHoster):
__name__ = "TurbouploadCom"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'http://(?:www\.)?turboupload\.com/(\w+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/TusfilesNet.py b/module/plugins/hoster/TusfilesNet.py
index 3afd1da97..5a99aad72 100644
--- a/module/plugins/hoster/TusfilesNet.py
+++ b/module/plugins/hoster/TusfilesNet.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class TusfilesNet(XFSHoster):
__name__ = "TusfilesNet"
__type__ = "hoster"
- __version__ = "0.11"
+ __version__ = "0.12"
__pattern__ = r'https?://(?:www\.)?tusfiles\.net/\w{12}'
@@ -22,9 +22,9 @@ class TusfilesNet(XFSHoster):
def setup(self):
- self.chunkLimit = -1
- self.multiDL = True
- self.resumeDownload = True
+ self.chunk_limit = -1
+ self.multi_dl = True
+ self.resume_download = True
def download(self, url, *args, **kwargs):
@@ -33,7 +33,7 @@ class TusfilesNet(XFSHoster):
except BadHeader, e:
if e.code is 503:
- self.multiDL = False
+ self.multi_dl = False
raise Retry("503")
diff --git a/module/plugins/hoster/TwoSharedCom.py b/module/plugins/hoster/TwoSharedCom.py
index 086228637..72c78ec4f 100644
--- a/module/plugins/hoster/TwoSharedCom.py
+++ b/module/plugins/hoster/TwoSharedCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class TwoSharedCom(SimpleHoster):
__name__ = "TwoSharedCom"
__type__ = "hoster"
- __version__ = "0.13"
+ __version__ = "0.14"
__pattern__ = r'http://(?:www\.)?2shared\.com/(account/)?(download|get|file|document|photo|video|audio)/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -26,8 +26,8 @@ class TwoSharedCom(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
+ self.resume_download = True
+ self.multi_dl = True
getInfo = create_getInfo(TwoSharedCom)
diff --git a/module/plugins/hoster/UlozTo.py b/module/plugins/hoster/UlozTo.py
index 6a2836b50..f60549813 100644
--- a/module/plugins/hoster/UlozTo.py
+++ b/module/plugins/hoster/UlozTo.py
@@ -7,7 +7,7 @@ from module.common.json_layer import json_loads
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-def convertDecimalPrefix(m):
+def convert_decimal_prefix(m):
#: decimal prefixes used in filesize and traffic
return ("%%.%df" % {'k': 3, 'M': 6, 'G': 9}[m.group(2)] % float(m.group(1))).replace('.', '')
@@ -15,7 +15,7 @@ def convertDecimalPrefix(m):
class UlozTo(SimpleHoster):
__name__ = "UlozTo"
__type__ = "hoster"
- __version__ = "1.10"
+ __version__ = "1.11"
__pattern__ = r'http://(?:www\.)?(uloz\.to|ulozto\.(cz|sk|net)|bagruj\.cz|zachowajto\.pl)/(?:live/)?(?P<ID>\w+/[^/?]*)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -43,37 +43,37 @@ class UlozTo(SimpleHoster):
def setup(self):
- self.chunkLimit = 16 if self.premium else 1
- self.multiDL = True
- self.resumeDownload = True
+ self.chunk_limit = 16 if self.premium else 1
+ self.multi_dl = True
+ self.resume_download = True
- def handleFree(self, pyfile):
- action, inputs = self.parseHtmlForm('id="frm-downloadDialog-freeDownloadForm"')
+ def handle_free(self, pyfile):
+ action, inputs = self.parse_html_form('id="frm-downloadDialog-freeDownloadForm"')
if not action or not inputs:
self.error(_("Free download form not found"))
- self.logDebug("inputs.keys = " + str(inputs.keys()))
+ self.log_debug("inputs.keys = " + str(inputs.keys()))
#: get and decrypt captcha
if all(key in inputs for key in ("captcha_value", "captcha_id", "captcha_key")):
#: Old version - last seen 9.12.2013
- self.logDebug('Using "old" version')
+ self.log_debug('Using "old" version')
- captcha_value = self.decryptCaptcha("http://img.uloz.to/captcha/%s.png" % inputs['captcha_id'])
- self.logDebug("CAPTCHA ID: " + inputs['captcha_id'] + ", CAPTCHA VALUE: " + captcha_value)
+ captcha_value = self.decrypt_captcha("http://img.uloz.to/captcha/%s.png" % inputs['captcha_id'])
+ self.log_debug("CAPTCHA ID: " + inputs['captcha_id'] + ", CAPTCHA VALUE: " + captcha_value)
inputs.update({'captcha_id': inputs['captcha_id'], 'captcha_key': inputs['captcha_key'], 'captcha_value': captcha_value})
elif all(key in inputs for key in ("captcha_value", "timestamp", "salt", "hash")):
#: New version - better to get new parameters (like captcha reload) because of image url - since 6.12.2013
- self.logDebug('Using "new" version')
+ self.log_debug('Using "new" version')
xapca = self.load("http://www.ulozto.net/reloadXapca.php", get={'rnd': str(int(time.time()))})
- self.logDebug("xapca = " + str(xapca))
+ self.log_debug("xapca = " + str(xapca))
data = json_loads(xapca)
- captcha_value = self.decryptCaptcha(str(data['image']))
- self.logDebug("CAPTCHA HASH: " + data['hash'], "CAPTCHA SALT: " + str(data['salt']), "CAPTCHA VALUE: " + captcha_value)
+ captcha_value = self.decrypt_captcha(str(data['image']))
+ self.log_debug("CAPTCHA HASH: " + data['hash'], "CAPTCHA SALT: " + str(data['salt']), "CAPTCHA VALUE: " + captcha_value)
inputs.update({'timestamp': data['timestamp'], 'salt': data['salt'], 'hash': data['hash'], 'captcha_value': captcha_value})
@@ -83,13 +83,13 @@ class UlozTo(SimpleHoster):
self.download("http://www.ulozto.net" + action, post=inputs)
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
self.download(pyfile.url, get={'do': "directDownload"})
- def checkErrors(self):
+ def check_errors(self):
if re.search(self.ADULT_PATTERN, self.html):
- self.logInfo(_("Adult content confirmation needed"))
+ self.log_info(_("Adult content confirmation needed"))
m = re.search(self.TOKEN_PATTERN, self.html)
if m is None:
@@ -100,10 +100,10 @@ class UlozTo(SimpleHoster):
post={"agree": "Confirm", "_token_": m.group(1)})
if self.PASSWD_PATTERN in self.html:
- password = self.getPassword()
+ password = self.get_password()
if password:
- self.logInfo(_("Password protected link, trying ") + password)
+ self.log_info(_("Password protected link, trying ") + password)
self.html = self.load(pyfile.url,
get={'do': "passwordProtectedForm-submit"},
post={"password": password, "password_send": 'Send'})
@@ -119,8 +119,8 @@ class UlozTo(SimpleHoster):
return super(UlozTo, self).checkErrors()
- def checkFile(self):
- check = self.checkDownload({
+ def check_file(self):
+ check = self.check_download({
"wrong_captcha": re.compile(r'<ul class="error">\s*<li>Error rewriting the text.</li>'),
"offline" : re.compile(self.OFFLINE_PATTERN),
"passwd" : self.PASSWD_PATTERN,
@@ -129,7 +129,7 @@ class UlozTo(SimpleHoster):
})
if check == "wrong_captcha":
- self.invalidCaptcha()
+ self.invalid_captcha()
self.retry(reason=_("Wrong captcha code"))
elif check == "offline":
@@ -139,8 +139,8 @@ class UlozTo(SimpleHoster):
self.fail(_("Wrong password"))
elif check == "server_error":
- self.logError(_("Server error, try downloading later"))
- self.multiDL = False
+ self.log_error(_("Server error, try downloading later"))
+ self.multi_dl = False
self.wait(1 * 60 * 60, True)
self.retry()
diff --git a/module/plugins/hoster/UloziskoSk.py b/module/plugins/hoster/UloziskoSk.py
index 81fdd21ed..c49db225b 100644
--- a/module/plugins/hoster/UloziskoSk.py
+++ b/module/plugins/hoster/UloziskoSk.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UloziskoSk(SimpleHoster):
__name__ = "UloziskoSk"
__type__ = "hoster"
- __version__ = "0.25"
+ __version__ = "0.26"
__pattern__ = r'http://(?:www\.)?ulozisko\.sk/.+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -37,10 +37,10 @@ class UloziskoSk(SimpleHoster):
if m:
self.link = "http://ulozisko.sk" + m.group(1)
else:
- self.handleFree(pyfile)
+ self.handle_free(pyfile)
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m is None:
self.error(_("LINK_FREE_PATTERN not found"))
@@ -51,16 +51,16 @@ class UloziskoSk(SimpleHoster):
self.error(_("ID_PATTERN not found"))
id = m.group(1)
- self.logDebug("URL:" + parsed_url + ' ID:' + id)
+ self.log_debug("URL:" + parsed_url + ' ID:' + id)
m = re.search(self.CAPTCHA_PATTERN, self.html)
if m is None:
self.error(_("CAPTCHA_PATTERN not found"))
captcha_url = urlparse.urljoin("http://www.ulozisko.sk", m.group(1))
- captcha = self.decryptCaptcha(captcha_url, cookies=True)
+ captcha = self.decrypt_captcha(captcha_url, cookies=True)
- self.logDebug("CAPTCHA_URL:" + captcha_url + ' CAPTCHA:' + captcha)
+ self.log_debug("CAPTCHA_URL:" + captcha_url + ' CAPTCHA:' + captcha)
self.download(parsed_url,
post={"antispam": captcha,
diff --git a/module/plugins/hoster/UnibytesCom.py b/module/plugins/hoster/UnibytesCom.py
index d090c8e7d..6763f6cb2 100644
--- a/module/plugins/hoster/UnibytesCom.py
+++ b/module/plugins/hoster/UnibytesCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UnibytesCom(SimpleHoster):
__name__ = "UnibytesCom"
__type__ = "hoster"
- __version__ = "0.12"
+ __version__ = "0.13"
__pattern__ = r'https?://(?:www\.)?unibytes\.com/[\w .-]{11}B'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -28,14 +28,14 @@ class UnibytesCom(SimpleHoster):
LINK_FREE_PATTERN = r'<a href="(.+?)">Download</a>'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
domain = "http://www.%s/" % self.HOSTER_DOMAIN
- action, post_data = self.parseHtmlForm('id="startForm"')
+ action, post_data = self.parse_html_form('id="startForm"')
self.req.http.c.setopt(pycurl.FOLLOWLOCATION, 0)
for _i in xrange(8):
- self.logDebug(action, post_data)
+ self.log_debug(action, post_data)
self.html = self.load(urlparse.urljoin(domain, action), post=post_data)
m = re.search(r'location:\s*(\S+)', self.req.http.header, re.I)
@@ -51,20 +51,20 @@ class UnibytesCom(SimpleHoster):
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m:
self.link = m.group(1)
- self.correctCaptcha()
+ self.correct_captcha()
break
else:
- self.invalidCaptcha()
+ self.invalid_captcha()
last_step = post_data['step']
- action, post_data = self.parseHtmlForm('id="stepForm"')
+ action, post_data = self.parse_html_form('id="stepForm"')
if last_step == 'timer':
m = re.search(self.WAIT_PATTERN, self.html)
self.wait(m.group(1) if m else 60, False)
elif last_step in ("captcha", "last"):
- post_data['captcha'] = self.decryptCaptcha(urlparse.urljoin(domain, "/captcha.jpg"))
+ post_data['captcha'] = self.decrypt_captcha(urlparse.urljoin(domain, "/captcha.jpg"))
else:
self.fail(_("No valid captcha code entered"))
diff --git a/module/plugins/hoster/UnrestrictLi.py b/module/plugins/hoster/UnrestrictLi.py
index b63796fe0..a2406f5c6 100644
--- a/module/plugins/hoster/UnrestrictLi.py
+++ b/module/plugins/hoster/UnrestrictLi.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class UnrestrictLi(DeadHoster):
__name__ = "UnrestrictLi"
__type__ = "hoster"
- __version__ = "0.23"
+ __version__ = "0.24"
__pattern__ = r'https?://(?:www\.)?(unrestrict|unr)\.li/dl/[\w^_]+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/UpleaCom.py b/module/plugins/hoster/UpleaCom.py
index a6ec0807e..a08585f03 100644
--- a/module/plugins/hoster/UpleaCom.py
+++ b/module/plugins/hoster/UpleaCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class UpleaCom(XFSHoster):
__name__ = "UpleaCom"
__type__ = "hoster"
- __version__ = "0.10"
+ __version__ = "0.11"
__pattern__ = r'https?://(?:www\.)?uplea\.com/dl/\w{15}'
@@ -37,12 +37,12 @@ class UpleaCom(XFSHoster):
def setup(self):
- self.multiDL = False
- self.chunkLimit = 1
- self.resumeDownload = True
+ self.multi_dl = False
+ self.chunk_limit = 1
+ self.resume_download = True
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
m = re.search(self.STEP_PATTERN, self.html)
if m is None:
self.error(_("STEP_PATTERN not found"))
@@ -51,7 +51,7 @@ class UpleaCom(XFSHoster):
m = re.search(self.WAIT_PATTERN, self.html)
if m:
- self.logDebug("Waiting %s seconds" % m.group(1))
+ self.log_debug("Waiting %s seconds" % m.group(1))
self.wait(m.group(1), True)
self.retry()
diff --git a/module/plugins/hoster/UploadStationCom.py b/module/plugins/hoster/UploadStationCom.py
index 61226e3da..fc98b10bc 100644
--- a/module/plugins/hoster/UploadStationCom.py
+++ b/module/plugins/hoster/UploadStationCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class UploadStationCom(DeadHoster):
__name__ = "UploadStationCom"
__type__ = "hoster"
- __version__ = "0.52"
+ __version__ = "0.53"
__pattern__ = r'http://(?:www\.)?uploadstation\.com/file/(?P<ID>\w+)'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/UploadableCh.py b/module/plugins/hoster/UploadableCh.py
index b2323644f..21d9f298e 100644
--- a/module/plugins/hoster/UploadableCh.py
+++ b/module/plugins/hoster/UploadableCh.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UploadableCh(SimpleHoster):
__name__ = "UploadableCh"
__type__ = "hoster"
- __version__ = "0.11"
+ __version__ = "0.12"
__pattern__ = r'http://(?:www\.)?uploadable\.ch/file/(?P<ID>\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -32,16 +32,16 @@ class UploadableCh(SimpleHoster):
RECAPTCHA_KEY = "6LdlJuwSAAAAAPJbPIoUhyqOJd7-yrah5Nhim5S3"
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
#: Click the "free user" button and wait
a = self.load(pyfile.url, post={'downloadLink': "wait"})
- self.logDebug(a)
+ self.log_debug(a)
self.wait(30)
#: Make the recaptcha appear and show it the pyload interface
b = self.load(pyfile.url, post={'checkDownload': "check"})
- self.logDebug(b) #: Expected output: {"success":"showCaptcha"}
+ self.log_debug(b) #: Expected output: {"success":"showCaptcha"}
recaptcha = ReCaptcha(self)
@@ -64,9 +64,9 @@ class UploadableCh(SimpleHoster):
self.download(pyfile.url, post={'download': "normal"}, disposition=True)
- def checkFile(self):
- if self.checkDownload({'wait': re.compile("Please wait for")}):
- self.logInfo("Downloadlimit reached, please wait or reconnect")
+ def check_file(self):
+ if self.check_download({'wait': re.compile("Please wait for")}):
+ self.log_info("Downloadlimit reached, please wait or reconnect")
self.wait(60 * 60, True)
self.retry()
diff --git a/module/plugins/hoster/UploadboxCom.py b/module/plugins/hoster/UploadboxCom.py
index cb4f50184..82ecf6f87 100644
--- a/module/plugins/hoster/UploadboxCom.py
+++ b/module/plugins/hoster/UploadboxCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class UploadboxCom(DeadHoster):
__name__ = "Uploadbox"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'http://(?:www\.)?uploadbox\.com/files/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index b88ac5f0b..32b54d1ae 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UploadedTo(SimpleHoster):
__name__ = "UploadedTo"
__type__ = "hoster"
- __version__ = "0.94"
+ __version__ = "0.95"
__pattern__ = r'https?://(?:www\.)?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -40,8 +40,8 @@ class UploadedTo(SimpleHoster):
@classmethod
- def apiInfo(cls, url):
- info = super(UploadedTo, cls).apiInfo(url)
+ def api_info(cls, url):
+ info = super(UploadedTo, cls).api_info(url)
for _i in xrange(5):
html = getURL("http://uploaded.net/api/filemultiple",
@@ -61,11 +61,11 @@ class UploadedTo(SimpleHoster):
def setup(self):
- self.multiDL = self.resumeDownload = self.premium
- self.chunkLimit = 1 #: critical problems with more chunks
+ self.multi_dl = self.resume_download = self.premium
+ self.chunk_limit = 1 #: critical problems with more chunks
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.load("http://uploaded.net/language/en", just_header=True)
self.html = self.load("http://uploaded.net/js/download.js")
@@ -77,8 +77,8 @@ class UploadedTo(SimpleHoster):
post={'recaptcha_challenge_field': challenge,
'recaptcha_response_field' : response})
- super(UploadedTo, self).handleFree(pyfile)
- self.checkErrors()
+ super(UploadedTo, self).handle_free(pyfile)
+ self.check_errors()
getInfo = create_getInfo(UploadedTo)
diff --git a/module/plugins/hoster/UploadhereCom.py b/module/plugins/hoster/UploadhereCom.py
index bc94e644e..39027dca9 100644
--- a/module/plugins/hoster/UploadhereCom.py
+++ b/module/plugins/hoster/UploadhereCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class UploadhereCom(DeadHoster):
__name__ = "UploadhereCom"
__type__ = "hoster"
- __version__ = "0.12"
+ __version__ = "0.13"
__pattern__ = r'http://(?:www\.)?uploadhere\.com/\w{10}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/UploadheroCom.py b/module/plugins/hoster/UploadheroCom.py
index 5c74f10eb..2ae7356c5 100644
--- a/module/plugins/hoster/UploadheroCom.py
+++ b/module/plugins/hoster/UploadheroCom.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UploadheroCom(SimpleHoster):
__name__ = "UploadheroCom"
__type__ = "hoster"
- __version__ = "0.18"
+ __version__ = "0.19"
__pattern__ = r'http://(?:www\.)?uploadhero\.com?/dl/\w+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -38,12 +38,12 @@ class UploadheroCom(SimpleHoster):
LINK_PREMIUM_PATTERN = r'<a href="(.+?)" id="downloadnow"'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
m = re.search(self.CAPTCHA_PATTERN, self.html)
if m is None:
self.error(_("Captcha not found"))
- captcha = self.decryptCaptcha(urlparse.urljoin("http://uploadhero.co", m.group(1)))
+ captcha = self.decrypt_captcha(urlparse.urljoin("http://uploadhero.co", m.group(1)))
self.html = self.load(pyfile.url,
get={"code": captcha})
@@ -54,7 +54,7 @@ class UploadheroCom(SimpleHoster):
self.wait(50)
- def checkErrors(self):
+ def check_errors(self):
m = re.search(self.IP_BLOCKED_PATTERN, self.html)
if m:
self.html = self.load(urlparse.urljoin("http://uploadhero.co", m.group(1)))
diff --git a/module/plugins/hoster/UploadingCom.py b/module/plugins/hoster/UploadingCom.py
index efdcd81fe..04abf15ee 100644
--- a/module/plugins/hoster/UploadingCom.py
+++ b/module/plugins/hoster/UploadingCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, t
class UploadingCom(SimpleHoster):
__name__ = "UploadingCom"
__type__ = "hoster"
- __version__ = "0.41"
+ __version__ = "0.42"
__pattern__ = r'http://(?:www\.)?uploading\.com/files/(?:get/)?(?P<ID>\w+)'
@@ -39,12 +39,12 @@ class UploadingCom(SimpleHoster):
self.getFileInfo()
if self.premium:
- self.handlePremium(pyfile)
+ self.handle_premium(pyfile)
else:
- self.handleFree(pyfile)
+ self.handle_free(pyfile)
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
postData = {'action': 'get_link',
'code' : self.info['pattern']['ID'],
'pass' : 'undefined'}
@@ -57,11 +57,11 @@ class UploadingCom(SimpleHoster):
raise Exception("Plugin defect")
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
m = re.search('<h2>((Daily )?Download Limit)</h2>', self.html)
if m:
pyfile.error = m.group(1)
- self.logWarning(pyfile.error)
+ self.log_warning(pyfile.error)
self.retry(6, (6 * 60 if m.group(2) else 15) * 60, pyfile.error)
ajax_url = "http://uploading.com/files/get/?ajax"
@@ -72,7 +72,7 @@ class UploadingCom(SimpleHoster):
if 'answer' in res and 'wait_time' in res['answer']:
wait_time = int(res['answer']['wait_time'])
- self.logInfo(_("Waiting %d seconds") % wait_time)
+ self.log_info(_("Waiting %d seconds") % wait_time)
self.wait(wait_time)
else:
self.error(_("No AJAX/WAIT"))
diff --git a/module/plugins/hoster/UploadkingCom.py b/module/plugins/hoster/UploadkingCom.py
index 0d60cef1f..44ebed105 100644
--- a/module/plugins/hoster/UploadkingCom.py
+++ b/module/plugins/hoster/UploadkingCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class UploadkingCom(DeadHoster):
__name__ = "UploadkingCom"
__type__ = "hoster"
- __version__ = "0.14"
+ __version__ = "0.15"
__pattern__ = r'http://(?:www\.)?uploadking\.com/\w{10}'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/UpstoreNet.py b/module/plugins/hoster/UpstoreNet.py
index 342009c98..f628e1db3 100644
--- a/module/plugins/hoster/UpstoreNet.py
+++ b/module/plugins/hoster/UpstoreNet.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class UpstoreNet(SimpleHoster):
__name__ = "UpstoreNet"
__type__ = "hoster"
- __version__ = "0.06"
+ __version__ = "0.07"
__pattern__ = r'https?://(?:www\.)?upstore\.net/'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -27,13 +27,13 @@ class UpstoreNet(SimpleHoster):
LINK_FREE_PATTERN = r'<a href="(https?://.*?)" target="_blank"><b>'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
# STAGE 1: get link to continue
m = re.search(self.CHASH_PATTERN, self.html)
if m is None:
self.error(_("CHASH_PATTERN not found"))
chash = m.group(1)
- self.logDebug("Read hash " + chash)
+ self.log_debug("Read hash " + chash)
#: continue to stage2
post_data = {'hash': chash, 'free': 'Slow download'}
self.html = self.load(pyfile.url, post=post_data)
diff --git a/module/plugins/hoster/UptoboxCom.py b/module/plugins/hoster/UptoboxCom.py
index 2c06558e4..981c37162 100644
--- a/module/plugins/hoster/UptoboxCom.py
+++ b/module/plugins/hoster/UptoboxCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class UptoboxCom(XFSHoster):
__name__ = "UptoboxCom"
__type__ = "hoster"
- __version__ = "0.20"
+ __version__ = "0.21"
__pattern__ = r'https?://(?:www\.)?(uptobox|uptostream)\.com/\w{12}'
@@ -23,9 +23,9 @@ class UptoboxCom(XFSHoster):
def setup(self):
- self.multiDL = True
- self.chunkLimit = 1
- self.resumeDownload = True
+ self.multi_dl = True
+ self.chunk_limit = 1
+ self.resume_download = True
getInfo = create_getInfo(UptoboxCom)
diff --git a/module/plugins/hoster/VeehdCom.py b/module/plugins/hoster/VeehdCom.py
index 9f8e77d94..abf4f1c7a 100644
--- a/module/plugins/hoster/VeehdCom.py
+++ b/module/plugins/hoster/VeehdCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Hoster import Hoster
class VeehdCom(Hoster):
__name__ = "VeehdCom"
__type__ = "hoster"
- __version__ = "0.24"
+ __version__ = "0.25"
__pattern__ = r'http://veehd\.com/video/\d+_\S+'
__config__ = [("filename_spaces", "bool", "Allow spaces in filename", False),
@@ -20,7 +20,7 @@ class VeehdCom(Hoster):
def setup(self):
- self.multiDL = True
+ self.multi_dl = True
self.req.canContinue = True
@@ -35,7 +35,7 @@ class VeehdCom(Hoster):
def download_html(self):
url = self.pyfile.url
- self.logDebug("Requesting page: %s" % url)
+ self.log_debug("Requesting page: %s" % url)
self.html = self.load(url)
@@ -59,12 +59,12 @@ class VeehdCom(Hoster):
name = m.group(1)
#: replace unwanted characters in filename
- if self.getConfig('filename_spaces'):
+ if self.get_config('filename_spaces'):
pattern = '[^\w ]+'
else:
pattern = '[^\w.]+'
- return re.sub(pattern, self.getConfig('replacement_char'), name) + '.avi'
+ return re.sub(pattern, self.get_config('replacement_char'), name) + '.avi'
def get_file_url(self):
diff --git a/module/plugins/hoster/VeohCom.py b/module/plugins/hoster/VeohCom.py
index 57b24623b..fc7e6c318 100644
--- a/module/plugins/hoster/VeohCom.py
+++ b/module/plugins/hoster/VeohCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class VeohCom(SimpleHoster):
__name__ = "VeohCom"
__type__ = "hoster"
- __version__ = "0.22"
+ __version__ = "0.23"
__pattern__ = r'http://(?:www\.)?veoh\.com/(tv/)?(watch|videos)/(?P<ID>v\w+)'
__config__ = [("use_premium", "bool" , "Use premium account if available", True ),
@@ -28,13 +28,13 @@ class VeohCom(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
- self.chunkLimit = -1
+ self.resume_download = True
+ self.multi_dl = True
+ self.chunk_limit = -1
- def handleFree(self, pyfile):
- quality = self.getConfig('quality')
+ def handle_free(self, pyfile):
+ quality = self.get_config('quality')
if quality == "Auto":
quality = ("High", "Low")
@@ -46,7 +46,7 @@ class VeohCom(SimpleHoster):
self.link = m.group(1).replace("\\", "")
return
else:
- self.logInfo(_("No %s quality video found") % q.upper())
+ self.log_info(_("No %s quality video found") % q.upper())
else:
self.fail(_("No video found!"))
diff --git a/module/plugins/hoster/VidPlayNet.py b/module/plugins/hoster/VidPlayNet.py
index f1a32a897..44cfe1e6d 100644
--- a/module/plugins/hoster/VidPlayNet.py
+++ b/module/plugins/hoster/VidPlayNet.py
@@ -9,7 +9,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class VidPlayNet(XFSHoster):
__name__ = "VidPlayNet"
__type__ = "hoster"
- __version__ = "0.04"
+ __version__ = "0.05"
__pattern__ = r'https?://(?:www\.)?vidplay\.net/\w{12}'
diff --git a/module/plugins/hoster/VimeoCom.py b/module/plugins/hoster/VimeoCom.py
index dc774ecf6..c4002fac0 100644
--- a/module/plugins/hoster/VimeoCom.py
+++ b/module/plugins/hoster/VimeoCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class VimeoCom(SimpleHoster):
__name__ = "VimeoCom"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'https?://(?:www\.)?(player\.)?vimeo\.com/(video/)?(?P<ID>\d+)'
__config__ = [("use_premium", "bool" , "Use premium account if available" , True ),
@@ -30,13 +30,13 @@ class VimeoCom(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
- self.chunkLimit = -1
+ self.resume_download = True
+ self.multi_dl = True
+ self.chunk_limit = -1
- def handleFree(self, pyfile):
- password = self.getPassword()
+ def handle_free(self, pyfile):
+ password = self.get_password()
if self.js and 'class="btn iconify_down_b"' in self.html:
html = self.js.eval(self.load(pyfile.url, get={'action': "download", 'password': password}))
@@ -47,14 +47,14 @@ class VimeoCom(SimpleHoster):
link = dict((l.group('QL').lower(), l.group('URL')) for l in re.finditer(pattern, html))
- if self.getConfig('original'):
+ if self.get_config('original'):
if "original" in link:
self.link = link[q]
return
else:
- self.logInfo(_("Original file not downloadable"))
+ self.log_info(_("Original file not downloadable"))
- quality = self.getConfig('quality')
+ quality = self.get_config('quality')
if quality == "Highest":
qlevel = ("hd", "sd", "mobile")
elif quality == "Lowest":
@@ -67,7 +67,7 @@ class VimeoCom(SimpleHoster):
self.link = link[q]
return
else:
- self.logInfo(_("No %s quality video found") % q.upper())
+ self.log_info(_("No %s quality video found") % q.upper())
else:
self.fail(_("No video found!"))
diff --git a/module/plugins/hoster/Vipleech4UCom.py b/module/plugins/hoster/Vipleech4UCom.py
index 5668e0fad..64174680d 100644
--- a/module/plugins/hoster/Vipleech4UCom.py
+++ b/module/plugins/hoster/Vipleech4UCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class Vipleech4UCom(DeadHoster):
__name__ = "Vipleech4UCom"
__type__ = "hoster"
- __version__ = "0.20"
+ __version__ = "0.21"
__pattern__ = r'http://(?:www\.)?vipleech4u\.com/manager\.php'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/VkCom.py b/module/plugins/hoster/VkCom.py
index 8237e7536..ed9dc8cd5 100644
--- a/module/plugins/hoster/VkCom.py
+++ b/module/plugins/hoster/VkCom.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class VkCom(SimpleHoster):
__name__ = "VkCom"
__type__ = "hoster"
- __version__ = "0.01"
+ __version__ = "0.02"
__pattern__ = r"https?://(?:www\.)?vk\.com/video_ext\.php/\?.+"
__config__ = [("quality", "Low;High;Auto", "Quality", "Auto")]
@@ -27,8 +27,8 @@ class VkCom(SimpleHoster):
LINK_FREE_PATTERN = r'url\d+":"(.+?)"'
- def handleFree(self, pyfile):
- self.link = re.findall(self.LINK_FREE_PATTERN, self.html)[0 if self.getConfig('quality') is "Low" else -1]
+ def handle_free(self, pyfile):
+ self.link = re.findall(self.LINK_FREE_PATTERN, self.html)[0 if self.get_config('quality') is "Low" else -1]
getInfo = create_getInfo(VkCom)
diff --git a/module/plugins/hoster/WarserverCz.py b/module/plugins/hoster/WarserverCz.py
index 6cb94e57e..8c2c87ad5 100644
--- a/module/plugins/hoster/WarserverCz.py
+++ b/module/plugins/hoster/WarserverCz.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class WarserverCz(DeadHoster):
__name__ = "WarserverCz"
__type__ = "hoster"
- __version__ = "0.13"
+ __version__ = "0.14"
__pattern__ = r'http://(?:www\.)?warserver\.cz/stahnout/\d+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/WebshareCz.py b/module/plugins/hoster/WebshareCz.py
index 6aac44df6..2afe7421a 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.18"
+ __version__ = "0.19"
__pattern__ = r'https?://(?:www\.)?(en\.)?webshare\.cz/(?:#/)?file/(?P<ID>\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -21,8 +21,8 @@ class WebshareCz(SimpleHoster):
@classmethod
- def apiInfo(cls, url):
- info = super(WebshareCz, cls).apiInfo(url)
+ def api_info(cls, url):
+ info = super(WebshareCz, cls).api_info(url)
info['pattern'] = re.match(cls.__pattern__, url).groupdict()
@@ -39,21 +39,21 @@ class WebshareCz(SimpleHoster):
return info
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
wst = self.account.getAccountData(self.user).get('wst', None) if self.account else None
api_data = getURL("https://webshare.cz/api/file_link/",
post={'ident': self.info['pattern']['ID'], 'wst': wst})
- self.logDebug("API data: " + api_data)
+ self.log_debug("API data: " + api_data)
m = re.search('<link>(.+)</link>', api_data)
if m:
self.link = m.group(1)
- def handlePremium(self, pyfile):
- return self.handleFree(pyfile)
+ def handle_premium(self, pyfile):
+ return self.handle_free(pyfile)
getInfo = create_getInfo(WebshareCz)
diff --git a/module/plugins/hoster/WrzucTo.py b/module/plugins/hoster/WrzucTo.py
index f11d03ea8..8a32832a0 100644
--- a/module/plugins/hoster/WrzucTo.py
+++ b/module/plugins/hoster/WrzucTo.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class WrzucTo(SimpleHoster):
__name__ = "WrzucTo"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'http://(?:www\.)?wrzuc\.to/(\w+(\.wt|\.html)|(\w+/?linki/\w+))'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -26,10 +26,10 @@ class WrzucTo(SimpleHoster):
def setup(self):
- self.multiDL = True
+ self.multi_dl = True
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
data = dict(re.findall(r'(md5|file): "(.*?)"', self.html))
if len(data) != 2:
self.error(_("No file ID"))
diff --git a/module/plugins/hoster/WuploadCom.py b/module/plugins/hoster/WuploadCom.py
index 73c008ae8..3263b4974 100644
--- a/module/plugins/hoster/WuploadCom.py
+++ b/module/plugins/hoster/WuploadCom.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class WuploadCom(DeadHoster):
__name__ = "WuploadCom"
__type__ = "hoster"
- __version__ = "0.23"
+ __version__ = "0.24"
__pattern__ = r'http://(?:www\.)?wupload\..+?/file/((\w+/)?\d+)(/.*)?'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/X7To.py b/module/plugins/hoster/X7To.py
index 8e2dd3a53..d329b5270 100644
--- a/module/plugins/hoster/X7To.py
+++ b/module/plugins/hoster/X7To.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class X7To(DeadHoster):
__name__ = "X7To"
__type__ = "hoster"
- __version__ = "0.41"
+ __version__ = "0.42"
__pattern__ = r'http://(?:www\.)?x7\.to/'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/XFileSharingPro.py b/module/plugins/hoster/XFileSharingPro.py
index f58b7f0de..860fd5309 100644
--- a/module/plugins/hoster/XFileSharingPro.py
+++ b/module/plugins/hoster/XFileSharingPro.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class XFileSharingPro(XFSHoster):
__name__ = "XFileSharingPro"
__type__ = "hoster"
- __version__ = "0.48"
+ __version__ = "0.49"
__pattern__ = r'https?://(?:www\.)?(?:\w+\.)*?(?P<DOMAIN>(?:[\d.]+|[\w\-^_]{3,}(?:\.[a-zA-Z]{2,}){1,2})(?:\:\d+)?)/(?:embed-)?\w{12}(?:\W|$)'
@@ -49,9 +49,9 @@ class XFileSharingPro(XFSHoster):
def setup(self):
- self.chunkLimit = 1
- self.resumeDownload = self.premium
- self.multiDL = True
+ self.chunk_limit = 1
+ self.resume_download = self.premium
+ self.multi_dl = True
getInfo = create_getInfo(XFileSharingPro)
diff --git a/module/plugins/hoster/XHamsterCom.py b/module/plugins/hoster/XHamsterCom.py
index d9441d792..db5dcdee3 100644
--- a/module/plugins/hoster/XHamsterCom.py
+++ b/module/plugins/hoster/XHamsterCom.py
@@ -18,7 +18,7 @@ def clean_json(json_expr):
class XHamsterCom(Hoster):
__name__ = "XHamsterCom"
__type__ = "hoster"
- __version__ = "0.13"
+ __version__ = "0.14"
__pattern__ = r'http://(?:www\.)?xhamster\.com/movies/.+'
__config__ = [("type", ".mp4;.flv", "Preferred type", ".mp4")]
@@ -34,8 +34,8 @@ class XHamsterCom(Hoster):
if not self.file_exists():
self.offline()
- if self.getConfig('type'):
- self.desired_fmt = self.getConfig('type')
+ if self.get_config('type'):
+ self.desired_fmt = self.get_config('type')
pyfile.name = self.get_file_name() + self.desired_fmt
self.download(self.get_file_url())
@@ -80,7 +80,7 @@ class XHamsterCom(Hoster):
self.error(_("file_url not found"))
file_url = file_url.group(1)
long_url = srv_url + file_url
- self.logDebug("long_url = " + long_url)
+ self.log_debug("long_url = " + long_url)
else:
if flashvars['file']:
file_url = urllib.unquote(flashvars['file'])
@@ -89,10 +89,10 @@ class XHamsterCom(Hoster):
if url_mode == '3':
long_url = file_url
- self.logDebug("long_url = " + long_url)
+ self.log_debug("long_url = " + long_url)
else:
long_url = srv_url + "key=" + file_url
- self.logDebug("long_url = " + long_url)
+ self.log_debug("long_url = " + long_url)
return long_url
diff --git a/module/plugins/hoster/XVideosCom.py b/module/plugins/hoster/XVideosCom.py
index e4deccfe8..fc528bdc9 100644
--- a/module/plugins/hoster/XVideosCom.py
+++ b/module/plugins/hoster/XVideosCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Hoster import Hoster
class XVideosCom(Hoster):
__name__ = "XVideos.com"
__type__ = "hoster"
- __version__ = "0.11"
+ __version__ = "0.12"
__pattern__ = r'http://(?:www\.)?xvideos\.com/video(\d+)'
diff --git a/module/plugins/hoster/XdadevelopersCom.py b/module/plugins/hoster/XdadevelopersCom.py
index 45d1e92cb..5ddd2b5bc 100644
--- a/module/plugins/hoster/XdadevelopersCom.py
+++ b/module/plugins/hoster/XdadevelopersCom.py
@@ -11,7 +11,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class XdadevelopersCom(SimpleHoster):
__name__ = "XdadevelopersCom"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'https?://(?:www\.)?forum\.xda-developers\.com/devdb/project/dl/\?id=\d+'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -27,12 +27,12 @@ class XdadevelopersCom(SimpleHoster):
def setup(self):
- self.multiDL = True
- self.resumeDownload = True
- self.chunkLimit = 1
+ self.multi_dl = True
+ self.resume_download = True
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
self.link = pyfile.url + "&task=get" #@TODO: Revert to `get={'task': "get"}` in 0.4.10
diff --git a/module/plugins/hoster/Xdcc.py b/module/plugins/hoster/Xdcc.py
index f1508f0e4..d78794f99 100644
--- a/module/plugins/hoster/Xdcc.py
+++ b/module/plugins/hoster/Xdcc.py
@@ -15,7 +15,7 @@ from module.utils import save_join as fs_join
class Xdcc(Hoster):
__name__ = "Xdcc"
__type__ = "hoster"
- __version__ = "0.33"
+ __version__ = "0.34"
__config__ = [("nick", "str", "Nickname", "pyload"),
("ident", "str", "Ident", "pyloadident"),
@@ -29,7 +29,7 @@ class Xdcc(Hoster):
def setup(self):
self.debug = 0 #: 0,1,2
self.timeout = 30
- self.multiDL = False
+ self.multi_dl = False
def process(self, pyfile):
@@ -39,8 +39,8 @@ class Xdcc(Hoster):
self.pyfile = pyfile
for _i in xrange(0, 3):
try:
- nmn = self.doDownload(pyfile.url)
- self.logDebug("Download of %s finished." % nmn)
+ nmn = self.do_download(pyfile.url)
+ self.log_debug("Download of %s finished." % nmn)
return
except socket.error, e:
if hasattr(e, "errno"):
@@ -49,8 +49,8 @@ class Xdcc(Hoster):
errno = e.args[0]
if errno == 10054:
- self.logDebug("Server blocked our ip, retry in 5 min")
- self.setWait(300)
+ self.log_debug("Server blocked our ip, retry in 5 min")
+ self.set_wait(300)
self.wait()
continue
@@ -59,7 +59,7 @@ class Xdcc(Hoster):
self.fail(_("Server blocked our ip, retry again later manually"))
- def doDownload(self, url):
+ def do_download(self, url):
self.pyfile.setStatus("waiting") #: real link
m = re.match(r'xdcc://(.*?)/#?(.*?)/(.*?)/#?(\d+)/?', url)
@@ -67,9 +67,9 @@ class Xdcc(Hoster):
chan = m.group(2)
bot = m.group(3)
pack = m.group(4)
- nick = self.getConfig('nick')
- ident = self.getConfig('ident')
- real = self.getConfig('realname')
+ nick = self.get_config('nick')
+ ident = self.get_config('ident')
+ real = self.get_config('realname')
temp = server.split(':')
ln = len(temp)
@@ -91,7 +91,7 @@ class Xdcc(Hoster):
sock.send("NICK %s\r\n" % nick)
sock.send("USER %s %s bla :%s\r\n" % (ident, host, real))
- self.setWait(3)
+ self.set_wait(3)
self.wait()
sock.send("JOIN #%s\r\n" % chan)
@@ -153,10 +153,10 @@ class Xdcc(Hoster):
if nick == msg['target'][0:len(nick)] and "PRIVMSG" == msg['action']:
if msg['text'] == "\x01VERSION\x01":
- self.logDebug("Sending CTCP VERSION")
+ self.log_debug("Sending CTCP VERSION")
sock.send("NOTICE %s :%s\r\n" % (msg['origin'], "pyLoad! IRC Interface"))
elif msg['text'] == "\x01TIME\x01":
- self.logDebug("Sending CTCP TIME")
+ self.log_debug("Sending CTCP TIME")
sock.send("NOTICE %s :%d\r\n" % (msg['origin'], time.time()))
elif msg['text'] == "\x01LAG\x01":
pass #: don't know how to answer
@@ -192,17 +192,17 @@ class Xdcc(Hoster):
download_folder = self.core.config.get("general", "download_folder")
filename = fs_join(download_folder, packname)
- self.logInfo(_("Downloading %s from %s:%d") % (packname, ip, port))
+ self.log_info(_("Downloading %s from %s:%d") % (packname, ip, port))
self.pyfile.setStatus("downloading")
newname = self.req.download(ip, port, filename, sock, self.pyfile.setProgress)
if newname and newname != filename:
- self.logInfo(_("%(name)s saved as %(newname)s") % {"name": self.pyfile.name, "newname": newname})
+ self.log_info(_("%(name)s saved as %(newname)s") % {"name": self.pyfile.name, "newname": newname})
filename = newname
#: kill IRC socket
#: sock.send("QUIT :byebye\r\n")
sock.close()
- self.lastDownload = filename
- return self.lastDownload
+ self.last_download = filename
+ return self.last_download
diff --git a/module/plugins/hoster/YadiSk.py b/module/plugins/hoster/YadiSk.py
index 3b4c9d985..5c0c1a800 100644
--- a/module/plugins/hoster/YadiSk.py
+++ b/module/plugins/hoster/YadiSk.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class YadiSk(SimpleHoster):
__name__ = "YadiSk"
__type__ = "hoster"
- __version__ = "0.05"
+ __version__ = "0.06"
__pattern__ = r'https?://yadi\.sk/d/[\w-]+'
@@ -23,8 +23,8 @@ class YadiSk(SimpleHoster):
@classmethod
- def getInfo(cls, url="", html=""):
- info = super(YadiSk, cls).getInfo(url, html)
+ def get_info(cls, url="", html=""):
+ info = super(YadiSk, cls).get_info(url, html)
if html:
if 'idclient' not in info:
@@ -59,12 +59,12 @@ class YadiSk(SimpleHoster):
def setup(self):
- self.resumeDownload = False
- self.multiDL = False
- self.chunkLimit = 1
+ self.resume_download = False
+ self.multi_dl = False
+ self.chunk_limit = 1
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
if any(True for _k in ['id', 'sk', 'version', 'idclient'] if _k not in self.info):
self.error(_("Missing JSON data"))
diff --git a/module/plugins/hoster/YibaishiwuCom.py b/module/plugins/hoster/YibaishiwuCom.py
index 00185c05a..e63cd89d0 100644
--- a/module/plugins/hoster/YibaishiwuCom.py
+++ b/module/plugins/hoster/YibaishiwuCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class YibaishiwuCom(SimpleHoster):
__name__ = "YibaishiwuCom"
__type__ = "hoster"
- __version__ = "0.14"
+ __version__ = "0.15"
__pattern__ = r'http://(?:www\.)?(?:u\.)?115\.com/file/(?P<ID>\w+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -27,14 +27,14 @@ class YibaishiwuCom(SimpleHoster):
LINK_FREE_PATTERN = r'(/\?ct=(pickcode|download)[^"\']+)'
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m is None:
self.error(_("LINK_FREE_PATTERN not found"))
url = m.group(1)
- self.logDebug(('FREEUSER' if m.group(2) == 'download' else 'GUEST') + ' URL', url)
+ self.log_debug(('FREEUSER' if m.group(2) == 'download' else 'GUEST') + ' URL', url)
res = json_loads(self.load(urlparse.urljoin("http://115.com", url), decode=False))
if "urls" in res:
@@ -49,7 +49,7 @@ class YibaishiwuCom(SimpleHoster):
for mr in mirrors:
try:
self.link = mr['url'].replace("\\", "")
- self.logDebug("Trying URL: " + self.link)
+ self.log_debug("Trying URL: " + self.link)
break
except Exception:
continue
diff --git a/module/plugins/hoster/YoupornCom.py b/module/plugins/hoster/YoupornCom.py
index fa40714c6..959ee83a5 100644
--- a/module/plugins/hoster/YoupornCom.py
+++ b/module/plugins/hoster/YoupornCom.py
@@ -8,7 +8,7 @@ from module.plugins.internal.Hoster import Hoster
class YoupornCom(Hoster):
__name__ = "YoupornCom"
__type__ = "hoster"
- __version__ = "0.21"
+ __version__ = "0.22"
__pattern__ = r'http://(?:www\.)?youporn\.com/watch/.+'
diff --git a/module/plugins/hoster/YourfilesTo.py b/module/plugins/hoster/YourfilesTo.py
index 7db6129e2..c6e106027 100644
--- a/module/plugins/hoster/YourfilesTo.py
+++ b/module/plugins/hoster/YourfilesTo.py
@@ -9,7 +9,7 @@ from module.plugins.internal.Hoster import Hoster
class YourfilesTo(Hoster):
__name__ = "YourfilesTo"
__type__ = "hoster"
- __version__ = "0.23"
+ __version__ = "0.24"
__pattern__ = r'http://(?:www\.)?yourfiles\.(to|biz)/\?d=\w+'
@@ -32,7 +32,7 @@ class YourfilesTo(Hoster):
self.pyfile.name = self.get_file_name()
wait_time = self.get_waiting_time()
- self.setWait(wait_time)
+ self.set_wait(wait_time)
self.wait()
diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py
index c4e1ebf28..248fc3715 100644
--- a/module/plugins/hoster/YoutubeCom.py
+++ b/module/plugins/hoster/YoutubeCom.py
@@ -33,7 +33,7 @@ def which(program):
class YoutubeCom(Hoster):
__name__ = "YoutubeCom"
__type__ = "hoster"
- __version__ = "0.43"
+ __version__ = "0.44"
__pattern__ = r'https?://(?:[^/]*\.)?(youtube\.com|youtu\.be)/watch\?(?:.*&)?v=.+'
__config__ = [("quality", "sd;hd;fullhd;240p;360p;480p;720p;1080p;3072p", "Quality Setting" , "hd" ),
@@ -80,8 +80,8 @@ class YoutubeCom(Hoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
+ self.resume_download = True
+ self.multi_dl = True
def process(self, pyfile):
@@ -92,10 +92,10 @@ class YoutubeCom(Hoster):
self.offline()
if "We have been receiving a large volume of requests from your network." in html:
- self.tempOffline()
+ self.temp_offline()
- #get config
- use3d = self.getConfig('3d')
+ # get config
+ use3d = self.get_config('3d')
if use3d:
quality = {"sd": 82, "hd": 84, "fullhd": 85, "240p": 83, "360p": 82,
@@ -104,27 +104,27 @@ class YoutubeCom(Hoster):
quality = {"sd": 18, "hd": 22, "fullhd": 37, "240p": 5, "360p": 18,
"480p": 35, "720p": 22, "1080p": 37, "3072p": 38}
- desired_fmt = self.getConfig('fmt')
+ desired_fmt = self.get_config('fmt')
if not desired_fmt:
- desired_fmt = quality.get(self.getConfig('quality'), 18)
+ desired_fmt = quality.get(self.get_config('quality'), 18)
elif desired_fmt not in self.formats:
- self.logWarning(_("FMT %d unknown, using default") % desired_fmt)
+ self.log_warning(_("FMT %d unknown, using default") % desired_fmt)
desired_fmt = 0
- #parse available streams
+ # parse available streams
streams = re.search(r'"url_encoded_fmt_stream_map":"(.+?)",', html).group(1)
streams = [x.split('\u0026') for x in streams.split(',')]
streams = [dict((y.split('=', 1)) for y in x) for x in streams]
streams = [(int(x['itag']), urllib.unquote(x['url'])) for x in streams]
- #: self.logDebug("Found links: %s" % streams)
+ #: self.log_debug("Found links: %s" % streams)
- self.logDebug("AVAILABLE STREAMS: %s" % [x[0] for x in streams])
+ self.log_debug("AVAILABLE STREAMS: %s" % [x[0] for x in streams])
- #build dictionary of supported itags (3D/2D)
- allowed = lambda x: self.getConfig(self.formats[x][0])
+ # build dictionary of supported itags (3D/2D)
+ allowed = lambda x: self.get_config(self.formats[x][0])
streams = [x for x in streams if x[0] in self.formats and allowed(x[0])]
if not streams:
@@ -132,36 +132,36 @@ class YoutubeCom(Hoster):
fmt_dict = dict([x for x in streams if self.formats[x[0]][4] == use3d] or streams)
- self.logDebug("DESIRED STREAM: ITAG:%d (%s) %sfound, %sallowed" %
+ self.log_debug("DESIRED STREAM: ITAG:%d (%s) %sfound, %sallowed" %
(desired_fmt, "%s %dx%d Q:%d 3D:%s" % self.formats[desired_fmt],
"" if desired_fmt in fmt_dict else "NOT ", "" if allowed(desired_fmt) else "NOT "))
- #return fmt nearest to quality index
+ # return fmt nearest to quality index
if desired_fmt in fmt_dict and allowed(desired_fmt):
fmt = desired_fmt
else:
sel = lambda x: self.formats[x][3] #: select quality index
comp = lambda x, y: abs(sel(x) - sel(y))
- self.logDebug("Choosing nearest fmt: %s" % [(x, allowed(x), comp(x, desired_fmt)) for x in fmt_dict.keys()])
+ self.log_debug("Choosing nearest fmt: %s" % [(x, allowed(x), comp(x, desired_fmt)) for x in fmt_dict.keys()])
fmt = reduce(lambda x, y: x if comp(x, desired_fmt) <= comp(y, desired_fmt) and
sel(x) > sel(y) else y, fmt_dict.keys())
- self.logDebug("Chosen fmt: %s" % fmt)
+ self.log_debug("Chosen fmt: %s" % fmt)
url = fmt_dict[fmt]
- self.logDebug("URL: %s" % url)
+ self.log_debug("URL: %s" % url)
- #set file name
+ # set file name
file_suffix = self.formats[fmt][0] if fmt in self.formats else ".flv"
file_name_pattern = '<meta name="title" content="(.+?)">'
name = re.search(file_name_pattern, html).group(1).replace("/", "")
#: Cleaning invalid characters from the file name
name = name.encode('ascii', 'replace')
- for c in self.invalidChars:
+ for c in self.invalid_chars:
name = name.replace(c, '_')
pyfile.name = html_unescape(name)
diff --git a/module/plugins/hoster/ZDF.py b/module/plugins/hoster/ZDF.py
index 2a4708a0d..4829f1bf8 100644
--- a/module/plugins/hoster/ZDF.py
+++ b/module/plugins/hoster/ZDF.py
@@ -10,7 +10,7 @@ from module.plugins.internal.Hoster import Hoster
class ZDF(Hoster):
__name__ = "ZDF Mediathek"
__type__ = "hoster"
- __version__ = "0.81"
+ __version__ = "0.82"
__pattern__ = r'http://(?:www\.)?zdf\.de/ZDFmediathek/\D*(\d+)\D*'
diff --git a/module/plugins/hoster/ZShareNet.py b/module/plugins/hoster/ZShareNet.py
index 6e4508a18..10925b1b8 100644
--- a/module/plugins/hoster/ZShareNet.py
+++ b/module/plugins/hoster/ZShareNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.DeadHoster import DeadHoster, create_getInfo
class ZShareNet(DeadHoster):
__name__ = "ZShareNet"
__type__ = "hoster"
- __version__ = "0.21"
+ __version__ = "0.22"
__pattern__ = r'https?://(?:ww[2w]\.)?zshares?\.net/.+'
__config__ = [] #@TODO: Remove in 0.4.10
diff --git a/module/plugins/hoster/ZahikiNet.py b/module/plugins/hoster/ZahikiNet.py
index b2705662b..ad0abc098 100644
--- a/module/plugins/hoster/ZahikiNet.py
+++ b/module/plugins/hoster/ZahikiNet.py
@@ -6,7 +6,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class ZahikiNet(SimpleHoster):
__name__ = "ZahikiNet"
__type__ = "hoster"
- __version__ = "0.01"
+ __version__ = "0.02"
__pattern__ = r'https?://(?:www\.)?zahiki\.net/\w+/.+'
@@ -24,9 +24,9 @@ class ZahikiNet(SimpleHoster):
def setup(self):
- self.resumeDownload = True
- self.multiDL = True
- self.limitDL = 6
+ self.resume_download = True
+ self.multi_dl = True
+ self.limit_dl = 6
getInfo = create_getInfo(ZahikiNet)
diff --git a/module/plugins/hoster/ZeveraCom.py b/module/plugins/hoster/ZeveraCom.py
index 85a813acf..2dfd9896c 100644
--- a/module/plugins/hoster/ZeveraCom.py
+++ b/module/plugins/hoster/ZeveraCom.py
@@ -9,7 +9,7 @@ from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo
class ZeveraCom(MultiHoster):
__name__ = "ZeveraCom"
__type__ = "hoster"
- __version__ = "0.31"
+ __version__ = "0.32"
__pattern__ = r'https?://(?:www\.)zevera\.com/(getFiles\.ashx|Members/download\.ashx)\?.*ourl=.+'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
@@ -24,7 +24,7 @@ class ZeveraCom(MultiHoster):
FILE_ERRORS = [("Error", r'action="ErrorDownload.aspx')]
- def handlePremium(self, pyfile):
+ def handle_premium(self, pyfile):
self.link = "https://%s/getFiles.ashx?ourl=%s" % (self.account.HOSTER_DOMAIN, pyfile.url)
diff --git a/module/plugins/hoster/ZippyshareCom.py b/module/plugins/hoster/ZippyshareCom.py
index 302554624..80d495f78 100644
--- a/module/plugins/hoster/ZippyshareCom.py
+++ b/module/plugins/hoster/ZippyshareCom.py
@@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class ZippyshareCom(SimpleHoster):
__name__ = "ZippyshareCom"
__type__ = "hoster"
- __version__ = "0.79"
+ __version__ = "0.80"
__pattern__ = r'http://www\d{0,2}\.zippyshare\.com/v(/|iew\.jsp.*key=)(?P<KEY>[\w^_]+)'
__config__ = [("use_premium", "bool", "Use premium account if available", True)]
@@ -33,12 +33,12 @@ class ZippyshareCom(SimpleHoster):
def setup(self):
- self.chunkLimit = -1
- self.multiDL = True
- self.resumeDownload = True
+ self.chunk_limit = -1
+ self.multi_dl = True
+ self.resume_download = True
- def handleFree(self, pyfile):
+ def handle_free(self, pyfile):
recaptcha = ReCaptcha(self)
captcha_key = recaptcha.detect_key()
@@ -65,7 +65,7 @@ class ZippyshareCom(SimpleHoster):
#: meant to be populated with the initialization of all the DOM elements found in the scripts
initScripts = set()
- def replElementById(element):
+ def repl_element_by_id(element):
id = element.group(1) #: id might be either 'x' (a real id) or x (a variable)
attr = element.group(4) #: attr might be None
@@ -81,7 +81,7 @@ class ZippyshareCom(SimpleHoster):
#: handle all getElementById
reVar = r'document.getElementById\(([\'"\w-]+)\)(\.)?(getAttribute\([\'"])?(\w+)?([\'"]\))?'
- scripts = [re.sub(reVar, replElementById, script) for script in scripts if script]
+ scripts = [re.sub(reVar, repl_element_by_id, script) for script in scripts if script]
#: add try/catch in JS to handle deliberate errors
scripts = ['\n'.join(('try{', script, '} catch(err){}')) for script in scripts]