summaryrefslogtreecommitdiffstats
path: root/pyload/plugin/hoster
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-26 17:04:38 +0100
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-03-26 17:04:38 +0100
commitccb6aaee9d987b56faf19fb48dd06a04ff8ca721 (patch)
tree6a385417ff77f3ed17329e2d606f80b673bdb3c0 /pyload/plugin/hoster
parentPrepare to merging (diff)
parentTiny code cosmetics (diff)
downloadpyload-ccb6aaee9d987b56faf19fb48dd06a04ff8ca721.tar.xz
Merge branch 'stable' into 0.4.10
Conflicts: module/plugins/accounts/Keep2ShareCc.py module/plugins/captcha/OCR.py module/plugins/captcha/captcha.py module/plugins/crypter/DailymotionBatch.py module/plugins/crypter/DailymotionComFolder.py module/plugins/crypter/YoutubeBatch.py module/plugins/crypter/YoutubeComFolder.py module/plugins/internal/CaptchaService.py pyload/plugin/Extractor.py pyload/plugin/OCR.py pyload/plugin/account/DebridItaliaCom.py pyload/plugin/account/MegaRapidCz.py pyload/plugin/account/NoPremiumPl.py pyload/plugin/account/RapideoPl.py pyload/plugin/addon/AndroidPhoneNotify.py pyload/plugin/addon/Checksum.py pyload/plugin/addon/ClickAndLoad.py pyload/plugin/addon/DeleteFinished.py pyload/plugin/addon/DownloadScheduler.py pyload/plugin/addon/ExternalScripts.py pyload/plugin/addon/ExtractArchive.py pyload/plugin/addon/HotFolder.py pyload/plugin/addon/IRCInterface.py pyload/plugin/addon/JustPremium.py pyload/plugin/addon/MergeFiles.py pyload/plugin/addon/MultiHome.py pyload/plugin/addon/RestartFailed.py pyload/plugin/addon/RestartSlow.py pyload/plugin/addon/SkipRev.py pyload/plugin/addon/UnSkipOnFail.py pyload/plugin/addon/UpdateManager.py pyload/plugin/addon/WindowsPhoneNotify.py pyload/plugin/crypter/DDLMusicOrg.py pyload/plugin/crypter/DailymotionBatch.py pyload/plugin/crypter/DevhostSt.py pyload/plugin/crypter/EmbeduploadCom.py pyload/plugin/crypter/MultiloadCz.py pyload/plugin/crypter/YoutubeBatch.py pyload/plugin/extractor/SevenZip.py pyload/plugin/extractor/UnRar.py pyload/plugin/extractor/UnZip.py pyload/plugin/hook/BypassCaptcha.py pyload/plugin/hook/Captcha9Kw.py pyload/plugin/hook/CaptchaBrotherhood.py pyload/plugin/hook/DeathByCaptcha.py pyload/plugin/hook/ExpertDecoders.py pyload/plugin/hook/ImageTyperz.py pyload/plugin/hook/XFileSharingPro.py pyload/plugin/hoster/AlldebridCom.py pyload/plugin/hoster/CzshareCom.py pyload/plugin/hoster/EuroshareEu.py pyload/plugin/hoster/FastixRu.py pyload/plugin/hoster/FastshareCz.py pyload/plugin/hoster/GooIm.py pyload/plugin/hoster/MediafireCom.py pyload/plugin/hoster/MegaDebridEu.py pyload/plugin/hoster/NitroflareCom.py pyload/plugin/hoster/OverLoadMe.py pyload/plugin/hoster/PremiumTo.py pyload/plugin/hoster/PremiumizeMe.py pyload/plugin/hoster/RapidgatorNet.py pyload/plugin/hoster/RealdebridCom.py pyload/plugin/hoster/SimplyPremiumCom.py pyload/plugin/hoster/SimplydebridCom.py pyload/plugin/hoster/SmoozedCom.py pyload/plugin/hoster/SoundcloudCom.py pyload/plugin/hoster/UlozTo.py pyload/plugin/hoster/UploadableCh.py pyload/plugin/hoster/UploadedTo.py pyload/plugin/hoster/UploadheroCom.py pyload/plugin/hoster/VeehdCom.py pyload/plugin/hoster/VimeoCom.py pyload/plugin/hoster/ZeveraCom.py pyload/plugin/hoster/ZippyshareCom.py pyload/plugin/internal/BasePlugin.py pyload/plugin/internal/MultiHoster.py pyload/plugin/internal/SimpleDereferer.py pyload/plugin/internal/SimpleHoster.py pyload/plugin/internal/XFSHoster.py pyload/plugin/ocr/GigasizeCom.py pyload/plugin/ocr/LinksaveIn.py pyload/plugin/ocr/NetloadIn.py pyload/plugin/ocr/ShareonlineBiz.py
Diffstat (limited to 'pyload/plugin/hoster')
-rw-r--r--pyload/plugin/hoster/AlldebridCom.py26
-rw-r--r--pyload/plugin/hoster/AndroidfilehostCom.py1
-rw-r--r--pyload/plugin/hoster/BasketbuildCom.py1
-rw-r--r--pyload/plugin/hoster/BayfilesCom.py1
-rw-r--r--pyload/plugin/hoster/BezvadataCz.py1
-rw-r--r--pyload/plugin/hoster/BitshareCom.py3
-rw-r--r--pyload/plugin/hoster/BoltsharingCom.py1
-rw-r--r--pyload/plugin/hoster/CatShareNet.py8
-rw-r--r--pyload/plugin/hoster/CloudzerNet.py1
-rw-r--r--pyload/plugin/hoster/CloudzillaTo.py1
-rw-r--r--pyload/plugin/hoster/CrockoCom.py1
-rw-r--r--pyload/plugin/hoster/CyberlockerCh.py1
-rw-r--r--pyload/plugin/hoster/CzshareCom.py13
-rw-r--r--pyload/plugin/hoster/DailymotionCom.py2
-rw-r--r--pyload/plugin/hoster/DataHu.py1
-rw-r--r--pyload/plugin/hoster/DataportCz.py1
-rw-r--r--pyload/plugin/hoster/DateiTo.py1
-rw-r--r--pyload/plugin/hoster/DdlstorageCom.py1
-rw-r--r--pyload/plugin/hoster/DebridItaliaCom.py1
-rw-r--r--pyload/plugin/hoster/DepositfilesCom.py60
-rw-r--r--pyload/plugin/hoster/DevhostSt.py1
-rw-r--r--pyload/plugin/hoster/DlFreeFr.py1
-rw-r--r--pyload/plugin/hoster/DodanePl.py1
-rw-r--r--pyload/plugin/hoster/DuploadOrg.py1
-rw-r--r--pyload/plugin/hoster/EdiskCz.py1
-rw-r--r--pyload/plugin/hoster/EgoFilesCom.py1
-rw-r--r--pyload/plugin/hoster/EnteruploadCom.py1
-rw-r--r--pyload/plugin/hoster/EpicShareNet.py1
-rw-r--r--pyload/plugin/hoster/EuroshareEu.py7
-rw-r--r--pyload/plugin/hoster/ExtabitCom.py1
-rw-r--r--pyload/plugin/hoster/FastixRu.py22
-rw-r--r--pyload/plugin/hoster/FastshareCz.py14
-rw-r--r--pyload/plugin/hoster/FileApeCom.py1
-rw-r--r--pyload/plugin/hoster/FileSharkPl.py33
-rw-r--r--pyload/plugin/hoster/FileStoreTo.py1
-rw-r--r--pyload/plugin/hoster/FilebeerInfo.py1
-rw-r--r--pyload/plugin/hoster/FilecloudIo.py1
-rw-r--r--pyload/plugin/hoster/FilefactoryCom.py7
-rw-r--r--pyload/plugin/hoster/FilepostCom.py10
-rw-r--r--pyload/plugin/hoster/FilepupNet.py1
-rw-r--r--pyload/plugin/hoster/FilerNet.py15
-rw-r--r--pyload/plugin/hoster/FileshareInUa.py1
-rw-r--r--pyload/plugin/hoster/FilesonicCom.py1
-rw-r--r--pyload/plugin/hoster/FilezyNet.py1
-rw-r--r--pyload/plugin/hoster/FiredriveCom.py1
-rw-r--r--pyload/plugin/hoster/FlyFilesNet.py3
-rw-r--r--pyload/plugin/hoster/FourSharedCom.py1
-rw-r--r--pyload/plugin/hoster/FreeWayMe.py1
-rw-r--r--pyload/plugin/hoster/FreevideoCz.py1
-rw-r--r--pyload/plugin/hoster/FshareVn.py7
-rw-r--r--pyload/plugin/hoster/GigapetaCom.py1
-rw-r--r--pyload/plugin/hoster/GooIm.py3
-rw-r--r--pyload/plugin/hoster/GoogledriveCom.py1
-rw-r--r--pyload/plugin/hoster/HellshareCz.py1
-rw-r--r--pyload/plugin/hoster/HellspyCz.py1
-rw-r--r--pyload/plugin/hoster/HotfileCom.py1
-rw-r--r--pyload/plugin/hoster/IFileWs.py1
-rw-r--r--pyload/plugin/hoster/IcyFilesCom.py1
-rw-r--r--pyload/plugin/hoster/IfileIt.py1
-rw-r--r--pyload/plugin/hoster/IfolderRu.py13
-rw-r--r--pyload/plugin/hoster/JumbofilesCom.py1
-rw-r--r--pyload/plugin/hoster/Keep2ShareCc.py1
-rw-r--r--pyload/plugin/hoster/KickloadCom.py1
-rw-r--r--pyload/plugin/hoster/KingfilesNet.py5
-rw-r--r--pyload/plugin/hoster/LemUploadsCom.py1
-rw-r--r--pyload/plugin/hoster/LetitbitNet.py17
-rw-r--r--pyload/plugin/hoster/LinksnappyCom.py1
-rw-r--r--pyload/plugin/hoster/LoadTo.py1
-rw-r--r--pyload/plugin/hoster/LomafileCom.py1
-rw-r--r--pyload/plugin/hoster/LuckyShareNet.py1
-rw-r--r--pyload/plugin/hoster/MediafireCom.py127
-rw-r--r--pyload/plugin/hoster/MegaCoNz.py2
-rw-r--r--pyload/plugin/hoster/MegaDebridEu.py48
-rw-r--r--pyload/plugin/hoster/MegaFilesSe.py1
-rw-r--r--pyload/plugin/hoster/MegaRapidCz.py1
-rw-r--r--pyload/plugin/hoster/MegareleaseOrg.py1
-rw-r--r--pyload/plugin/hoster/MegasharesCom.py6
-rw-r--r--pyload/plugin/hoster/MegauploadCom.py1
-rw-r--r--pyload/plugin/hoster/MegavideoCom.py1
-rw-r--r--pyload/plugin/hoster/MultishareCz.py1
-rw-r--r--pyload/plugin/hoster/MyfastfileCom.py1
-rw-r--r--pyload/plugin/hoster/MystoreTo.py1
-rw-r--r--pyload/plugin/hoster/NahrajCz.py1
-rw-r--r--pyload/plugin/hoster/NarodRu.py1
-rw-r--r--pyload/plugin/hoster/NetloadIn.py12
-rw-r--r--pyload/plugin/hoster/NitroflareCom.py18
-rw-r--r--pyload/plugin/hoster/NoPremiumPl.py1
-rw-r--r--pyload/plugin/hoster/NosuploadCom.py4
-rw-r--r--pyload/plugin/hoster/NowDownloadSx.py5
-rw-r--r--pyload/plugin/hoster/NowVideoSx.py5
-rw-r--r--pyload/plugin/hoster/OneFichierCom.py5
-rw-r--r--pyload/plugin/hoster/OronCom.py1
-rw-r--r--pyload/plugin/hoster/OverLoadMe.py29
-rw-r--r--pyload/plugin/hoster/PandaplaNet.py1
-rw-r--r--pyload/plugin/hoster/PotloadCom.py1
-rw-r--r--pyload/plugin/hoster/PremiumTo.py7
-rw-r--r--pyload/plugin/hoster/PremiumizeMe.py1
-rw-r--r--pyload/plugin/hoster/PromptfileCom.py1
-rw-r--r--pyload/plugin/hoster/PrzeklejPl.py1
-rw-r--r--pyload/plugin/hoster/QuickshareCz.py1
-rw-r--r--pyload/plugin/hoster/RPNetBiz.py5
-rw-r--r--pyload/plugin/hoster/RapideoPl.py1
-rw-r--r--pyload/plugin/hoster/RapidgatorNet.py37
-rw-r--r--pyload/plugin/hoster/RapiduNet.py7
-rw-r--r--pyload/plugin/hoster/RealdebridCom.py29
-rw-r--r--pyload/plugin/hoster/RehostTo.py1
-rw-r--r--pyload/plugin/hoster/RemixshareCom.py1
-rw-r--r--pyload/plugin/hoster/RgHostNet.py1
-rw-r--r--pyload/plugin/hoster/SendspaceCom.py1
-rw-r--r--pyload/plugin/hoster/Share76Com.py1
-rw-r--r--pyload/plugin/hoster/ShareFilesCo.py1
-rw-r--r--pyload/plugin/hoster/SharebeesCom.py1
-rw-r--r--pyload/plugin/hoster/ShareonlineBiz.py11
-rw-r--r--pyload/plugin/hoster/SharingmatrixCom.py1
-rw-r--r--pyload/plugin/hoster/ShragleCom.py1
-rw-r--r--pyload/plugin/hoster/SimplyPremiumCom.py3
-rw-r--r--pyload/plugin/hoster/SimplydebridCom.py9
-rw-r--r--pyload/plugin/hoster/SmoozedCom.py7
-rw-r--r--pyload/plugin/hoster/SockshareCom.py1
-rw-r--r--pyload/plugin/hoster/SoundcloudCom.py89
-rw-r--r--pyload/plugin/hoster/SpeedLoadOrg.py1
-rw-r--r--pyload/plugin/hoster/SpeedfileCz.py1
-rw-r--r--pyload/plugin/hoster/SpeedyshareCom.py1
-rw-r--r--pyload/plugin/hoster/StorageTo.py1
-rw-r--r--pyload/plugin/hoster/TurbobitNet.py1
-rw-r--r--pyload/plugin/hoster/TurbouploadCom.py1
-rw-r--r--pyload/plugin/hoster/TwoSharedCom.py1
-rw-r--r--pyload/plugin/hoster/UlozTo.py15
-rw-r--r--pyload/plugin/hoster/UloziskoSk.py1
-rw-r--r--pyload/plugin/hoster/UnibytesCom.py1
-rw-r--r--pyload/plugin/hoster/UnrestrictLi.py9
-rw-r--r--pyload/plugin/hoster/UploadStationCom.py1
-rw-r--r--pyload/plugin/hoster/UploadableCh.py18
-rw-r--r--pyload/plugin/hoster/UploadboxCom.py1
-rw-r--r--pyload/plugin/hoster/UploadedTo.py12
-rw-r--r--pyload/plugin/hoster/UploadhereCom.py1
-rw-r--r--pyload/plugin/hoster/UploadheroCom.py49
-rw-r--r--pyload/plugin/hoster/UploadkingCom.py1
-rw-r--r--pyload/plugin/hoster/UpstoreNet.py1
-rw-r--r--pyload/plugin/hoster/UptoboxCom.py7
-rw-r--r--pyload/plugin/hoster/VeehdCom.py4
-rw-r--r--pyload/plugin/hoster/VeohCom.py5
-rw-r--r--pyload/plugin/hoster/VimeoCom.py9
-rw-r--r--pyload/plugin/hoster/Vipleech4UCom.py1
-rw-r--r--pyload/plugin/hoster/WarserverCz.py1
-rw-r--r--pyload/plugin/hoster/WebshareCz.py1
-rw-r--r--pyload/plugin/hoster/WrzucTo.py1
-rw-r--r--pyload/plugin/hoster/WuploadCom.py1
-rw-r--r--pyload/plugin/hoster/X7To.py1
-rw-r--r--pyload/plugin/hoster/XFileSharingPro.py5
-rw-r--r--pyload/plugin/hoster/XHamsterCom.py6
-rw-r--r--pyload/plugin/hoster/XdadevelopersCom.py1
-rw-r--r--pyload/plugin/hoster/Xdcc.py16
-rw-r--r--pyload/plugin/hoster/YibaishiwuCom.py1
-rw-r--r--pyload/plugin/hoster/YoutubeCom.py20
-rw-r--r--pyload/plugin/hoster/ZShareNet.py1
-rw-r--r--pyload/plugin/hoster/ZeveraCom.py7
-rw-r--r--pyload/plugin/hoster/ZippyshareCom.py55
158 files changed, 492 insertions, 581 deletions
diff --git a/pyload/plugin/hoster/AlldebridCom.py b/pyload/plugin/hoster/AlldebridCom.py
index 8ab98bc6f..d739600d9 100644
--- a/pyload/plugin/hoster/AlldebridCom.py
+++ b/pyload/plugin/hoster/AlldebridCom.py
@@ -13,27 +13,16 @@ from pyload.utils import parseFileSize
class AlldebridCom(MultiHoster):
__name__ = "AlldebridCom"
__type__ = "hoster"
- __version__ = "0.44"
+ __version__ = "0.46"
__pattern__ = r'https?://(?:www\.|s\d+\.)?alldebrid\.com/dl/[\w^_]+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Alldebrid.com multi-hoster plugin"""
__license__ = "GPLv3"
__authors__ = [("Andy Voigt", "spamsales@online.de")]
- def getFilename(self, url):
- try:
- name = unquote(url.rsplit("/", 1)[1])
- except IndexError:
- name = "Unknown_Filename..."
-
- if name.endswith("..."): # incomplete filename, append random stuff
- name += "%s.tmp" % randrange(100, 999)
-
- return name
-
-
def setup(self):
self.chunkLimit = 16
@@ -58,18 +47,9 @@ class AlldebridCom(MultiHoster):
pyfile.size = parseFileSize(data['filesize'])
self.link = data['link']
- if self.getConfig("ssl"):
+ if self.getConfig('ssl'):
self.link = self.link.replace("http://", "https://")
else:
self.link = self.link.replace("https://", "http://")
- if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown"):
- #only use when name wasnt already set
- pyfile.name = self.getFilename(self.link)
-
-
- def checkFile(self):
- if self.checkDownload({'error': "<title>An error occured while processing your request</title>"}) == "error":
- self.retry(wait_time=60, reason=_("An error occured while generating link"))
- return super(AlldebridCom, self).checkFile()
diff --git a/pyload/plugin/hoster/AndroidfilehostCom.py b/pyload/plugin/hoster/AndroidfilehostCom.py
index 386df4f2c..aa1387c24 100644
--- a/pyload/plugin/hoster/AndroidfilehostCom.py
+++ b/pyload/plugin/hoster/AndroidfilehostCom.py
@@ -14,6 +14,7 @@ class AndroidfilehostCom(SimpleHoster):
__version__ = "0.01"
__pattern__ = r'https?://(?:www\.)?androidfilehost\.com/\?fid=\d+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Androidfilehost.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/BasketbuildCom.py b/pyload/plugin/hoster/BasketbuildCom.py
index fb34bbc40..ea9b9bc29 100644
--- a/pyload/plugin/hoster/BasketbuildCom.py
+++ b/pyload/plugin/hoster/BasketbuildCom.py
@@ -15,6 +15,7 @@ class BasketbuildCom(SimpleHoster):
__version__ = "0.03"
__pattern__ = r'https?://(?:www\.)?(?:\w\.)?basketbuild\.com/filedl/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """basketbuild.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/BayfilesCom.py b/pyload/plugin/hoster/BayfilesCom.py
index 457440bd3..ab94b4015 100644
--- a/pyload/plugin/hoster/BayfilesCom.py
+++ b/pyload/plugin/hoster/BayfilesCom.py
@@ -9,6 +9,7 @@ class BayfilesCom(DeadHoster):
__version__ = "0.09"
__pattern__ = r'https?://(?:www\.)?bayfiles\.(com|net)/file/(?P<ID>\w+/\w+/[^/]+)'
+ __config__ = []
__description__ = """Bayfiles.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/BezvadataCz.py b/pyload/plugin/hoster/BezvadataCz.py
index cea32dd5c..20da88010 100644
--- a/pyload/plugin/hoster/BezvadataCz.py
+++ b/pyload/plugin/hoster/BezvadataCz.py
@@ -11,6 +11,7 @@ class BezvadataCz(SimpleHoster):
__version__ = "0.26"
__pattern__ = r'http://(?:www\.)?bezvadata\.cz/stahnout/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """BezvaData.cz hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/BitshareCom.py b/pyload/plugin/hoster/BitshareCom.py
index 81bc8dae9..8e8a87bc1 100644
--- a/pyload/plugin/hoster/BitshareCom.py
+++ b/pyload/plugin/hoster/BitshareCom.py
@@ -14,6 +14,7 @@ class BitshareCom(SimpleHoster):
__version__ = "0.53"
__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)]
__description__ = """Bitshare.com hoster plugin"""
__license__ = "GPLv3"
@@ -80,7 +81,7 @@ class BitshareCom(SimpleHoster):
def getDownloadUrl(self):
# Return location if direct download is active
if self.premium:
- header = self.load(self.pyfile.url, cookies=True, just_header=True)
+ header = self.load(self.pyfile.url, just_header=True)
if 'location' in header:
return header['location']
diff --git a/pyload/plugin/hoster/BoltsharingCom.py b/pyload/plugin/hoster/BoltsharingCom.py
index 39e84cd7c..58d4a23a9 100644
--- a/pyload/plugin/hoster/BoltsharingCom.py
+++ b/pyload/plugin/hoster/BoltsharingCom.py
@@ -9,6 +9,7 @@ class BoltsharingCom(DeadHoster):
__version__ = "0.02"
__pattern__ = r'http://(?:www\.)?boltsharing\.com/\w{12}'
+ __config__ = []
__description__ = """Boltsharing.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/CatShareNet.py b/pyload/plugin/hoster/CatShareNet.py
index 94a963c45..c2f7756c0 100644
--- a/pyload/plugin/hoster/CatShareNet.py
+++ b/pyload/plugin/hoster/CatShareNet.py
@@ -9,9 +9,10 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster
class CatShareNet(SimpleHoster):
__name__ = "CatShareNet"
__type__ = "hoster"
- __version__ = "0.11"
+ __version__ = "0.12"
__pattern__ = r'http://(?:www\.)?catshare\.net/\w{16}'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """CatShare.net hoster plugin"""
__license__ = "GPLv3"
@@ -36,11 +37,12 @@ class CatShareNet(SimpleHoster):
self.resumeDownload = True
- def getFileInfo(self):
+ def checkErrors(self):
m = re.search(self.IP_BLOCKED_PATTERN, self.html)
if m:
self.fail(_("Only connections from Polish IP address are allowed"))
- return super(CatShareNet, self).getFileInfo()
+
+ return super(CatShareNet, self).checkErrors()
def handleFree(self, pyfile):
diff --git a/pyload/plugin/hoster/CloudzerNet.py b/pyload/plugin/hoster/CloudzerNet.py
index c3154e9f1..775b4656a 100644
--- a/pyload/plugin/hoster/CloudzerNet.py
+++ b/pyload/plugin/hoster/CloudzerNet.py
@@ -9,6 +9,7 @@ class CloudzerNet(DeadHoster):
__version__ = "0.05"
__pattern__ = r'https?://(?:www\.)?(cloudzer\.net/file/|clz\.to/(file/)?)\w+'
+ __config__ = []
__description__ = """Cloudzer.net hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/CloudzillaTo.py b/pyload/plugin/hoster/CloudzillaTo.py
index e33e2ebe4..337aa9d3c 100644
--- a/pyload/plugin/hoster/CloudzillaTo.py
+++ b/pyload/plugin/hoster/CloudzillaTo.py
@@ -11,6 +11,7 @@ class CloudzillaTo(SimpleHoster):
__version__ = "0.06"
__pattern__ = r'http://(?:www\.)?cloudzilla\.to/share/file/(?P<ID>[\w^_]+)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Cloudzilla.to hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/CrockoCom.py b/pyload/plugin/hoster/CrockoCom.py
index bcbbc84a1..42f4d7775 100644
--- a/pyload/plugin/hoster/CrockoCom.py
+++ b/pyload/plugin/hoster/CrockoCom.py
@@ -12,6 +12,7 @@ class CrockoCom(SimpleHoster):
__version__ = "0.19"
__pattern__ = r'http://(?:www\.)?(crocko|easy-share)\.com/\w+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Crocko hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/CyberlockerCh.py b/pyload/plugin/hoster/CyberlockerCh.py
index c4e1d41b1..ec06844c3 100644
--- a/pyload/plugin/hoster/CyberlockerCh.py
+++ b/pyload/plugin/hoster/CyberlockerCh.py
@@ -9,6 +9,7 @@ class CyberlockerCh(DeadHoster):
__version__ = "0.02"
__pattern__ = r'http://(?:www\.)?cyberlocker\.ch/\w+'
+ __config__ = []
__description__ = """Cyberlocker.ch hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/CzshareCom.py b/pyload/plugin/hoster/CzshareCom.py
index 3bf371508..70766d6fc 100644
--- a/pyload/plugin/hoster/CzshareCom.py
+++ b/pyload/plugin/hoster/CzshareCom.py
@@ -12,9 +12,10 @@ from pyload.utils import parseFileSize
class CzshareCom(SimpleHoster):
__name__ = "CzshareCom"
__type__ = "hoster"
- __version__ = "0.98"
+ __version__ = "0.99"
__pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/(\d+/|download\.php\?).+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """CZshare.com hoster plugin, now Sdilej.cz"""
__license__ = "GPLv3"
@@ -43,7 +44,7 @@ class CzshareCom(SimpleHoster):
m = re.search(self.USER_CREDIT_PATTERN, self.html)
if m is None:
self.account.relogin(self.user)
- self.html = self.load(self.pyfile.url, cookies=True, decode=True)
+ self.html = self.load(self.pyfile.url, decode=True)
m = re.search(self.USER_CREDIT_PATTERN, self.html)
if m is None:
return False
@@ -87,7 +88,7 @@ class CzshareCom(SimpleHoster):
self.logDebug("PARSED_URL:" + parsed_url)
# get download ticket and parse html
- self.html = self.load(parsed_url, cookies=True, decode=True)
+ self.html = self.load(parsed_url, decode=True)
if re.search(self.MULTIDL_PATTERN, self.html):
self.longWait(5 * 60, 12)
@@ -104,7 +105,7 @@ class CzshareCom(SimpleHoster):
captcha_url = 'http://sdilej.cz/captcha.php'
for _i in xrange(5):
inputs['captchastring2'] = self.decryptCaptcha(captcha_url)
- self.html = self.load(parsed_url, cookies=True, post=inputs, decode=True)
+ self.html = self.load(parsed_url, post=inputs, decode=True)
if u"<li>ZadanÃœ ověřovací kód nesouhlasí!</li>" in self.html:
self.invalidCaptcha()
@@ -133,7 +134,7 @@ class CzshareCom(SimpleHoster):
self.wait()
- def checkFile(self):
+ def checkFile(self, rules={}):
# check download
check = self.checkDownload({
"temp offline" : re.compile(r"^Soubor je do.*asn.* nedostupn.*$"),
@@ -155,4 +156,4 @@ class CzshareCom(SimpleHoster):
self.invalidCaptcha()
self.retry()
- return super(CzshareCom, self).checkFile()
+ return super(CzshareCom, self).checkFile(rules)
diff --git a/pyload/plugin/hoster/DailymotionCom.py b/pyload/plugin/hoster/DailymotionCom.py
index c212fa872..f90067446 100644
--- a/pyload/plugin/hoster/DailymotionCom.py
+++ b/pyload/plugin/hoster/DailymotionCom.py
@@ -72,7 +72,7 @@ class DailymotionCom(Hoster):
def getQuality(self):
- q = self.getConfig("quality")
+ q = self.getConfig('quality')
if q == "Lowest":
quality = 0
diff --git a/pyload/plugin/hoster/DataHu.py b/pyload/plugin/hoster/DataHu.py
index 219e73441..820736e0a 100644
--- a/pyload/plugin/hoster/DataHu.py
+++ b/pyload/plugin/hoster/DataHu.py
@@ -14,6 +14,7 @@ class DataHu(SimpleHoster):
__version__ = "0.03"
__pattern__ = r'http://(?:www\.)?data\.hu/get/\w+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Data.hu hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/DataportCz.py b/pyload/plugin/hoster/DataportCz.py
index 8a32400ec..4f659b291 100644
--- a/pyload/plugin/hoster/DataportCz.py
+++ b/pyload/plugin/hoster/DataportCz.py
@@ -9,6 +9,7 @@ class DataportCz(SimpleHoster):
__version__ = "0.41"
__pattern__ = r'http://(?:www\.)?dataport\.cz/file/(.+)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Dataport.cz hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/DateiTo.py b/pyload/plugin/hoster/DateiTo.py
index 216a758c8..97fdd0155 100644
--- a/pyload/plugin/hoster/DateiTo.py
+++ b/pyload/plugin/hoster/DateiTo.py
@@ -12,6 +12,7 @@ class DateiTo(SimpleHoster):
__version__ = "0.07"
__pattern__ = r'http://(?:www\.)?datei\.to/datei/(?P<ID>\w+)\.html'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Datei.to hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/DdlstorageCom.py b/pyload/plugin/hoster/DdlstorageCom.py
index cfde84ad0..c2077eb16 100644
--- a/pyload/plugin/hoster/DdlstorageCom.py
+++ b/pyload/plugin/hoster/DdlstorageCom.py
@@ -9,6 +9,7 @@ class DdlstorageCom(DeadHoster):
__version__ = "1.02"
__pattern__ = r'https?://(?:www\.)?ddlstorage\.com/\w+'
+ __config__ = []
__description__ = """DDLStorage.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/DebridItaliaCom.py b/pyload/plugin/hoster/DebridItaliaCom.py
index 1e7e1a338..af9500707 100644
--- a/pyload/plugin/hoster/DebridItaliaCom.py
+++ b/pyload/plugin/hoster/DebridItaliaCom.py
@@ -11,6 +11,7 @@ class DebridItaliaCom(MultiHoster):
__version__ = "0.17"
__pattern__ = r'https?://(?:www\.|s\d+\.)?debriditalia\.com/dl/\d+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Debriditalia.com multi-hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/DepositfilesCom.py b/pyload/plugin/hoster/DepositfilesCom.py
index 67cfe4bdc..1832fd35b 100644
--- a/pyload/plugin/hoster/DepositfilesCom.py
+++ b/pyload/plugin/hoster/DepositfilesCom.py
@@ -11,9 +11,10 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster
class DepositfilesCom(SimpleHoster):
__name__ = "DepositfilesCom"
__type__ = "hoster"
- __version__ = "0.53"
+ __version__ = "0.54"
__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)]
__description__ = """Depositfiles.com hoster plugin"""
__license__ = "GPLv3"
@@ -32,32 +33,18 @@ class DepositfilesCom(SimpleHoster):
COOKIES = [("dfiles.eu", "lang_current", "en")]
+ WAIT_PATTERN = r'(?:download_waiter_remain">|html_download_api-limit_interval">|>Please wait|>Try in).+'
+ ERROR_PATTER = r'File is checked, please try again in a minute'
+
LINK_FREE_PATTERN = r'<form id="downloader_file_form" action="(http://.+?\.(dfiles\.eu|depositfiles\.com)/.+?)" method="post"'
LINK_PREMIUM_PATTERN = r'class="repeat"><a href="(.+?)"'
LINK_MIRROR_PATTERN = r'class="repeat_mirror"><a href="(.+?)"'
def handleFree(self, pyfile):
- if re.search(r'File is checked, please try again in a minute.', self.html) is not None:
- self.logInfo(_("The file is being checked. Waiting 1 minute"))
- self.retry(wait_time=60)
-
- wait = re.search(r'html_download_api-limit_interval\">(\d+)</span>', self.html)
- if wait:
- wait_time = int(wait.group(1))
- self.logInfo(_("Traffic used up. Waiting %d seconds") % wait_time)
- self.wait(wait_time, True)
- self.retry()
+ self.html = self.load(pyfile.url, post={'gateway_result': "1"})
- wait = re.search(r'>Try in (\d+) minutes or use GOLD account', self.html)
- if wait:
- wait_time = int(wait.group(1))
- self.logInfo(_("All free slots occupied. Waiting %d minutes") % wait_time)
- self.setWait(wait_time * 60, False)
-
- wait = re.search(r'Please wait (\d+) sec', self.html)
- if wait:
- self.setWait(int(wait.group(1)))
+ self.checkErrors()
m = re.search(r"var fid = '(\w+)';", self.html)
if m is None:
@@ -69,38 +56,31 @@ class DepositfilesCom(SimpleHoster):
recaptcha = ReCaptcha(self)
captcha_key = recaptcha.detect_key()
if captcha_key is None:
- self.error(_("ReCaptcha key not found"))
+ return
+
+ self.html = self.load("https://dfiles.eu/get_file.php", get=params)
- for _i in xrange(5):
+ if '<input type=button value="Continue" onclick="check_recaptcha' in self.html:
+ params['response'], params['challenge'] = recaptcha.challenge(captcha_key)
self.html = self.load("https://dfiles.eu/get_file.php", get=params)
- if '<input type=button value="Continue" onclick="check_recaptcha' in self.html:
- if 'response' in params:
- self.invalidCaptcha()
- params['response'], params['challenge'] = recaptcha.challenge(captcha_key)
- self.logDebug(params)
- continue
-
- m = re.search(self.LINK_FREE_PATTERN, self.html)
- if m:
- if 'response' in params:
- self.correctCaptcha()
-
- self.link = unquote(m.group(1))
- break
- else:
- self.error(_("Download link"))
- else:
- self.fail(_("No valid captcha response received"))
+ m = re.search(self.LINK_FREE_PATTERN, self.html)
+ if m:
+ if 'response' in params:
+ self.correctCaptcha()
+
+ self.link = unquote(m.group(1))
def handlePremium(self, pyfile):
if '<span class="html_download_api-gold_traffic_limit">' in self.html:
self.logWarning(_("Download limit reached"))
self.retry(25, 60 * 60, "Download limit reached")
+
elif 'onClick="show_gold_offer' in self.html:
self.account.relogin(self.user)
self.retry()
+
else:
link = re.search(self.LINK_PREMIUM_PATTERN, self.html)
mirror = re.search(self.LINK_MIRROR_PATTERN, self.html)
diff --git a/pyload/plugin/hoster/DevhostSt.py b/pyload/plugin/hoster/DevhostSt.py
index e4c6f819b..5816f1ba0 100644
--- a/pyload/plugin/hoster/DevhostSt.py
+++ b/pyload/plugin/hoster/DevhostSt.py
@@ -14,6 +14,7 @@ class DevhostSt(SimpleHoster):
__version__ = "0.05"
__pattern__ = r'http://(?:www\.)?d-h\.st/(?!users/)\w{3}'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """d-h.st hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/DlFreeFr.py b/pyload/plugin/hoster/DlFreeFr.py
index b0f9e7b7f..7df87bd5d 100644
--- a/pyload/plugin/hoster/DlFreeFr.py
+++ b/pyload/plugin/hoster/DlFreeFr.py
@@ -40,6 +40,7 @@ class DlFreeFr(SimpleHoster):
__version__ = "0.28"
__pattern__ = r'http://(?:www\.)?dl\.free\.fr/(\w+|getfile\.pl\?file=/\w+)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Dl.free.fr hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/DodanePl.py b/pyload/plugin/hoster/DodanePl.py
index 35fa1ecab..9bd5e45a9 100644
--- a/pyload/plugin/hoster/DodanePl.py
+++ b/pyload/plugin/hoster/DodanePl.py
@@ -9,6 +9,7 @@ class DodanePl(DeadHoster):
__version__ = "0.03"
__pattern__ = r'http://(?:www\.)?dodane\.pl/file/\d+'
+ __config__ = []
__description__ = """Dodane.pl hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/DuploadOrg.py b/pyload/plugin/hoster/DuploadOrg.py
index db00c46e9..6b7574eee 100644
--- a/pyload/plugin/hoster/DuploadOrg.py
+++ b/pyload/plugin/hoster/DuploadOrg.py
@@ -9,6 +9,7 @@ class DuploadOrg(DeadHoster):
__version__ = "0.02"
__pattern__ = r'http://(?:www\.)?dupload\.org/\w{12}'
+ __config__ = []
__description__ = """Dupload.grg hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/EdiskCz.py b/pyload/plugin/hoster/EdiskCz.py
index 7aaef10ae..2fd56eb82 100644
--- a/pyload/plugin/hoster/EdiskCz.py
+++ b/pyload/plugin/hoster/EdiskCz.py
@@ -11,6 +11,7 @@ class EdiskCz(SimpleHoster):
__version__ = "0.23"
__pattern__ = r'http://(?:www\.)?edisk\.(cz|sk|eu)/(stahni|sk/stahni|en/download)/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Edisk.cz hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/EgoFilesCom.py b/pyload/plugin/hoster/EgoFilesCom.py
index a843f5051..150b8bc0c 100644
--- a/pyload/plugin/hoster/EgoFilesCom.py
+++ b/pyload/plugin/hoster/EgoFilesCom.py
@@ -9,6 +9,7 @@ class EgoFilesCom(DeadHoster):
__version__ = "0.16"
__pattern__ = r'https?://(?:www\.)?egofiles\.com/\w+'
+ __config__ = []
__description__ = """Egofiles.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/EnteruploadCom.py b/pyload/plugin/hoster/EnteruploadCom.py
index efec5b37c..b3a736697 100644
--- a/pyload/plugin/hoster/EnteruploadCom.py
+++ b/pyload/plugin/hoster/EnteruploadCom.py
@@ -9,6 +9,7 @@ class EnteruploadCom(DeadHoster):
__version__ = "0.02"
__pattern__ = r'http://(?:www\.)?enterupload\.com/\w+'
+ __config__ = []
__description__ = """EnterUpload.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/EpicShareNet.py b/pyload/plugin/hoster/EpicShareNet.py
index 16685088a..0bab20afa 100644
--- a/pyload/plugin/hoster/EpicShareNet.py
+++ b/pyload/plugin/hoster/EpicShareNet.py
@@ -9,6 +9,7 @@ class EpicShareNet(DeadHoster):
__version__ = "0.02"
__pattern__ = r'https?://(?:www\.)?epicshare\.net/\w{12}'
+ __config__ = []
__description__ = """EpicShare.net hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/EuroshareEu.py b/pyload/plugin/hoster/EuroshareEu.py
index 84fbcda08..fa0f69d8f 100644
--- a/pyload/plugin/hoster/EuroshareEu.py
+++ b/pyload/plugin/hoster/EuroshareEu.py
@@ -8,9 +8,10 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster
class EuroshareEu(SimpleHoster):
__name__ = "EuroshareEu"
__type__ = "hoster"
- __version__ = "0.27"
+ __version__ = "0.28"
__pattern__ = r'http://(?:www\.)?euroshare\.(eu|sk|cz|hu|pl)/file/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Euroshare.eu hoster plugin"""
__license__ = "GPLv3"
@@ -57,8 +58,8 @@ class EuroshareEu(SimpleHoster):
self.link = "http://euroshare.eu%s" % m.group(1)
- def checkFile(self):
+ def checkFile(self, rules={}):
if self.checkDownload({"multi-dl": re.compile(self.ERR_PARDL_PATTERN)})
self.longWait(5 * 60, 12)
- return super(EuroshareEu, self).checkFile()
+ return super(EuroshareEu, self).checkFile(rules)
diff --git a/pyload/plugin/hoster/ExtabitCom.py b/pyload/plugin/hoster/ExtabitCom.py
index d5c1f0ba4..dfd37b0a0 100644
--- a/pyload/plugin/hoster/ExtabitCom.py
+++ b/pyload/plugin/hoster/ExtabitCom.py
@@ -14,6 +14,7 @@ class ExtabitCom(SimpleHoster):
__version__ = "0.65"
__pattern__ = r'http://(?:www\.)?extabit\.com/(file|go|fid)/(?P<ID>\w+)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Extabit.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/FastixRu.py b/pyload/plugin/hoster/FastixRu.py
index 129259304..679194969 100644
--- a/pyload/plugin/hoster/FastixRu.py
+++ b/pyload/plugin/hoster/FastixRu.py
@@ -12,25 +12,16 @@ from pyload.plugin.internal.MultiHoster import MultiHoster
class FastixRu(MultiHoster):
__name__ = "FastixRu"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.11"
__pattern__ = r'http://(?:www\.)?fastix\.(ru|it)/file/\w{24}'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Fastix multi-hoster plugin"""
__license__ = "GPLv3"
__authors__ = [("Massimo Rosamilia", "max@spiritix.eu")]
- def getFilename(self, url):
- try:
- name = unquote(url.rsplit("/", 1)[1])
- except IndexError:
- name = "Unknown_Filename..."
- if name.endswith("..."): # incomplete filename, append random stuff
- name += "%s.tmp" % randrange(100, 999)
- return name
-
-
def setup(self):
self.chunkLimit = 3
@@ -51,13 +42,4 @@ class FastixRu(MultiHoster):
else:
self.link = data['downloadlink']
- if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown"):
- #only use when name wasnt already set
- pyfile.name = self.getFilename(self.link)
-
-
- def checkFile(self):
- if self.checkDownload({"error": "<title>An error occurred while processing your request</title>"}):
- self.retry(wait_time=60, reason=_("An error occurred while generating link"))
- return super(FastixRu, self).checkFile()
diff --git a/pyload/plugin/hoster/FastshareCz.py b/pyload/plugin/hoster/FastshareCz.py
index 4baa362c3..fba0e0479 100644
--- a/pyload/plugin/hoster/FastshareCz.py
+++ b/pyload/plugin/hoster/FastshareCz.py
@@ -10,9 +10,10 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster
class FastshareCz(SimpleHoster):
__name__ = "FastshareCz"
__type__ = "hoster"
- __version__ = "0.27"
+ __version__ = "0.29"
__pattern__ = r'http://(?:www\.)?fastshare\.cz/\d+/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """FastShare.cz hoster plugin"""
__license__ = "GPLv3"
@@ -22,11 +23,12 @@ class FastshareCz(SimpleHoster):
COOKIES = [("fastshare.cz", "lang", "en")]
- INFO_PATTERN = r'<h1 class="dwp">(?P<N>[^<]+)</h1>\s*<div class="fileinfo">\s*Size\s*: (?P<S>\d+) (?P<U>[\w^_]+),'
+ NAME_PATTERN = r'<h3 class="section_title">(?P<N>.+?)<'
+ SIZE_PATTERN = r'>Size\s*:</strong> (?P<S>[\d.,]+) (?P<U>[\w^_]+)'
OFFLINE_PATTERN = r'>(The file has been deleted|Requested page not found)'
- LINK_FREE_PATTERN = r'action=(/free/.*?)>\s*<img src="([^"]*)"><br'
- LINK_PREMIUM_PATTERN = r'(http://data\d+\.fastshare\.cz/download\.php\?id=\d+&)'
+ LINK_FREE_PATTERN = r'>Enter the code\s*:</em>\s*<span><img src="(.+?)"'
+ LINK_PREMIUM_PATTERN = r'(http://\w+\.fastshare\.cz/download\.php\?id=\d+&)'
SLOT_ERROR = "> 100% of FREE slots are full"
CREDIT_ERROR = " credit for "
@@ -57,7 +59,7 @@ class FastshareCz(SimpleHoster):
self.download(urljoin(baseurl, action), post={'code': captcha, 'btn.x': 77, 'btn.y': 18})
- def checkFile(self):
+ def checkFile(self, rules={}):
check = self.checkDownload({
'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'),
@@ -73,4 +75,4 @@ class FastshareCz(SimpleHoster):
elif check == "credit":
self.resetAccount()
- return super(FastshareCz, self).checkFile()
+ return super(FastshareCz, self).checkFile(rules)
diff --git a/pyload/plugin/hoster/FileApeCom.py b/pyload/plugin/hoster/FileApeCom.py
index 2c39e314c..4dc1442c5 100644
--- a/pyload/plugin/hoster/FileApeCom.py
+++ b/pyload/plugin/hoster/FileApeCom.py
@@ -9,6 +9,7 @@ class FileApeCom(DeadHoster):
__version__ = "0.12"
__pattern__ = r'http://(?:www\.)?fileape\.com/(index\.php\?act=download\&id=|dl/)\w+'
+ __config__ = []
__description__ = """FileApe.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/FileSharkPl.py b/pyload/plugin/hoster/FileSharkPl.py
index 24b1db6de..ab28ac144 100644
--- a/pyload/plugin/hoster/FileSharkPl.py
+++ b/pyload/plugin/hoster/FileSharkPl.py
@@ -10,9 +10,10 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster
class FileSharkPl(SimpleHoster):
__name__ = "FileSharkPl"
__type__ = "hoster"
- __version__ = "0.07"
+ __version__ = "0.09"
__pattern__ = r'http://(?:www\.)?fileshark\.pl/pobierz/\d+/\w+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """FileShark.pl hoster plugin"""
__license__ = "GPLv3"
@@ -20,10 +21,9 @@ class FileSharkPl(SimpleHoster):
("Walter Purcaro", "vuolter@gmail.com")]
- NAME_PATTERN = r'<h2 class="name-file">(?P<N>.+)</h2>'
- SIZE_PATTERN = r'<p class="size-file">(.*?)<strong>(?P<S>\d+\.?\d*)\s(?P<U>\w+)</strong></p>'
-
- OFFLINE_PATTERN = '(P|p)lik zosta. (usuni.ty|przeniesiony)'
+ NAME_PATTERN = r'<h2 class="name-file">(?P<N>.+)</h2>'
+ SIZE_PATTERN = r'<p class="size-file">(.*?)<strong>(?P<S>\d+\.?\d*)\s(?P<U>\w+)</strong></p>'
+ OFFLINE_PATTERN = r'(P|p)lik zosta. (usuni.ty|przeniesiony)'
LINK_FREE_PATTERN = r'<a href="(.*?)" class="btn-upload-free">'
LINK_PREMIUM_PATTERN = r'<a href="(.*?)" class="btn-upload-premium">'
@@ -33,7 +33,7 @@ class FileSharkPl(SimpleHoster):
IP_ERROR_PATTERN = r'Strona jest dost.pna wy..cznie dla u.ytkownik.w znajduj.cych si. na terenie Polski'
SLOT_ERROR_PATTERN = r'Osi.gni.to maksymaln. liczb. .ci.ganych jednocze.nie plik.w\.'
- CAPTCHA_PATTERN = '<img src="data:image/jpeg;base64,(.*?)" title="captcha"'
+ CAPTCHA_PATTERN = r'<img src="data:image/jpeg;base64,(.*?)" title="captcha"'
TOKEN_PATTERN = r'name="form\[_token\]" value="(.*?)" />'
@@ -80,6 +80,8 @@ class FileSharkPl(SimpleHoster):
link = urljoin("http://fileshark.pl", m.group(1))
+ self.html = self.load(link)
+
m = re.search(self.WAIT_PATTERN, self.html)
if m:
seconds = int(m.group(1))
@@ -106,24 +108,7 @@ class FileSharkPl(SimpleHoster):
self.load = tmp_load
- self.download(link, post=inputs, cookies=True, disposition=True)
-
-
- def checkFile(self):
- check = self.checkDownload({'wrong_captcha': re.compile(r'<label for="form_captcha" generated="true" class="error">(.*?)</label>'),
- 'wait_pattern' : re.compile(self.SECONDS_PATTERN),
- 'DL-found' : re.compile('<a href="(.*)">')})
- if check == "DL-found":
- self.correctCaptcha()
-
- elif check == "wrong_captcha":
- self.invalidCaptcha()
- self.retry(10, 1, _("Wrong captcha solution"))
-
- elif check == "wait_pattern":
- self.retry()
-
- return super(FileSharkPl, self).checkFile()
+ self.download(link, post=inputs, disposition=True)
def _decode64(self, data, *args, **kwargs):
diff --git a/pyload/plugin/hoster/FileStoreTo.py b/pyload/plugin/hoster/FileStoreTo.py
index 8998c0b1c..10d24c1b0 100644
--- a/pyload/plugin/hoster/FileStoreTo.py
+++ b/pyload/plugin/hoster/FileStoreTo.py
@@ -11,6 +11,7 @@ class FileStoreTo(SimpleHoster):
__version__ = "0.05"
__pattern__ = r'http://(?:www\.)?filestore\.to/\?d=(?P<ID>\w+)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """FileStore.to hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/FilebeerInfo.py b/pyload/plugin/hoster/FilebeerInfo.py
index 83fc6dbfc..34f3969c2 100644
--- a/pyload/plugin/hoster/FilebeerInfo.py
+++ b/pyload/plugin/hoster/FilebeerInfo.py
@@ -9,6 +9,7 @@ class FilebeerInfo(DeadHoster):
__version__ = "0.03"
__pattern__ = r'http://(?:www\.)?filebeer\.info/(?!\d*~f)(?P<ID>\w+)'
+ __config__ = []
__description__ = """Filebeer.info plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/FilecloudIo.py b/pyload/plugin/hoster/FilecloudIo.py
index ae50f95bb..5068ad8c9 100644
--- a/pyload/plugin/hoster/FilecloudIo.py
+++ b/pyload/plugin/hoster/FilecloudIo.py
@@ -13,6 +13,7 @@ class FilecloudIo(SimpleHoster):
__version__ = "0.08"
__pattern__ = r'http://(?:www\.)?(?:filecloud\.io|ifile\.it|mihd\.net)/(?P<ID>\w+)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Filecloud.io hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/FilefactoryCom.py b/pyload/plugin/hoster/FilefactoryCom.py
index 95d61cd6a..c6b857307 100644
--- a/pyload/plugin/hoster/FilefactoryCom.py
+++ b/pyload/plugin/hoster/FilefactoryCom.py
@@ -21,9 +21,10 @@ def getInfo(urls):
class FilefactoryCom(SimpleHoster):
__name__ = "FilefactoryCom"
__type__ = "hoster"
- __version__ = "0.53"
+ __version__ = "0.54"
__pattern__ = r'https?://(?:www\.)?filefactory\.com/(file|trafficshare/\w+)/\w+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Filefactory.com hoster plugin"""
__license__ = "GPLv3"
@@ -59,7 +60,7 @@ class FilefactoryCom(SimpleHoster):
self.wait(m.group(1))
- def checkFile(self):
+ def checkFile(self, rules={}):
check = self.checkDownload({'multiple': "You are currently downloading too many files at once.",
'error' : '<div id="errorMessage">'})
@@ -70,7 +71,7 @@ class FilefactoryCom(SimpleHoster):
elif check == "error":
self.error(_("Unknown error"))
- return super(FilefactoryCom, self).checkFile()
+ return super(FilefactoryCom, self).checkFile(rules)
def handlePremium(self, pyfile):
diff --git a/pyload/plugin/hoster/FilepostCom.py b/pyload/plugin/hoster/FilepostCom.py
index 8c462b5d6..45187a972 100644
--- a/pyload/plugin/hoster/FilepostCom.py
+++ b/pyload/plugin/hoster/FilepostCom.py
@@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
import re
-
-from time import time
+import time
from pyload.utils import json_loads
from pyload.plugin.internal.captcha import ReCaptcha
@@ -15,6 +14,7 @@ class FilepostCom(SimpleHoster):
__version__ = "0.33"
__pattern__ = r'https?://(?:www\.)?(?:filepost\.com/files|fp\.io)/(?P<ID>[^/]+)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Filepost.com hoster plugin"""
__license__ = "GPLv3"
@@ -41,7 +41,7 @@ class FilepostCom(SimpleHoster):
captcha_key = m.group(1)
# Get wait time
- get_dict = {'SID': self.req.cj.getCookie('SID'), 'JsHttpRequest': str(int(time() * 10000)) + '-xml'}
+ 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'))
@@ -57,7 +57,7 @@ class FilepostCom(SimpleHoster):
if password:
self.logInfo(_("Password protected link, trying ") + file_pass)
- get_dict['JsHttpRequest'] = str(int(time() * 10000)) + '-xml'
+ get_dict['JsHttpRequest'] = str(int(time.time() * 10000)) + '-xml'
post_dict['file_pass'] = file_pass
self.link = self.getJsonResponse(get_dict, post_dict, 'link')
@@ -72,7 +72,7 @@ class FilepostCom(SimpleHoster):
recaptcha = ReCaptcha(self)
for i in xrange(5):
- get_dict['JsHttpRequest'] = str(int(time() * 10000)) + '-xml'
+ get_dict['JsHttpRequest'] = str(int(time.time() * 10000)) + '-xml'
if i:
post_dict['recaptcha_response_field'], post_dict['recaptcha_challenge_field'] = recaptcha.challenge(
captcha_key)
diff --git a/pyload/plugin/hoster/FilepupNet.py b/pyload/plugin/hoster/FilepupNet.py
index b19f40106..80f4fc1c8 100644
--- a/pyload/plugin/hoster/FilepupNet.py
+++ b/pyload/plugin/hoster/FilepupNet.py
@@ -15,6 +15,7 @@ class FilepupNet(SimpleHoster):
__version__ = "0.03"
__pattern__ = r'http://(?:www\.)?filepup\.net/files/\w+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Filepup.net hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/FilerNet.py b/pyload/plugin/hoster/FilerNet.py
index 3cf4bec36..138e728ff 100644
--- a/pyload/plugin/hoster/FilerNet.py
+++ b/pyload/plugin/hoster/FilerNet.py
@@ -16,9 +16,10 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster
class FilerNet(SimpleHoster):
__name__ = "FilerNet"
__type__ = "hoster"
- __version__ = "0.16"
+ __version__ = "0.19"
__pattern__ = r'https?://(?:www\.)?filer\.net/get/\w+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Filer.net hoster plugin"""
__license__ = "GPLv3"
@@ -29,17 +30,9 @@ class FilerNet(SimpleHoster):
INFO_PATTERN = r'<h1 class="page-header">Free Download (?P<N>\S+) <small>(?P<S>[\w.]+) (?P<U>[\w^_]+)</small></h1>'
OFFLINE_PATTERN = r'Nicht gefunden'
- LINK_FREE_PATTERN = LINK_PREMIUM_PATTERN = r'href="([^"]+)">Get download</a>'
-
+ WAIT_PATTERN = r'musst du <span id="time">(\d+)'
- def checkErrors(self):
- # Wait between downloads
- m = re.search(r'musst du <span id="time">(\d+)</span> Sekunden warten', self.html)
- if m:
- errmsg = self.info['error'] = _("Wait between free downloads")
- self.retry(wait_time=int(m.group(1)), reason=errmsg)
-
- self.info.pop('error', None)
+ LINK_FREE_PATTERN = LINK_PREMIUM_PATTERN = r'href="([^"]+)">Get download</a>'
def handleFree(self, pyfile):
diff --git a/pyload/plugin/hoster/FileshareInUa.py b/pyload/plugin/hoster/FileshareInUa.py
index f7855378a..afda590c0 100644
--- a/pyload/plugin/hoster/FileshareInUa.py
+++ b/pyload/plugin/hoster/FileshareInUa.py
@@ -9,6 +9,7 @@ class FileshareInUa(DeadHoster):
__version__ = "0.02"
__pattern__ = r'https?://(?:www\.)?fileshare\.in\.ua/\w{7}'
+ __config__ = []
__description__ = """Fileshare.in.ua hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/FilesonicCom.py b/pyload/plugin/hoster/FilesonicCom.py
index 1dee6eefd..4ba0f3e50 100644
--- a/pyload/plugin/hoster/FilesonicCom.py
+++ b/pyload/plugin/hoster/FilesonicCom.py
@@ -9,6 +9,7 @@ class FilesonicCom(DeadHoster):
__version__ = "0.35"
__pattern__ = r'http://(?:www\.)?filesonic\.com/file/\w+'
+ __config__ = []
__description__ = """Filesonic.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/FilezyNet.py b/pyload/plugin/hoster/FilezyNet.py
index deab69101..0ed326a22 100644
--- a/pyload/plugin/hoster/FilezyNet.py
+++ b/pyload/plugin/hoster/FilezyNet.py
@@ -9,6 +9,7 @@ class FilezyNet(DeadHoster):
__version__ = "0.20"
__pattern__ = r'http://(?:www\.)?filezy\.net/\w{12}'
+ __config__ = []
__description__ = """Filezy.net hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/FiredriveCom.py b/pyload/plugin/hoster/FiredriveCom.py
index 4ce47e692..5879c4848 100644
--- a/pyload/plugin/hoster/FiredriveCom.py
+++ b/pyload/plugin/hoster/FiredriveCom.py
@@ -9,6 +9,7 @@ class FiredriveCom(DeadHoster):
__version__ = "0.05"
__pattern__ = r'https?://(?:www\.)?(firedrive|putlocker)\.com/(mobile/)?(file|embed)/(?P<ID>\w+)'
+ __config__ = []
__description__ = """Firedrive.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/FlyFilesNet.py b/pyload/plugin/hoster/FlyFilesNet.py
index 5aff3e811..612de14bd 100644
--- a/pyload/plugin/hoster/FlyFilesNet.py
+++ b/pyload/plugin/hoster/FlyFilesNet.py
@@ -14,6 +14,7 @@ class FlyFilesNet(SimpleHoster):
__version__ = "0.10"
__pattern__ = r'http://(?:www\.)?flyfiles\.net/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """FlyFiles.net hoster plugin"""
__license__ = "GPLv3"
@@ -32,7 +33,7 @@ class FlyFilesNet(SimpleHoster):
url = "http://flyfiles.net"
# get download URL
- parsed_url = getURL(url, post={"getDownLink": session}, cookies=True)
+ parsed_url = getURL(url, post={"getDownLink": session})
self.logDebug("Parsed URL: %s" % parsed_url)
if parsed_url == '#downlink|' or parsed_url == "#downlink|#":
diff --git a/pyload/plugin/hoster/FourSharedCom.py b/pyload/plugin/hoster/FourSharedCom.py
index 00209f4f1..8c15c5954 100644
--- a/pyload/plugin/hoster/FourSharedCom.py
+++ b/pyload/plugin/hoster/FourSharedCom.py
@@ -11,6 +11,7 @@ class FourSharedCom(SimpleHoster):
__version__ = "0.31"
__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)]
__description__ = """4Shared.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/FreeWayMe.py b/pyload/plugin/hoster/FreeWayMe.py
index 21f99c19e..560275eba 100644
--- a/pyload/plugin/hoster/FreeWayMe.py
+++ b/pyload/plugin/hoster/FreeWayMe.py
@@ -9,6 +9,7 @@ class FreeWayMe(MultiHoster):
__version__ = "0.16"
__pattern__ = r'https://(?:www\.)?free-way\.me/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """FreeWayMe multi-hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/FreevideoCz.py b/pyload/plugin/hoster/FreevideoCz.py
index 3c9b94ea8..af238c564 100644
--- a/pyload/plugin/hoster/FreevideoCz.py
+++ b/pyload/plugin/hoster/FreevideoCz.py
@@ -9,6 +9,7 @@ class FreevideoCz(DeadHoster):
__version__ = "0.30"
__pattern__ = r'http://(?:www\.)?freevideo\.cz/vase-videa/.+'
+ __config__ = []
__description__ = """Freevideo.cz hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/FshareVn.py b/pyload/plugin/hoster/FshareVn.py
index 186cb2f87..73ce4e254 100644
--- a/pyload/plugin/hoster/FshareVn.py
+++ b/pyload/plugin/hoster/FshareVn.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
import re
+import time
-from time import strptime, mktime, gmtime
from urlparse import urljoin
from pyload.network.RequestFactory import getURL
@@ -28,6 +28,7 @@ class FshareVn(SimpleHoster):
__version__ = "0.20"
__pattern__ = r'http://(?:www\.)?fshare\.vn/file/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """FshareVn hoster plugin"""
__license__ = "GPLv3"
@@ -99,8 +100,8 @@ class FshareVn(SimpleHoster):
m = re.search(self.WAIT_PATTERN, self.html)
if m:
self.logInfo(_("Wait until %s ICT") % m.group(1))
- wait_until = mktime(strptime(m.group(1), "%d/%m/%Y %H:%M"))
- self.wait(wait_until - mktime(gmtime()) - 7 * 60 * 60, True)
+ 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"
diff --git a/pyload/plugin/hoster/GigapetaCom.py b/pyload/plugin/hoster/GigapetaCom.py
index 9aa842e21..6397882f8 100644
--- a/pyload/plugin/hoster/GigapetaCom.py
+++ b/pyload/plugin/hoster/GigapetaCom.py
@@ -13,6 +13,7 @@ class GigapetaCom(SimpleHoster):
__version__ = "0.03"
__pattern__ = r'http://(?:www\.)?gigapeta\.com/dl/\w+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """GigaPeta.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/GooIm.py b/pyload/plugin/hoster/GooIm.py
index 2090141ca..0556e9804 100644
--- a/pyload/plugin/hoster/GooIm.py
+++ b/pyload/plugin/hoster/GooIm.py
@@ -14,6 +14,7 @@ class GooIm(SimpleHoster):
__version__ = "0.04"
__pattern__ = r'https?://(?:www\.)?goo\.im/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Goo.im hoster plugin"""
__license__ = "GPLv3"
@@ -31,4 +32,4 @@ class GooIm(SimpleHoster):
def handleFree(self, pyfile):
self.wait(10)
- self.download(pyfile.url, cookies=True)
+ self.download(pyfile.url)
diff --git a/pyload/plugin/hoster/GoogledriveCom.py b/pyload/plugin/hoster/GoogledriveCom.py
index 14a9d058d..8ae3664a3 100644
--- a/pyload/plugin/hoster/GoogledriveCom.py
+++ b/pyload/plugin/hoster/GoogledriveCom.py
@@ -15,6 +15,7 @@ class GoogledriveCom(SimpleHoster):
__version__ = "0.03"
__pattern__ = r'https?://(?:www\.)?drive\.google\.com/file/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Drive.google.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/HellshareCz.py b/pyload/plugin/hoster/HellshareCz.py
index 2caaeb143..06dbe2178 100644
--- a/pyload/plugin/hoster/HellshareCz.py
+++ b/pyload/plugin/hoster/HellshareCz.py
@@ -11,6 +11,7 @@ class HellshareCz(SimpleHoster):
__version__ = "0.85"
__pattern__ = r'http://(?:www\.)?hellshare\.(?:cz|com|sk|hu|pl)/[^?]*/\d+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Hellshare.cz hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/HellspyCz.py b/pyload/plugin/hoster/HellspyCz.py
index 049dd8df3..f8d05cfe8 100644
--- a/pyload/plugin/hoster/HellspyCz.py
+++ b/pyload/plugin/hoster/HellspyCz.py
@@ -9,6 +9,7 @@ class HellspyCz(DeadHoster):
__version__ = "0.28"
__pattern__ = r'http://(?:www\.)?(?:hellspy\.(?:cz|com|sk|hu|pl)|sciagaj\.pl)(/\S+/\d+)'
+ __config__ = []
__description__ = """HellSpy.cz hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/HotfileCom.py b/pyload/plugin/hoster/HotfileCom.py
index a9b1aa099..9491669b0 100644
--- a/pyload/plugin/hoster/HotfileCom.py
+++ b/pyload/plugin/hoster/HotfileCom.py
@@ -9,6 +9,7 @@ class HotfileCom(DeadHoster):
__version__ = "0.37"
__pattern__ = r'https?://(?:www\.)?hotfile\.com/dl/\d+/\w+'
+ __config__ = []
__description__ = """Hotfile.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/IFileWs.py b/pyload/plugin/hoster/IFileWs.py
index 8effe015a..62b83fe25 100644
--- a/pyload/plugin/hoster/IFileWs.py
+++ b/pyload/plugin/hoster/IFileWs.py
@@ -9,6 +9,7 @@ class IFileWs(DeadHoster):
__version__ = "0.02"
__pattern__ = r'http://(?:www\.)?ifile\.ws/\w{12}'
+ __config__ = []
__description__ = """Ifile.ws hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/IcyFilesCom.py b/pyload/plugin/hoster/IcyFilesCom.py
index 2a5b1d55a..48ce78ff5 100644
--- a/pyload/plugin/hoster/IcyFilesCom.py
+++ b/pyload/plugin/hoster/IcyFilesCom.py
@@ -9,6 +9,7 @@ class IcyFilesCom(DeadHoster):
__version__ = "0.06"
__pattern__ = r'http://(?:www\.)?icyfiles\.com/(.+)'
+ __config__ = []
__description__ = """IcyFiles.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/IfileIt.py b/pyload/plugin/hoster/IfileIt.py
index 58e64aff1..1b851477a 100644
--- a/pyload/plugin/hoster/IfileIt.py
+++ b/pyload/plugin/hoster/IfileIt.py
@@ -9,6 +9,7 @@ class IfileIt(DeadHoster):
__version__ = "0.29"
__pattern__ = r'^unmatchable$'
+ __config__ = []
__description__ = """Ifile.it"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/IfolderRu.py b/pyload/plugin/hoster/IfolderRu.py
index b6e98674f..04c19ace5 100644
--- a/pyload/plugin/hoster/IfolderRu.py
+++ b/pyload/plugin/hoster/IfolderRu.py
@@ -11,6 +11,7 @@ class IfolderRu(SimpleHoster):
__version__ = "0.39"
__pattern__ = r'http://(?:www\.)?(?:ifolder\.ru|rusfolder\.(?:com|net|ru))/(?:files/)?(?P<ID>\d+)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Ifolder.ru hoster plugin"""
__license__ = "GPLv3"
@@ -38,23 +39,23 @@ class IfolderRu(SimpleHoster):
def handleFree(self, pyfile):
- self.html = self.load("http://rusfolder.com/%s" % self.info['pattern']['ID'], cookies=True, decode=True)
+ self.html = self.load("http://rusfolder.com/%s" % self.info['pattern']['ID'], decode=True)
self.getFileInfo()
url = re.search(r"location\.href = '(http://ints\..*?=)'", self.html).group(1)
- self.html = self.load(url, cookies=True, decode=True)
+ self.html = self.load(url, decode=True)
url, session_id = re.search(self.SESSION_ID_PATTERN, self.html).groups()
- self.html = self.load(url, cookies=True, decode=True)
+ self.html = self.load(url, decode=True)
url = "http://ints.rusfolder.com/ints/frame/?session=%s" % session_id
- self.html = self.load(url, cookies=True)
+ self.html = self.load(url)
self.wait(31, False)
captcha_url = "http://ints.rusfolder.com/random/images/?session=%s" % session_id
for _i in xrange(5):
- self.html = self.load(url, cookies=True)
+ self.html = self.load(url)
action, inputs = self.parseHtmlForm('ID="Form1"')
inputs['ints_session'] = re.search(self.INTS_SESSION_PATTERN, self.html).group(1)
inputs[re.search(self.HIDDEN_INPUT_PATTERN, self.html).group(1)] = '1'
@@ -62,7 +63,7 @@ class IfolderRu(SimpleHoster):
inputs['action'] = '1'
self.logDebug(inputs)
- self.html = self.load(url, decode=True, cookies=True, post=inputs)
+ self.html = self.load(url, decode=True, post=inputs)
if self.WRONG_CAPTCHA_PATTERN in self.html:
self.invalidCaptcha()
else:
diff --git a/pyload/plugin/hoster/JumbofilesCom.py b/pyload/plugin/hoster/JumbofilesCom.py
index fa2ffdbff..380e94a4b 100644
--- a/pyload/plugin/hoster/JumbofilesCom.py
+++ b/pyload/plugin/hoster/JumbofilesCom.py
@@ -11,6 +11,7 @@ class JumbofilesCom(SimpleHoster):
__version__ = "0.03"
__pattern__ = r'http://(?:www\.)?jumbofiles\.com/(?P<ID>\w{12})'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """JumboFiles.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/Keep2ShareCc.py b/pyload/plugin/hoster/Keep2ShareCc.py
index d655cf6ba..3c2b6c570 100644
--- a/pyload/plugin/hoster/Keep2ShareCc.py
+++ b/pyload/plugin/hoster/Keep2ShareCc.py
@@ -14,6 +14,7 @@ class Keep2ShareCc(SimpleHoster):
__version__ = "0.21"
__pattern__ = r'https?://(?:www\.)?(keep2share|k2s|keep2s)\.cc/file/(?P<ID>\w+)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Keep2Share.cc hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/KickloadCom.py b/pyload/plugin/hoster/KickloadCom.py
index 5079570af..d0acb7636 100644
--- a/pyload/plugin/hoster/KickloadCom.py
+++ b/pyload/plugin/hoster/KickloadCom.py
@@ -9,6 +9,7 @@ class KickloadCom(DeadHoster):
__version__ = "0.21"
__pattern__ = r'http://(?:www\.)?kickload\.com/get/.+'
+ __config__ = []
__description__ = """Kickload.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/KingfilesNet.py b/pyload/plugin/hoster/KingfilesNet.py
index ad856dfb6..711051e70 100644
--- a/pyload/plugin/hoster/KingfilesNet.py
+++ b/pyload/plugin/hoster/KingfilesNet.py
@@ -12,6 +12,7 @@ class KingfilesNet(SimpleHoster):
__version__ = "0.07"
__pattern__ = r'http://(?:www\.)?kingfiles\.net/(?P<ID>\w{12})'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Kingfiles.net hoster plugin"""
__license__ = "GPLv3"
@@ -43,7 +44,7 @@ class KingfilesNet(SimpleHoster):
'referer' : "",
'method_free': "+"}
- self.html = self.load(pyfile.url, post=post_data, cookies=True, decode=True)
+ self.html = self.load(pyfile.url, post=post_data, decode=True)
solvemedia = SolveMedia(self)
response, challenge = solvemedia.challenge()
@@ -66,7 +67,7 @@ class KingfilesNet(SimpleHoster):
'adcopy_challenge': challenge,
'down_direct' : "1"}
- self.html = self.load(pyfile.url, post=post_data, cookies=True, decode=True)
+ self.html = self.load(pyfile.url, post=post_data, decode=True)
m = re.search(self.LINK_FREE_PATTERN, self.html)
if m is None:
diff --git a/pyload/plugin/hoster/LemUploadsCom.py b/pyload/plugin/hoster/LemUploadsCom.py
index deb0d374f..c7f2e8045 100644
--- a/pyload/plugin/hoster/LemUploadsCom.py
+++ b/pyload/plugin/hoster/LemUploadsCom.py
@@ -9,6 +9,7 @@ class LemUploadsCom(DeadHoster):
__version__ = "0.02"
__pattern__ = r'https?://(?:www\.)?lemuploads\.com/\w{12}'
+ __config__ = []
__description__ = """LemUploads.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/LetitbitNet.py b/pyload/plugin/hoster/LetitbitNet.py
index dfdae5784..01767cabf 100644
--- a/pyload/plugin/hoster/LetitbitNet.py
+++ b/pyload/plugin/hoster/LetitbitNet.py
@@ -39,6 +39,7 @@ class LetitbitNet(SimpleHoster):
__version__ = "0.30"
__pattern__ = r'https?://(?:www\.)?(letitbit|shareflare)\.net/download/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Letitbit.net hoster plugin"""
__license__ = "GPLv3"
@@ -56,16 +57,6 @@ class LetitbitNet(SimpleHoster):
self.resumeDownload = True
- def getFileInfo(self):
- api_rep = api_response(self.pyfile.url)
- if api_rep['status'] == 'OK':
- self.api_data = api_rep['data'][0]
- self.pyfile.name = self.api_data['name']
- self.pyfile.size = self.api_data['size']
- else:
- self.offline()
-
-
def handleFree(self, pyfile):
action, inputs = self.parseHtmlForm('id="ifree_form"')
if not action:
@@ -75,7 +66,7 @@ class LetitbitNet(SimpleHoster):
self.logDebug(action, inputs)
inputs['desc'] = ""
- self.html = self.load(urljoin("http://letitbit.net/", action), post=inputs, cookies=True)
+ self.html = self.load(urljoin("http://letitbit.net/", action), post=inputs)
m = re.search(self.SECONDS_PATTERN, self.html)
seconds = int(m.group(1)) if m else 60
@@ -89,7 +80,7 @@ class LetitbitNet(SimpleHoster):
self.wait(seconds)
- res = self.load("http://letitbit.net/ajax/download3.php", post=" ", cookies=True)
+ res = self.load("http://letitbit.net/ajax/download3.php", post=" ")
if res != '1':
self.error(_("Unknown response - ajax_check_url"))
@@ -104,7 +95,7 @@ class LetitbitNet(SimpleHoster):
self.logDebug("Post data to send", post_data)
- res = self.load("http://letitbit.net/ajax/check_recaptcha.php", post=post_data, cookies=True)
+ res = self.load("http://letitbit.net/ajax/check_recaptcha.php", post=post_data)
self.logDebug(res)
diff --git a/pyload/plugin/hoster/LinksnappyCom.py b/pyload/plugin/hoster/LinksnappyCom.py
index fe3104579..a898b21b9 100644
--- a/pyload/plugin/hoster/LinksnappyCom.py
+++ b/pyload/plugin/hoster/LinksnappyCom.py
@@ -14,6 +14,7 @@ class LinksnappyCom(MultiHoster):
__version__ = "0.08"
__pattern__ = r'https?://(?:[^/]+\.)?linksnappy\.com'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Linksnappy.com multi-hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/LoadTo.py b/pyload/plugin/hoster/LoadTo.py
index 42d76b4fa..a1421714a 100644
--- a/pyload/plugin/hoster/LoadTo.py
+++ b/pyload/plugin/hoster/LoadTo.py
@@ -16,6 +16,7 @@ class LoadTo(SimpleHoster):
__version__ = "0.22"
__pattern__ = r'http://(?:www\.)?load\.to/\w+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Load.to hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/LomafileCom.py b/pyload/plugin/hoster/LomafileCom.py
index 18f315bd6..678c93ea7 100644
--- a/pyload/plugin/hoster/LomafileCom.py
+++ b/pyload/plugin/hoster/LomafileCom.py
@@ -9,6 +9,7 @@ class LomafileCom(DeadHoster):
__version__ = "0.52"
__pattern__ = r'http://lomafile\.com/\w{12}'
+ __config__ = []
__description__ = """Lomafile.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/LuckyShareNet.py b/pyload/plugin/hoster/LuckyShareNet.py
index d9cc5fe88..a0385f620 100644
--- a/pyload/plugin/hoster/LuckyShareNet.py
+++ b/pyload/plugin/hoster/LuckyShareNet.py
@@ -14,6 +14,7 @@ class LuckyShareNet(SimpleHoster):
__version__ = "0.06"
__pattern__ = r'https?://(?:www\.)?luckyshare\.net/(?P<ID>\d{10,})'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """LuckyShare.net hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/MediafireCom.py b/pyload/plugin/hoster/MediafireCom.py
index 5adf004d0..3b39e2420 100644
--- a/pyload/plugin/hoster/MediafireCom.py
+++ b/pyload/plugin/hoster/MediafireCom.py
@@ -1,128 +1,63 @@
# -*- coding: utf-8 -*-
-import re
-
-from pyload.plugin.internal.captcha import SolveMedia
-from pyload.plugin.internal.SimpleHoster import SimpleHoster, parseFileInfo
-from pyload.network.RequestFactory import getURL
-
-
-def replace_eval(js_expr):
- return js_expr.replace(r'eval("', '').replace(r"\'", r"'").replace(r'\"', r'"')
-
-
-def checkHTMLHeader(url):
- try:
- for _i in xrange(3):
- header = getURL(url, just_header=True)
-
- for line in header.splitlines():
- line = line.lower()
-
- if 'location' in line:
- url = line.split(':', 1)[1].strip()
- if 'error.php?errno=320' in url:
- return url, 1
-
- if not url.startswith('http://'):
- url = 'http://www.mediafire.com' + url
-
- break
-
- elif 'content-disposition' in line:
- return url, 2
- else:
- break
- except Exception:
- return url, 3
- else:
- return url, 0
-
-
-def getInfo(urls):
- for url in urls:
- location, status = checkHTMLHeader(url)
-
- if status:
- file_info = (url, 0, status, url)
- else:
- file_info = parseFileInfo(MediafireCom, url, getURL(url, decode=True))
-
- yield file_info
+from module.plugins.internal.CaptchaService import SolveMedia
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class MediafireCom(SimpleHoster):
__name__ = "MediafireCom"
__type__ = "hoster"
- __version__ = "0.84"
+ __version__ = "0.85"
- __pattern__ = r'http://(?:www\.)?mediafire\.com/(file/|(view/?|download\.php)?\?)(\w{11}|\w{15})($|/)'
+ __pattern__ = r'https?://(?:www\.)?mediafire\.com/(file/|view/\??|download(\.php\?|/))\w+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Mediafire.com hoster plugin"""
__license__ = "GPLv3"
__authors__ = [("zoidberg", "zoidberg@mujmail.cz"),
- ("stickell", "l.stickell@yahoo.it")]
+ ("stickell", "l.stickell@yahoo.it"),
+ ("Walter Purcaro", "vuolter@gmail.com")]
+
+ NAME_PATTERN = r'<META NAME="description" CONTENT="(?P<N>.+?)"/>'
+ SIZE_PATTERN = r'<li>File size: <span>(?P<S>[\d.,]+) (?P<U>[\w^_]+)'
+ INFO_PATTERN = r'oFileSharePopup\.ald\(\'.*?\',\'(?P<N>.+?)\',\'(?P<S>[\d.,]+)\s*(?P<U>[\w^_]+)\',\'\',\'(?P<H>.+?)\'\)'
+ OFFLINE_PATTERN = r'class="error_msg_title"'
- NAME_PATTERN = r'<META NAME="description" CONTENT="(?P<N>[^"]+)"/>'
- INFO_PATTERN = r'oFileSharePopup\.ald\(\'(?P<ID>[^\']*)\',\'(?P<N>[^\']*)\',\'(?P<S>[^\']*)\',\'\',\'(?P<H>[^\']*)\'\)'
- OFFLINE_PATTERN = r'class="error_msg_title"> Invalid or Deleted File. </div>'
+ LINK_FREE_PATTERN = r'kNO = "(.+?)"'
PASSWORD_PATTERN = r'<form name="form_password"'
def setup(self):
- self.multiDL = False
-
-
- def process(self, pyfile):
- pyfile.url = re.sub(r'/view/?\?', '/?', pyfile.url)
+ self.resumeDownload = True
+ self.multiDL = True
- self.link, result = checkHTMLHeader(pyfile.url)
- self.logDebug("Location (%d): %s" % (result, self.link))
- if result == 0:
- self.html = self.load(self.link, decode=True)
- self.checkCaptcha()
- self.multiDL = True
- self.check_data = self.getFileInfo()
-
- if self.account:
- self.handlePremium(pyfile)
- else:
- self.handleFree(pyfile)
- elif result == 1:
- self.offline()
- else:
- self.multiDL = True
- self.download(self.link, disposition=True)
+ def handleFree(self, pyfile):
+ solvemedia = SolveMedia(self)
+ captcha_key = solvemedia.detect_key()
+ if captcha_key:
+ response, challenge = solvemedia.challenge(captcha_key)
+ self.html = self.load(pyfile.url,
+ post={'adcopy_challenge': challenge,
+ 'adcopy_response' : response},
+ decode=True)
- def handleFree(self, pyfile):
if self.PASSWORD_PATTERN in self.html:
password = self.getPassword()
- if password:
- self.logInfo(_("Password protected link, trying ") + password)
- self.html = self.load(self.link, post={"downloadp": password})
+ if not password:
+ self.fail(_("No password found"))
+ else:
+ self.logInfo(_("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"))
- else:
- self.fail(_("No password found"))
-
- m = re.search(r'kNO = r"(http://.*?)";', self.html)
- if m is None:
- self.error(_("No download URL"))
- download_url = m.group(1)
- self.download(download_url)
+ return super(MediafireCom, self).handleFree(pyfile)
- def checkCaptcha(self):
- solvemedia = SolveMedia(self)
- response, challenge = solvemedia.challenge()
- self.html = self.load(self.link,
- post={'adcopy_challenge': challenge,
- 'adcopy_response' : response},
- decode=True)
+getInfo = create_getInfo(MediafireCom)
diff --git a/pyload/plugin/hoster/MegaCoNz.py b/pyload/plugin/hoster/MegaCoNz.py
index 9648e8316..e2506ee3f 100644
--- a/pyload/plugin/hoster/MegaCoNz.py
+++ b/pyload/plugin/hoster/MegaCoNz.py
@@ -50,7 +50,7 @@ class MegaCoNz(Hoster):
__type__ = "hoster"
__version__ = "0.26"
- __pattern__ = r'(?:https?://(?:www\.)?mega\.co\.nz/|mega:|chrome:.+?)#(?P<TYPE>N|)!(?P<ID>[\w^_]+)!(?P<KEY>[\w,\\-]+)'
+ __pattern__ = r'(?:https?://(?:www\.)?mega\.co\.nz/|mega:|chrome:.+?)#(?P<TYPE>N|)!(?P<ID>[\w^_]+)!(?P<KEY>[\w,-]+)'
__description__ = """Mega.co.nz hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/MegaDebridEu.py b/pyload/plugin/hoster/MegaDebridEu.py
index 842ad4de9..28707ce6f 100644
--- a/pyload/plugin/hoster/MegaDebridEu.py
+++ b/pyload/plugin/hoster/MegaDebridEu.py
@@ -11,9 +11,10 @@ from pyload.plugin.internal.MultiHoster import MultiHoster
class MegaDebridEu(MultiHoster):
__name__ = "MegaDebridEu"
__type__ = "hoster"
- __version__ = "0.46"
+ __version__ = "0.47"
__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)]
__description__ = """mega-debrid.eu multi-hoster plugin"""
__license__ = "GPLv3"
@@ -23,24 +24,6 @@ class MegaDebridEu(MultiHoster):
API_URL = "https://www.mega-debrid.eu/api.php"
- def getFilename(self, url):
- try:
- return unquote_plus(url.rsplit("/", 1)[1])
- except IndexError:
- return ""
-
-
- def handlePremium(self, pyfile):
- if not self.api_load():
- self.exitOnFail("Unable to connect to Mega-debrid.eu")
-
- self.link = self.debridLink(pyfile.url)
-
- filename = self.getFilename(self.link)
- if filename:
- pyfile.name = filename
-
-
def api_load(self):
"""
Connexion to the mega-debrid API
@@ -58,29 +41,20 @@ class MegaDebridEu(MultiHoster):
return False
- def debridLink(self, linkToDebrid):
+ def handlePremium(self, pyfile):
"""
Debrid a link
Return The debrided link if succeed or original link if fail
"""
- jsonResponse = self.load(self.API_URL, get={'action': 'getLink', 'token': self.token},
- post={"link": linkToDebrid})
- res = json_loads(jsonResponse)
+ if not self.api_load():
+ self.error("Unable to connect to remote API")
+ jsonResponse = self.load(self.API_URL,
+ get={'action': 'getLink', 'token': self.token},
+ post={'link': pyfile.url})
+
+ res = json_loads(jsonResponse)
if res['response_code'] == "ok":
- debridedLink = res['debridLink'][1:-1]
- return debridedLink
- else:
- self.exitOnFail("Unable to debrid %s" % linkToDebrid)
+ self.link = res['debridLink'][1:-1]
- def exitOnFail(self, msg):
- """
- exit the plugin on fail case
- And display the reason of this failure
- """
- if self.getConfig("unloadFailing"):
- self.logError(_(msg))
- self.resetAccount()
- else:
- self.fail(_(msg))
diff --git a/pyload/plugin/hoster/MegaFilesSe.py b/pyload/plugin/hoster/MegaFilesSe.py
index 3cfd41da4..6a1a24beb 100644
--- a/pyload/plugin/hoster/MegaFilesSe.py
+++ b/pyload/plugin/hoster/MegaFilesSe.py
@@ -9,6 +9,7 @@ class MegaFilesSe(DeadHoster):
__version__ = "0.02"
__pattern__ = r'http://(?:www\.)?megafiles\.se/\w{12}'
+ __config__ = []
__description__ = """MegaFiles.se hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/MegaRapidCz.py b/pyload/plugin/hoster/MegaRapidCz.py
index b7b9e3ffe..9d639555f 100644
--- a/pyload/plugin/hoster/MegaRapidCz.py
+++ b/pyload/plugin/hoster/MegaRapidCz.py
@@ -26,6 +26,7 @@ class MegaRapidCz(SimpleHoster):
__version__ = "0.56"
__pattern__ = r'http://(?:www\.)?(share|mega)rapid\.cz/soubor/\d+/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """MegaRapid.cz hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/MegareleaseOrg.py b/pyload/plugin/hoster/MegareleaseOrg.py
index c2c7fe357..541a1823c 100644
--- a/pyload/plugin/hoster/MegareleaseOrg.py
+++ b/pyload/plugin/hoster/MegareleaseOrg.py
@@ -9,6 +9,7 @@ class MegareleaseOrg(DeadHoster):
__version__ = "0.02"
__pattern__ = r'https?://(?:www\.)?megarelease\.org/\w{12}'
+ __config__ = []
__description__ = """Megarelease.org hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/MegasharesCom.py b/pyload/plugin/hoster/MegasharesCom.py
index 483969e2e..ed07f373b 100644
--- a/pyload/plugin/hoster/MegasharesCom.py
+++ b/pyload/plugin/hoster/MegasharesCom.py
@@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
import re
-
-from time import time
+import time
from pyload.plugin.internal.SimpleHoster import SimpleHoster
@@ -13,6 +12,7 @@ class MegasharesCom(SimpleHoster):
__version__ = "0.28"
__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)]
__description__ = """Megashares.com hoster plugin"""
__license__ = "GPLv3"
@@ -66,7 +66,7 @@ class MegasharesCom(SimpleHoster):
'rsargs[]': random_num,
'rsargs[]': passport_num,
'rsargs[]': "replace_sec_pprenewal",
- 'rsrnd[]' : str(int(time() * 1000))})
+ 'rsrnd[]' : str(int(time.time() * 1000))})
if 'Thank you for reactivating your passport.' in res:
self.correctCaptcha()
diff --git a/pyload/plugin/hoster/MegauploadCom.py b/pyload/plugin/hoster/MegauploadCom.py
index c1d5b4524..2e26b630d 100644
--- a/pyload/plugin/hoster/MegauploadCom.py
+++ b/pyload/plugin/hoster/MegauploadCom.py
@@ -9,6 +9,7 @@ class MegauploadCom(DeadHoster):
__version__ = "0.31"
__pattern__ = r'http://(?:www\.)?megaupload\.com/\?.*&?(d|v)=\w+'
+ __config__ = []
__description__ = """Megaupload.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/MegavideoCom.py b/pyload/plugin/hoster/MegavideoCom.py
index 442b0f292..d87967cd9 100644
--- a/pyload/plugin/hoster/MegavideoCom.py
+++ b/pyload/plugin/hoster/MegavideoCom.py
@@ -9,6 +9,7 @@ class MegavideoCom(DeadHoster):
__version__ = "0.21"
__pattern__ = r'http://(?:www\.)?megavideo\.com/\?.*&?(d|v)=\w+'
+ __config__ = []
__description__ = """Megavideo.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/MultishareCz.py b/pyload/plugin/hoster/MultishareCz.py
index 252e9cdb5..2444a1675 100644
--- a/pyload/plugin/hoster/MultishareCz.py
+++ b/pyload/plugin/hoster/MultishareCz.py
@@ -13,6 +13,7 @@ class MultishareCz(SimpleHoster):
__version__ = "0.40"
__pattern__ = r'http://(?:www\.)?multishare\.cz/stahnout/(?P<ID>\d+)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """MultiShare.cz hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/MyfastfileCom.py b/pyload/plugin/hoster/MyfastfileCom.py
index c065c2331..81f2ffa78 100644
--- a/pyload/plugin/hoster/MyfastfileCom.py
+++ b/pyload/plugin/hoster/MyfastfileCom.py
@@ -12,6 +12,7 @@ class MyfastfileCom(MultiHoster):
__version__ = "0.08"
__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)]
__description__ = """Myfastfile.com multi-hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/MystoreTo.py b/pyload/plugin/hoster/MystoreTo.py
index e2288e344..4791d0096 100644
--- a/pyload/plugin/hoster/MystoreTo.py
+++ b/pyload/plugin/hoster/MystoreTo.py
@@ -14,6 +14,7 @@ class MystoreTo(SimpleHoster):
__version__ = "0.03"
__pattern__ = r'https?://(?:www\.)?mystore\.to/dl/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Mystore.to hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/NahrajCz.py b/pyload/plugin/hoster/NahrajCz.py
index 6aa87a520..5e594ce64 100644
--- a/pyload/plugin/hoster/NahrajCz.py
+++ b/pyload/plugin/hoster/NahrajCz.py
@@ -9,6 +9,7 @@ class NahrajCz(DeadHoster):
__version__ = "0.21"
__pattern__ = r'http://(?:www\.)?nahraj\.cz/content/download/.+'
+ __config__ = []
__description__ = """Nahraj.cz hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/NarodRu.py b/pyload/plugin/hoster/NarodRu.py
index 7b9da6e4e..6cd9d57cc 100644
--- a/pyload/plugin/hoster/NarodRu.py
+++ b/pyload/plugin/hoster/NarodRu.py
@@ -13,6 +13,7 @@ class NarodRu(SimpleHoster):
__version__ = "0.12"
__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)]
__description__ = """Narod.ru hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/NetloadIn.py b/pyload/plugin/hoster/NetloadIn.py
index 2ed298ffa..5178c684c 100644
--- a/pyload/plugin/hoster/NetloadIn.py
+++ b/pyload/plugin/hoster/NetloadIn.py
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
import re
+import time
from urlparse import urljoin
-from time import time
from pyload.network.RequestFactory import getURL
from pyload.plugin.Hoster import Hoster
@@ -161,7 +161,7 @@ class NetloadIn(Hoster):
def final_wait(self, page):
- wait_time = self.get_wait_time(page)
+ wait_time = self.get_wait_time.time(page)
self.setWait(wait_time)
@@ -172,10 +172,10 @@ class NetloadIn(Hoster):
self.url = self.get_file_url(page)
- def check_free_wait(self,page):
+ def check_free_wait(self, page):
if ">An access request has been made from IP address <" in page:
self.wantReconnect = True
- self.setWait(self.get_wait_time(page) or 30)
+ self.setWait(self.get_wait_time.time(page) or 30)
self.wait()
return True
else:
@@ -207,7 +207,7 @@ class NetloadIn(Hoster):
for i in xrange(5):
if not page:
page = self.load(self.url)
- t = time() + 30
+ t = time.time() + 30
if "/share/templates/download_hddcrash.tpl" in page:
self.logError(_("Netload HDD Crash"))
@@ -281,7 +281,7 @@ class NetloadIn(Hoster):
return None
- def get_wait_time(self, page):
+ def get_wait_time.time(self, page):
return int(re.search(r"countdown\((.+),'change\(\)'\)", page).group(1)) / 100
diff --git a/pyload/plugin/hoster/NitroflareCom.py b/pyload/plugin/hoster/NitroflareCom.py
index 85630a148..dfe33e59c 100644
--- a/pyload/plugin/hoster/NitroflareCom.py
+++ b/pyload/plugin/hoster/NitroflareCom.py
@@ -1,14 +1,7 @@
# -*- coding: utf-8 -*-
-#
-# Note:
-# Right now premium support is not added
-# Thus, any file that require premium support
-# cannot be downloaded. Only the file that is free to
-# download can be downloaded.
import re
-from pyload.utils import json_loads
from pyload.plugin.internal.CaptchaService import ReCaptcha
from pyload.plugin.internal.SimpleHoster import SimpleHoster
@@ -16,9 +9,10 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster
class NitroflareCom(SimpleHoster):
__name__ = "NitroflareCom"
__type__ = "hoster"
- __version__ = "0.08"
+ __version__ = "0.09"
__pattern__ = r'https?://(?:www\.)?nitroflare\.com/view/(?P<ID>[\w^_]+)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Nitroflare.com hoster plugin"""
__license__ = "GPLv3"
@@ -36,7 +30,7 @@ class NitroflareCom(SimpleHoster):
RECAPTCHA_KEY = "6Lenx_USAAAAAF5L1pmTWvWcH73dipAEzNnmNLgy"
PREMIUM_ONLY_PATTERN = r'This file is available with Premium only'
- WAIT_PATTERN = r'You have to wait .+'
+ WAIT_PATTERN = r'You have to wait .+?<'
ERROR_PATTERN = r'downloading is not possible'
@@ -68,8 +62,8 @@ class NitroflareCom(SimpleHoster):
# used here to load the cookies which will be required later
self.load(pyfile.url, post={'goToFreePage': ""})
- self.load("https://www.nitroflare.com/ajax/setCookie.php", post={'fileId': self.info['pattern']['ID']})
- self.html = self.load("https://www.nitroflare.com/ajax/freeDownload.php",
+ self.load("http://nitroflare.com/ajax/setCookie.php", post={'fileId': self.info['pattern']['ID']})
+ self.html = self.load("http://nitroflare.com/ajax/freeDownload.php",
post={'method': "startTimer", 'fileId': self.info['pattern']['ID']})
self.checkErrors()
@@ -87,7 +81,7 @@ class NitroflareCom(SimpleHoster):
recaptcha = ReCaptcha(self)
response, challenge = recaptcha.challenge(self.RECAPTCHA_KEY)
- self.html = self.load("https://www.nitroflare.com/ajax/freeDownload.php",
+ self.html = self.load("http://nitroflare.com/ajax/freeDownload.php",
post={'method' : "fetchDownload",
'recaptcha_challenge_field': challenge,
'recaptcha_response_field' : response})
diff --git a/pyload/plugin/hoster/NoPremiumPl.py b/pyload/plugin/hoster/NoPremiumPl.py
index ddb9d78f8..c80d2ef6c 100644
--- a/pyload/plugin/hoster/NoPremiumPl.py
+++ b/pyload/plugin/hoster/NoPremiumPl.py
@@ -10,6 +10,7 @@ class NoPremiumPl(MultiHoster):
__version__ = "0.02"
__pattern__ = r'https?://direct\.nopremium\.pl.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """NoPremium.pl multi-hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/NosuploadCom.py b/pyload/plugin/hoster/NosuploadCom.py
index edb8c6508..3d785dd90 100644
--- a/pyload/plugin/hoster/NosuploadCom.py
+++ b/pyload/plugin/hoster/NosuploadCom.py
@@ -26,14 +26,14 @@ class NosuploadCom(XFSHoster):
def getDownloadLink(self):
# stage1: press the "Free Download" button
data = self.getPostParameters()
- self.html = self.load(self.pyfile.url, post=data, ref=True, decode=True)
+ self.html = self.load(self.pyfile.url, post=data, decode=True)
# stage2: wait some time and press the "Download File" button
data = self.getPostParameters()
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.wait(wait_time)
- self.html = self.load(self.pyfile.url, post=data, ref=True, decode=True)
+ self.html = self.load(self.pyfile.url, post=data, decode=True)
# stage3: get the download link
return re.search(self.LINK_PATTERN, self.html, re.S).group(1)
diff --git a/pyload/plugin/hoster/NowDownloadSx.py b/pyload/plugin/hoster/NowDownloadSx.py
index 00101a379..1cc009b30 100644
--- a/pyload/plugin/hoster/NowDownloadSx.py
+++ b/pyload/plugin/hoster/NowDownloadSx.py
@@ -9,9 +9,10 @@ from pyload.utils import fixup
class NowDownloadSx(SimpleHoster):
__name__ = "NowDownloadSx"
__type__ = "hoster"
- __version__ = "0.07"
+ __version__ = "0.09"
- __pattern__ = r'http://(?:www\.)?(nowdownload\.(at|ch|co|eu|sx)/(dl/|download\.php\?id=)|likeupload\.org/)\w+'
+ __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)]
__description__ = """NowDownload.sx hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/NowVideoSx.py b/pyload/plugin/hoster/NowVideoSx.py
index 3c747c253..3501c5219 100644
--- a/pyload/plugin/hoster/NowVideoSx.py
+++ b/pyload/plugin/hoster/NowVideoSx.py
@@ -8,9 +8,10 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster
class NowVideoSx(SimpleHoster):
__name__ = "NowVideoSx"
__type__ = "hoster"
- __version__ = "0.10"
+ __version__ = "0.12"
- __pattern__ = r'http://(?:www\.)?nowvideo\.(at|ch|co|eu|li|sx)/(video|mobile/#/videos)/(?P<ID>\w+)'
+ __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)]
__description__ = """NowVideo.sx hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/OneFichierCom.py b/pyload/plugin/hoster/OneFichierCom.py
index b9756e7ff..dd8064585 100644
--- a/pyload/plugin/hoster/OneFichierCom.py
+++ b/pyload/plugin/hoster/OneFichierCom.py
@@ -8,9 +8,10 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster
class OneFichierCom(SimpleHoster):
__name__ = "OneFichierCom"
__type__ = "hoster"
- __version__ = "0.78"
+ __version__ = "0.79"
__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)]
__description__ = """1fichier.com hoster plugin"""
__license__ = "GPLv3"
@@ -31,7 +32,7 @@ class OneFichierCom(SimpleHoster):
COOKIES = [("1fichier.com", "LG", "en")]
DISPOSITION = False #: Remove in 0.4.10
- WAIT_PATTERN = r'>You must wait (\d+) minutes'
+ WAIT_PATTERN = r'>You must wait \d+ minutes'
def setup(self):
diff --git a/pyload/plugin/hoster/OronCom.py b/pyload/plugin/hoster/OronCom.py
index f28d34391..9a5207367 100644
--- a/pyload/plugin/hoster/OronCom.py
+++ b/pyload/plugin/hoster/OronCom.py
@@ -9,6 +9,7 @@ class OronCom(DeadHoster):
__version__ = "0.14"
__pattern__ = r'https?://(?:www\.)?oron\.com/\w{12}'
+ __config__ = []
__description__ = """Oron.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/OverLoadMe.py b/pyload/plugin/hoster/OverLoadMe.py
index 8c0436d78..4bec0b0db 100644
--- a/pyload/plugin/hoster/OverLoadMe.py
+++ b/pyload/plugin/hoster/OverLoadMe.py
@@ -13,33 +13,22 @@ from pyload.utils import parseFileSize
class OverLoadMe(MultiHoster):
__name__ = "OverLoadMe"
__type__ = "hoster"
- __version__ = "0.09"
+ __version__ = "0.11"
__pattern__ = r'https?://.*overload\.me/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Over-Load.me multi-hoster plugin"""
__license__ = "GPLv3"
__authors__ = [("marley", "marley@over-load.me")]
- def getFilename(self, url):
- try:
- name = unquote(url.rsplit("/", 1)[1])
- except IndexError:
- name = "Unknown_Filename..."
-
- if name.endswith("..."): #: incomplete filename, append random stuff
- name += "%s.tmp" % randrange(100, 999)
-
- return name
-
-
def setup(self):
self.chunkLimit = 5
def handlePremium(self, pyfile):
- https = "https" if self.getConfig("ssl") else "http"
+ https = "https" if self.getConfig('ssl') else "http"
data = self.account.getAccountData(self.user)
page = self.load(https + "://api.over-load.me/getdownload.php",
get={'auth': data['password'],
@@ -58,16 +47,6 @@ class OverLoadMe(MultiHoster):
pyfile.size = parseFileSize(data['filesize'])
http_repl = ["http://", "https://"]
- self.link = data['downloadlink'].replace(*http_repl if self.getConfig("ssl") else *http_repl[::-1])
-
- if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown") or pyfile.name.endswith('..'):
- # only use when name wasn't already set
- pyfile.name = self.getFilename(self.link)
-
+ self.link = data['downloadlink'].replace(*http_repl if self.getConfig('ssl') else *http_repl[::-1])
- def checkFile(self):
- if self.checkDownload({"error": "<title>An error occured while processing your request</title>"})
- # usual this download can safely be retried
- self.retry(wait_time=60, reason=_("An error occured while generating link."))
- return super(OverLoadMe, self).checkFile()
diff --git a/pyload/plugin/hoster/PandaplaNet.py b/pyload/plugin/hoster/PandaplaNet.py
index b9d5b6e5a..2a61a69c4 100644
--- a/pyload/plugin/hoster/PandaplaNet.py
+++ b/pyload/plugin/hoster/PandaplaNet.py
@@ -9,6 +9,7 @@ class PandaplaNet(DeadHoster):
__version__ = "0.03"
__pattern__ = r'http://(?:www\.)?pandapla\.net/\w{12}'
+ __config__ = []
__description__ = """Pandapla.net hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/PotloadCom.py b/pyload/plugin/hoster/PotloadCom.py
index 4845299a5..c1e96ff77 100644
--- a/pyload/plugin/hoster/PotloadCom.py
+++ b/pyload/plugin/hoster/PotloadCom.py
@@ -9,6 +9,7 @@ class PotloadCom(DeadHoster):
__version__ = "0.02"
__pattern__ = r'http://(?:www\.)?potload\.com/\w{12}'
+ __config__ = []
__description__ = """Potload.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/PremiumTo.py b/pyload/plugin/hoster/PremiumTo.py
index 07945f873..46ecf0b36 100644
--- a/pyload/plugin/hoster/PremiumTo.py
+++ b/pyload/plugin/hoster/PremiumTo.py
@@ -11,9 +11,10 @@ from pyload.utils import fs_encode
class PremiumTo(MultiHoster):
__name__ = "PremiumTo"
__type__ = "hoster"
- __version__ = "0.21"
+ __version__ = "0.22"
__pattern__ = r'^unmatchable$'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Premium.to multi-hoster plugin"""
__license__ = "GPLv3"
@@ -34,7 +35,7 @@ class PremiumTo(MultiHoster):
disposition=True)
- def checkFile(self):
+ def checkFile(self, rules={}):
if self.checkDownload({'nopremium': "No premium account available"}):
self.retry(60, 5 * 60, "No premium account available")
@@ -49,4 +50,4 @@ class PremiumTo(MultiHoster):
if err:
self.fail(err)
- return super(PremiumTo, self).checkFile()
+ return super(PremiumTo, self).checkFile(rules)
diff --git a/pyload/plugin/hoster/PremiumizeMe.py b/pyload/plugin/hoster/PremiumizeMe.py
index c1153280b..c6dcfa794 100644
--- a/pyload/plugin/hoster/PremiumizeMe.py
+++ b/pyload/plugin/hoster/PremiumizeMe.py
@@ -10,6 +10,7 @@ class PremiumizeMe(MultiHoster):
__version__ = "0.16"
__pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.activate
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Premiumize.me multi-hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/PromptfileCom.py b/pyload/plugin/hoster/PromptfileCom.py
index fb8c907e5..f550fa573 100644
--- a/pyload/plugin/hoster/PromptfileCom.py
+++ b/pyload/plugin/hoster/PromptfileCom.py
@@ -11,6 +11,7 @@ class PromptfileCom(SimpleHoster):
__version__ = "0.13"
__pattern__ = r'https?://(?:www\.)?promptfile\.com/'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Promptfile.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/PrzeklejPl.py b/pyload/plugin/hoster/PrzeklejPl.py
index bfb27834a..d6437e82e 100644
--- a/pyload/plugin/hoster/PrzeklejPl.py
+++ b/pyload/plugin/hoster/PrzeklejPl.py
@@ -9,6 +9,7 @@ class PrzeklejPl(DeadHoster):
__version__ = "0.11"
__pattern__ = r'http://(?:www\.)?przeklej\.pl/plik/.+'
+ __config__ = []
__description__ = """Przeklej.pl hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/QuickshareCz.py b/pyload/plugin/hoster/QuickshareCz.py
index 9300d230b..570c9f876 100644
--- a/pyload/plugin/hoster/QuickshareCz.py
+++ b/pyload/plugin/hoster/QuickshareCz.py
@@ -11,6 +11,7 @@ class QuickshareCz(SimpleHoster):
__version__ = "0.56"
__pattern__ = r'http://(?:[^/]*\.)?quickshare\.cz/stahnout-soubor/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Quickshare.cz hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/RPNetBiz.py b/pyload/plugin/hoster/RPNetBiz.py
index af56d8162..5e393ecb9 100644
--- a/pyload/plugin/hoster/RPNetBiz.py
+++ b/pyload/plugin/hoster/RPNetBiz.py
@@ -11,10 +11,11 @@ class RPNetBiz(MultiHoster):
__type__ = "hoster"
__version__ = "0.14"
+ __pattern__ = r'https?://.+rpnet\.biz'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
+
__description__ = """RPNet.biz multi-hoster plugin"""
__license__ = "GPLv3"
-
- __pattern__ = r'https?://.+rpnet\.biz'
__authors__ = [("Dman", "dmanugm@gmail.com")]
diff --git a/pyload/plugin/hoster/RapideoPl.py b/pyload/plugin/hoster/RapideoPl.py
index 9e9bbf58b..86dfad5f0 100644
--- a/pyload/plugin/hoster/RapideoPl.py
+++ b/pyload/plugin/hoster/RapideoPl.py
@@ -10,6 +10,7 @@ class RapideoPl(MultiHoster):
__version__ = "0.02"
__pattern__ = r'^unmatchable$'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Rapideo.pl multi-hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/RapidgatorNet.py b/pyload/plugin/hoster/RapidgatorNet.py
index 8cd883537..2af0001df 100644
--- a/pyload/plugin/hoster/RapidgatorNet.py
+++ b/pyload/plugin/hoster/RapidgatorNet.py
@@ -7,15 +7,16 @@ from pycurl import HTTPHEADER
from pyload.utils import json_loads
from pyload.network.HTTPRequest import BadHeader
from pyload.plugin.internal.CaptchaService import AdsCaptcha, ReCaptcha, SolveMedia
-from pyload.plugin.internal.SimpleHoster import SimpleHoster, secondsToMidnight
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, secondsToMidnight
class RapidgatorNet(SimpleHoster):
__name__ = "RapidgatorNet"
__type__ = "hoster"
- __version__ = "0.32"
+ __version__ = "0.33"
__pattern__ = r'http://(?:www\.)?(rapidgator\.net|rg\.to)/file/\w+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Rapidgator.net hoster plugin"""
__license__ = "GPLv3"
@@ -36,7 +37,7 @@ class RapidgatorNet(SimpleHoster):
JSVARS_PATTERN = r'\s+var\s*(startTimerUrl|getDownloadUrl|captchaUrl|fid|secs)\s*=\s*\'?(.*?)\'?;'
PREMIUM_ONLY_PATTERN = r'You can download files up to|This file can be downloaded by premium only<'
- ERROR_PATTERN = r'You have reached your (daily|hourly) downloads limit'
+ ERROR_PATTERN = r'You have reached your (?:daily|hourly) downloads limit'
WAIT_PATTERN = r'(Delay between downloads must be not less than|Try again in).+'
LINK_FREE_PATTERN = r'return \'(http://\w+.rapidgator.net/.*)\';'
@@ -125,8 +126,12 @@ class RapidgatorNet(SimpleHoster):
self.link = m.group(1)
break
else:
- captcha, captcha_key = self.handleCaptcha()
- response, challenge = captcha.challenge(captcha_key)
+ captcha = self.handleCaptcha()
+
+ if not captcha:
+ self.error(_("Captcha pattern not found"))
+
+ response, challenge = captcha.challenge()
self.html = self.load(url, post={'DownloadCaptchaForm[captcha]': "",
'adcopy_challenge' : challenge,
@@ -141,24 +146,10 @@ class RapidgatorNet(SimpleHoster):
def handleCaptcha(self):
- m = re.search(self.ADSCAPTCHA_PATTERN, self.html)
- if m:
- captcha_key = m.group(1)
- captcha = AdsCaptcha(self)
- else:
- m = re.search(self.RECAPTCHA_PATTERN, self.html)
- if m:
- captcha_key = m.group(1)
- captcha = ReCaptcha(self)
- else:
- m = re.search(self.SOLVEMEDIA_PATTERN, self.html)
- if m:
- captcha_key = m.group(1)
- captcha = SolveMedia(self)
- else:
- self.error(_("Captcha"))
-
- return captcha, captcha_key
+ for klass in (AdsCaptcha, ReCaptcha, SolveMedia):
+ inst = klass(self)
+ if inst.detect_key():
+ return inst
def getJsonResponse(self, url):
diff --git a/pyload/plugin/hoster/RapiduNet.py b/pyload/plugin/hoster/RapiduNet.py
index 1e12ab776..e11114a4a 100644
--- a/pyload/plugin/hoster/RapiduNet.py
+++ b/pyload/plugin/hoster/RapiduNet.py
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
import re
+import time
from pycurl import HTTPHEADER
-from time import time, altzone
from pyload.utils import json_loads
from pyload.plugin.captcha import ReCaptcha
@@ -16,6 +16,7 @@ class RapiduNet(SimpleHoster):
__version__ = "0.07"
__pattern__ = r'https?://(?:www\.)?rapidu\.net/(?P<ID>\d{10})'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Rapidu.net hoster plugin"""
__license__ = "GPLv3"
@@ -47,14 +48,14 @@ class RapiduNet(SimpleHoster):
decode=True)
if str(jsvars['timeToDownload']) is "stop":
- t = (24 * 60 * 60) - (int(time()) % (24 * 60 * 60)) + altzone
+ t = (24 * 60 * 60) - (int(time.time()) % (24 * 60 * 60)) + time.altzone
self.logInfo("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
else:
- self.wait(int(jsvars['timeToDownload']) - int(time()))
+ self.wait(int(jsvars['timeToDownload']) - int(time.time()))
recaptcha = ReCaptcha(self)
diff --git a/pyload/plugin/hoster/RealdebridCom.py b/pyload/plugin/hoster/RealdebridCom.py
index ae6f69d7c..ca303cf88 100644
--- a/pyload/plugin/hoster/RealdebridCom.py
+++ b/pyload/plugin/hoster/RealdebridCom.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
import re
+import time
from random import randrange
from urllib import unquote
-from time import time
from pyload.utils import json_loads
from pyload.plugin.internal.MultiHoster import MultiHoster
@@ -14,25 +14,16 @@ from pyload.utils import parseFileSize
class RealdebridCom(MultiHoster):
__name__ = "RealdebridCom"
__type__ = "hoster"
- __version__ = "0.64"
+ __version__ = "0.67"
__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)]
__description__ = """Real-Debrid.com multi-hoster plugin"""
__license__ = "GPLv3"
__authors__ = [("Devirex Hazzard", "naibaf_11@yahoo.de")]
- def getFilename(self, url):
- try:
- name = unquote(url.rsplit("/", 1)[1])
- except IndexError:
- name = "Unknown_Filename..."
- if not name or name.endswith(".."): #: incomplete filename, append random stuff
- name += "%s.tmp" % randrange(100, 999)
- return name
-
-
def setup(self):
self.chunkLimit = 3
@@ -42,7 +33,7 @@ class RealdebridCom(MultiHoster):
get={'lang' : "en",
'link' : pyfile.url,
'password': self.getPassword(),
- 'time' : int(time() * 1000)}))
+ 'time' : int(time.time() * 1000)}))
self.logDebug("Returned Data: %s" % data)
@@ -58,19 +49,9 @@ class RealdebridCom(MultiHoster):
pyfile.size = parseFileSize(data['file_size'])
self.link = data['generated_links'][0][-1]
- if self.getConfig("ssl"):
+ if self.getConfig('ssl'):
self.link = self.link.replace("http://", "https://")
else:
self.link = self.link.replace("https://", "http://")
- if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown") or pyfile.name.endswith('..'):
- #only use when name wasnt already set
- pyfile.name = self.getFilename(self.link)
-
-
- def checkFile(self):
- if self.checkDownload({"error": "<title>An error occured while processing your request</title>"}):
- #usual this download can safely be retried
- self.retry(wait_time=60, reason=_("An error occured while generating link"))
- return super(RealdebridCom, self).checkFile()
diff --git a/pyload/plugin/hoster/RehostTo.py b/pyload/plugin/hoster/RehostTo.py
index 3e3e88c6c..36bdb54b5 100644
--- a/pyload/plugin/hoster/RehostTo.py
+++ b/pyload/plugin/hoster/RehostTo.py
@@ -11,6 +11,7 @@ class RehostTo(MultiHoster):
__version__ = "0.21"
__pattern__ = r'https?://.*rehost\.to\..+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Rehost.com multi-hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/RemixshareCom.py b/pyload/plugin/hoster/RemixshareCom.py
index a1cd2a37e..1df62bbba 100644
--- a/pyload/plugin/hoster/RemixshareCom.py
+++ b/pyload/plugin/hoster/RemixshareCom.py
@@ -19,6 +19,7 @@ class RemixshareCom(SimpleHoster):
__version__ = "0.03"
__pattern__ = r'https?://remixshare\.com/(download|dl)/\w+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Remixshare.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/RgHostNet.py b/pyload/plugin/hoster/RgHostNet.py
index d9e548721..2552b5091 100644
--- a/pyload/plugin/hoster/RgHostNet.py
+++ b/pyload/plugin/hoster/RgHostNet.py
@@ -11,6 +11,7 @@ class RgHostNet(SimpleHoster):
__version__ = "0.03"
__pattern__ = r'http://(?:www\.)?rghost\.net/\d+(?:r=\d+)?'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """RgHost.net hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/SendspaceCom.py b/pyload/plugin/hoster/SendspaceCom.py
index 4d477579d..5faf2a870 100644
--- a/pyload/plugin/hoster/SendspaceCom.py
+++ b/pyload/plugin/hoster/SendspaceCom.py
@@ -11,6 +11,7 @@ class SendspaceCom(SimpleHoster):
__version__ = "0.17"
__pattern__ = r'https?://(?:www\.)?sendspace\.com/file/\w+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Sendspace.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/Share76Com.py b/pyload/plugin/hoster/Share76Com.py
index d460726f2..e826b4e2d 100644
--- a/pyload/plugin/hoster/Share76Com.py
+++ b/pyload/plugin/hoster/Share76Com.py
@@ -9,6 +9,7 @@ class Share76Com(DeadHoster):
__version__ = "0.04"
__pattern__ = r'http://(?:www\.)?share76\.com/\w{12}'
+ __config__ = []
__description__ = """Share76.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/ShareFilesCo.py b/pyload/plugin/hoster/ShareFilesCo.py
index edd56572e..946b6a423 100644
--- a/pyload/plugin/hoster/ShareFilesCo.py
+++ b/pyload/plugin/hoster/ShareFilesCo.py
@@ -9,6 +9,7 @@ class ShareFilesCo(DeadHoster):
__version__ = "0.02"
__pattern__ = r'http://(?:www\.)?sharefiles\.co/\w{12}'
+ __config__ = []
__description__ = """Sharefiles.co hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/SharebeesCom.py b/pyload/plugin/hoster/SharebeesCom.py
index 54de21095..405fab050 100644
--- a/pyload/plugin/hoster/SharebeesCom.py
+++ b/pyload/plugin/hoster/SharebeesCom.py
@@ -9,6 +9,7 @@ class SharebeesCom(DeadHoster):
__version__ = "0.02"
__pattern__ = r'http://(?:www\.)?sharebees\.com/\w{12}'
+ __config__ = []
__description__ = """ShareBees hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/ShareonlineBiz.py b/pyload/plugin/hoster/ShareonlineBiz.py
index f3be1aeb2..2d8b6d925 100644
--- a/pyload/plugin/hoster/ShareonlineBiz.py
+++ b/pyload/plugin/hoster/ShareonlineBiz.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
import re
+import time
-from time import time
from urllib import unquote
from urlparse import urlparse
@@ -14,9 +14,10 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster
class ShareonlineBiz(SimpleHoster):
__name__ = "ShareonlineBiz"
__type__ = "hoster"
- __version__ = "0.48"
+ __version__ = "0.49"
__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)]
__description__ = """Shareonline.biz hoster plugin"""
__license__ = "GPLv3"
@@ -74,7 +75,7 @@ class ShareonlineBiz(SimpleHoster):
m = re.search(r'var wait=(\d+);', self.html)
self.setWait(int(m.group(1)) if m else 30)
- res = self.load("%s/free/captcha/%d" % (self.pyfile.url, int(time() * 1000)),
+ 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})
@@ -108,7 +109,7 @@ class ShareonlineBiz(SimpleHoster):
self.download(download_url)
- def checkFile(self):
+ def checkFile(self, rules={}):
check = self.checkDownload({'cookie': re.compile(r'<div id="dl_failure"'),
'fail' : re.compile(r"<title>Share-Online")})
@@ -120,7 +121,7 @@ class ShareonlineBiz(SimpleHoster):
self.invalidCaptcha()
self.retry(5, 5 * 60, _("Download failed"))
- return super(ShareonlineBiz, self).checkFile()
+ return super(ShareonlineBiz, self).checkFile(rules)
def handlePremium(self, pyfile): #: should be working better loading (account) api internally
diff --git a/pyload/plugin/hoster/SharingmatrixCom.py b/pyload/plugin/hoster/SharingmatrixCom.py
index d1892be14..81c371c98 100644
--- a/pyload/plugin/hoster/SharingmatrixCom.py
+++ b/pyload/plugin/hoster/SharingmatrixCom.py
@@ -9,6 +9,7 @@ class SharingmatrixCom(DeadHoster):
__version__ = "0.01"
__pattern__ = r'http://(?:www\.)?sharingmatrix\.com/file/\w+'
+ __config__ = []
__description__ = """Sharingmatrix.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/ShragleCom.py b/pyload/plugin/hoster/ShragleCom.py
index 628537108..7f06e2424 100644
--- a/pyload/plugin/hoster/ShragleCom.py
+++ b/pyload/plugin/hoster/ShragleCom.py
@@ -9,6 +9,7 @@ class ShragleCom(DeadHoster):
__version__ = "0.22"
__pattern__ = r'http://(?:www\.)?(cloudnator|shragle)\.com/files/(?P<ID>.+?)/'
+ __config__ = []
__description__ = """Cloudnator.com (Shragle.com) hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/SimplyPremiumCom.py b/pyload/plugin/hoster/SimplyPremiumCom.py
index 50b278985..83640bcd5 100644
--- a/pyload/plugin/hoster/SimplyPremiumCom.py
+++ b/pyload/plugin/hoster/SimplyPremiumCom.py
@@ -2,8 +2,6 @@
import re
-from datetime import datetime, timedelta
-
from pyload.plugin.internal.MultiHoster import MultiHoster
from pyload.plugin.internal.SimpleHoster import secondsToMidnight
@@ -14,6 +12,7 @@ class SimplyPremiumCom(MultiHoster):
__version__ = "0.08"
__pattern__ = r'https?://.+simply-premium\.com'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Simply-Premium.com multi-hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/SimplydebridCom.py b/pyload/plugin/hoster/SimplydebridCom.py
index 4b740ff20..0605bb4f3 100644
--- a/pyload/plugin/hoster/SimplydebridCom.py
+++ b/pyload/plugin/hoster/SimplydebridCom.py
@@ -8,9 +8,10 @@ from pyload.plugin.internal.MultiHoster import MultiHoster, replace_patterns
class SimplydebridCom(MultiHoster):
__name__ = "SimplydebridCom"
__type__ = "hoster"
- __version__ = "0.15"
+ __version__ = "0.17"
__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)]
__description__ = """Simply-debrid.com multi-hoster plugin"""
__license__ = "GPLv3"
@@ -24,7 +25,7 @@ class SimplydebridCom(MultiHoster):
("ul.to", "uploaded.net/file")
("uploaded.com", "uploaded.net")
("filerio.com", "filerio.in")
- ("lumfile.com", "lumfile.se")]
+ ("lumfile.com", "lumfile.se")])
if 'fileparadox' in self.link:
self.link = self.link.replace("http://", "https://")
@@ -38,8 +39,8 @@ class SimplydebridCom(MultiHoster):
self.wait(5)
- def checkFile(self):
+ def checkFile(self, rules={}):
if self.checkDownload({"error": "No address associated with hostname"}):
self.retry(24, 3 * 60, _("Bad file downloaded"))
- return super(SimplydebridCom, self).checkFile()
+ return super(SimplydebridCom, self).checkFile(rules)
diff --git a/pyload/plugin/hoster/SmoozedCom.py b/pyload/plugin/hoster/SmoozedCom.py
index 715d99b40..b321fee03 100644
--- a/pyload/plugin/hoster/SmoozedCom.py
+++ b/pyload/plugin/hoster/SmoozedCom.py
@@ -7,9 +7,10 @@ from pyload.plugin.internal.MultiHoster import MultiHoster
class SmoozedCom(MultiHoster):
__name__ = "SmoozedCom"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.activate
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Smoozed.com hoster plugin"""
__license__ = "GPLv3"
@@ -55,9 +56,9 @@ class SmoozedCom(MultiHoster):
self.link = header["location"][-1] if isinstance(header["location"], list) else header["location"]
- def checkFile(self):
+ def checkFile(self, rules={}):
if self.checkDownload({'error': '{"state":"error"}',
'retry': '{"state":"retry"}'}):
self.fail(_("Error response received"))
- return super(SmoozedCom, self).checkFile()
+ return super(SmoozedCom, self).checkFile(rules)
diff --git a/pyload/plugin/hoster/SockshareCom.py b/pyload/plugin/hoster/SockshareCom.py
index e903e3daf..3881278e1 100644
--- a/pyload/plugin/hoster/SockshareCom.py
+++ b/pyload/plugin/hoster/SockshareCom.py
@@ -9,6 +9,7 @@ class SockshareCom(DeadHoster):
__version__ = "0.05"
__pattern__ = r'http://(?:www\.)?sockshare\.com/(mobile/)?(file|embed)/(?P<ID>\w+)'
+ __config__ = []
__description__ = """Sockshare.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/SoundcloudCom.py b/pyload/plugin/hoster/SoundcloudCom.py
index fd5d1ea6c..31aa7ba3c 100644
--- a/pyload/plugin/hoster/SoundcloudCom.py
+++ b/pyload/plugin/hoster/SoundcloudCom.py
@@ -1,57 +1,56 @@
# -*- coding: utf-8 -*-
-import pycurl
import re
-from pyload.plugin.Hoster import Hoster
+from module.plugin.internal.SimpleHoster import SimpleHoster
+from module.common.json_layer import json_loads
-class SoundcloudCom(Hoster):
+class SoundcloudCom(SimpleHoster):
__name__ = "SoundcloudCom"
__type__ = "hoster"
- __version__ = "0.10"
+ __version__ = "0.11"
- __pattern__ = r'https?://(?:www\.)?soundcloud\.com/(?P<UID>.+?)/(?P<SID>.+)'
+ __pattern__ = r'https?://(?:www\.)?soundcloud\.com/[\w-]+/[\w-]+'
+ __config__ = [("use_premium", "bool" , "Use premium account if available", True ),
+ ("quality" , "Lower;Higher", "Quality" , "Higher")]
__description__ = """SoundCloud.com hoster plugin"""
__license__ = "GPLv3"
- __authors__ = [("Peekayy", "peekayy.dev@gmail.com")]
-
-
- def process(self, pyfile):
- # default UserAgent of HTTPRequest fails for this hoster so we use this one
- self.req.http.c.setopt(pycurl.USERAGENT, 'Mozilla/5.0')
- self.html = self.load(pyfile.url)
- m = re.search(r'<div class="haudio.*?large.*?" data-sc-track="(?P<ID>\d*)"', self.html)
- songId = clientId = ""
- if m:
- songId = m.group('ID')
- if len(songId) <= 0:
- self.logError(_("Could not find song id"))
- self.offline()
- else:
- m = re.search(r'"clientID":"(?P<CID>.*?)"', self.html)
- if m:
- clientId = m.group('CID')
-
- if len(clientId) <= 0:
- clientId = "b45b1aa10f1ac2941910a7f0d10f8e28"
-
- m = re.search(r'<em itemprop="name">\s(?P<TITLE>.*?)\s</em>', self.html)
- if m:
- pyfile.name = m.group('TITLE') + ".mp3"
- else:
- pyfile.name = re.match(self.__pattern__, pyfile.url).group('SID') + ".mp3"
-
- # url to retrieve the actual song url
- self.html = self.load("https://api.sndcdn.com/i1/tracks/%s/streams" % songId, get={"client_id": clientId})
- # getting streams
- # for now we choose the first stream found in all cases
- # it could be improved if relevant for this hoster
- streams = [
- (result.group('QUALITY'), result.group('URL'))
- for result in re.finditer(r'"(?P<QUALITY>.*?)":"(?P<URL>.*?)"', self.html)
- ]
- self.logDebug("Found Streams", streams)
- self.logDebug("Downloading", streams[0][0], streams[0][1])
- self.download(streams[0][1])
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
+
+
+ NAME_PATTERN = r'title" content="(?P<N>.+?)"'
+ OFFLINE_PATTERN = r'<title>"SoundCloud - Hear the world’s sounds"</title>'
+
+
+ def handleFree(self, pyfile):
+ try:
+ song_id = re.search(r'sounds:(\d+)"', self.html).group(1)
+
+ except Exception:
+ self.error(_("Could not find song id"))
+
+ try:
+ client_id = re.search(r'"clientID":"(.+?)"', self.html).group(1)
+
+ except Exception:
+ client_id = "b45b1aa10f1ac2941910a7f0d10f8e28"
+
+ # url to retrieve the actual song url
+ streams = json_loads(self.load("https://api.soundcloud.com/tracks/%s/streams" % song_id,
+ get={'client_id': client_id}))
+
+ regex = re.compile(r'[^\d]')
+ http_streams = sorted([(key, value) for key, value in streams.iteritems() if key.startswith('http_')],
+ key=lambda t: regex.sub(t[0], ''),
+ reverse=True)
+
+ self.logDebug("Streams found: %s" % (http_streams or "None"))
+
+ if http_streams:
+ stream_name, self.link = http_streams[0 if self.getConfig('quality') == "Higher" else -1]
+ pyfile.name += '.' + stream_name.split('_')[1].lower()
+
+
+getInfo = create_getInfo(SoundcloudCom)
diff --git a/pyload/plugin/hoster/SpeedLoadOrg.py b/pyload/plugin/hoster/SpeedLoadOrg.py
index a20f87902..5642987d2 100644
--- a/pyload/plugin/hoster/SpeedLoadOrg.py
+++ b/pyload/plugin/hoster/SpeedLoadOrg.py
@@ -9,6 +9,7 @@ class SpeedLoadOrg(DeadHoster):
__version__ = "1.02"
__pattern__ = r'http://(?:www\.)?speedload\.org/(?P<ID>\w+)'
+ __config__ = []
__description__ = """Speedload.org hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/SpeedfileCz.py b/pyload/plugin/hoster/SpeedfileCz.py
index 981ba861d..f9df09d08 100644
--- a/pyload/plugin/hoster/SpeedfileCz.py
+++ b/pyload/plugin/hoster/SpeedfileCz.py
@@ -9,6 +9,7 @@ class SpeedfileCz(DeadHoster):
__version__ = "0.32"
__pattern__ = r'http://(?:www\.)?speedfile\.cz/.+'
+ __config__ = []
__description__ = """Speedfile.cz hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/SpeedyshareCom.py b/pyload/plugin/hoster/SpeedyshareCom.py
index c92522d70..541e41b96 100644
--- a/pyload/plugin/hoster/SpeedyshareCom.py
+++ b/pyload/plugin/hoster/SpeedyshareCom.py
@@ -16,6 +16,7 @@ class SpeedyshareCom(SimpleHoster):
__version__ = "0.05"
__pattern__ = r'https?://(?:www\.)?(speedyshare\.com|speedy\.sh)/\w+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Speedyshare.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/StorageTo.py b/pyload/plugin/hoster/StorageTo.py
index 78b9a60bb..835666b45 100644
--- a/pyload/plugin/hoster/StorageTo.py
+++ b/pyload/plugin/hoster/StorageTo.py
@@ -9,6 +9,7 @@ class StorageTo(DeadHoster):
__version__ = "0.01"
__pattern__ = r'http://(?:www\.)?storage\.to/get/.+'
+ __config__ = []
__description__ = """Storage.to hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/TurbobitNet.py b/pyload/plugin/hoster/TurbobitNet.py
index c69158c39..e1c7eeee6 100644
--- a/pyload/plugin/hoster/TurbobitNet.py
+++ b/pyload/plugin/hoster/TurbobitNet.py
@@ -20,6 +20,7 @@ class TurbobitNet(SimpleHoster):
__version__ = "0.19"
__pattern__ = r'http://(?:www\.)?turbobit\.net/(?:download/free/)?(?P<ID>\w+)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Turbobit.net hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/TurbouploadCom.py b/pyload/plugin/hoster/TurbouploadCom.py
index e964d1365..20ae8bb04 100644
--- a/pyload/plugin/hoster/TurbouploadCom.py
+++ b/pyload/plugin/hoster/TurbouploadCom.py
@@ -9,6 +9,7 @@ class TurbouploadCom(DeadHoster):
__version__ = "0.03"
__pattern__ = r'http://(?:www\.)?turboupload\.com/(\w+)'
+ __config__ = []
__description__ = """Turboupload.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/TwoSharedCom.py b/pyload/plugin/hoster/TwoSharedCom.py
index 8c6864414..854c46979 100644
--- a/pyload/plugin/hoster/TwoSharedCom.py
+++ b/pyload/plugin/hoster/TwoSharedCom.py
@@ -11,6 +11,7 @@ class TwoSharedCom(SimpleHoster):
__version__ = "0.13"
__pattern__ = r'http://(?:www\.)?2shared\.com/(account/)?(download|get|file|document|photo|video|audio)/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """2Shared.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/UlozTo.py b/pyload/plugin/hoster/UlozTo.py
index 0e4156ad0..fbbe21f3e 100644
--- a/pyload/plugin/hoster/UlozTo.py
+++ b/pyload/plugin/hoster/UlozTo.py
@@ -18,6 +18,7 @@ class UlozTo(SimpleHoster):
__version__ = "1.04"
__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)]
__description__ = """Uloz.to hoster plugin"""
__license__ = "GPLv3"
@@ -46,7 +47,7 @@ class UlozTo(SimpleHoster):
def process(self, pyfile):
pyfile.url = re.sub(r"(?<=http://)([^/]+)", "www.ulozto.net", pyfile.url)
- self.html = self.load(pyfile.url, decode=True, cookies=True)
+ self.html = self.load(pyfile.url, decode=True)
if re.search(self.ADULT_PATTERN, self.html):
self.logInfo(_("Adult content confirmation needed"))
@@ -57,7 +58,7 @@ class UlozTo(SimpleHoster):
token = m.group(1)
self.html = self.load(pyfile.url, get={'do': "askAgeForm-submit"},
- post={"agree": "Confirm", "_token_": token}, cookies=True)
+ post={"agree": "Confirm", "_token_": token})
if self.PASSWD_PATTERN in self.html:
password = self.getPassword()
@@ -65,7 +66,7 @@ class UlozTo(SimpleHoster):
if password:
self.logInfo(_("Password protected link, trying ") + password)
self.html = self.load(pyfile.url, get={'do': "passwordProtectedForm-submit"},
- post={"password": password, "password_send": 'Send'}, cookies=True)
+ post={"password": password, "password_send": 'Send'})
if self.PASSWD_PATTERN in self.html:
self.fail(_("Incorrect password"))
@@ -82,7 +83,7 @@ class UlozTo(SimpleHoster):
else:
self.handleFree(pyfile)
- self.doCheckDownload()
+ self.checkFile()
def handleFree(self, pyfile):
@@ -117,14 +118,14 @@ class UlozTo(SimpleHoster):
self.error(_("CAPTCHA form changed"))
self.multiDL = True
- self.download("http://www.ulozto.net" + action, post=inputs, cookies=True, disposition=True)
+ self.download("http://www.ulozto.net" + action, post=inputs, disposition=True)
def handlePremium(self, pyfile):
self.download(pyfile.url, get={'do': "directDownload"}, disposition=True)
- def doCheckDownload(self):
+ def checkFile(self, rules={}):
check = self.checkDownload({
"wrong_captcha": re.compile(r'<ul class="error">\s*<li>Error rewriting the text.</li>'),
"offline" : re.compile(self.OFFLINE_PATTERN),
@@ -153,3 +154,5 @@ class UlozTo(SimpleHoster):
elif check == "not_found":
self.fail(_("Server error - file not downloadable"))
+ return super(UlozTo, self).checkFile(rules)
+
diff --git a/pyload/plugin/hoster/UloziskoSk.py b/pyload/plugin/hoster/UloziskoSk.py
index ce40c9f7a..506ceecb1 100644
--- a/pyload/plugin/hoster/UloziskoSk.py
+++ b/pyload/plugin/hoster/UloziskoSk.py
@@ -11,6 +11,7 @@ class UloziskoSk(SimpleHoster):
__version__ = "0.25"
__pattern__ = r'http://(?:www\.)?ulozisko\.sk/.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Ulozisko.sk hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/UnibytesCom.py b/pyload/plugin/hoster/UnibytesCom.py
index 2c9b9ca5f..a02d5b8c7 100644
--- a/pyload/plugin/hoster/UnibytesCom.py
+++ b/pyload/plugin/hoster/UnibytesCom.py
@@ -13,6 +13,7 @@ class UnibytesCom(SimpleHoster):
__version__ = "0.12"
__pattern__ = r'https?://(?:www\.)?unibytes\.com/[\w .-]{11}B'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """UniBytes.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/UnrestrictLi.py b/pyload/plugin/hoster/UnrestrictLi.py
index c81bb0554..fa77d15e8 100644
--- a/pyload/plugin/hoster/UnrestrictLi.py
+++ b/pyload/plugin/hoster/UnrestrictLi.py
@@ -10,9 +10,10 @@ from pyload.plugin.internal.SimpleHoster import secondsToMidnight
class UnrestrictLi(MultiHoster):
__name__ = "UnrestrictLi"
__type__ = "hoster"
- __version__ = "0.21"
+ __version__ = "0.22"
__pattern__ = r'https?://(?:www\.)?(unrestrict|unr)\.li/dl/[\w^_]+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Unrestrict.li multi-hoster plugin"""
__license__ = "GPLv3"
@@ -67,10 +68,10 @@ class UnrestrictLi(MultiHoster):
self.setNameSize()
- def checkFile(self):
- super(UnrestrictLi, self).checkFile()
+ def checkFile(self, rules={}):
+ super(UnrestrictLi, self).checkFile(rules)
- if self.getConfig("history"):
+ if self.getConfig('history'):
self.load("https://unrestrict.li/history/", get={'delete': "all"})
self.logInfo(_("Download history deleted"))
diff --git a/pyload/plugin/hoster/UploadStationCom.py b/pyload/plugin/hoster/UploadStationCom.py
index d77bdb760..decde08ab 100644
--- a/pyload/plugin/hoster/UploadStationCom.py
+++ b/pyload/plugin/hoster/UploadStationCom.py
@@ -9,6 +9,7 @@ class UploadStationCom(DeadHoster):
__version__ = "0.52"
__pattern__ = r'http://(?:www\.)?uploadstation\.com/file/(?P<ID>\w+)'
+ __config__ = []
__description__ = """UploadStation.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/UploadableCh.py b/pyload/plugin/hoster/UploadableCh.py
index c54ecb495..af3022594 100644
--- a/pyload/plugin/hoster/UploadableCh.py
+++ b/pyload/plugin/hoster/UploadableCh.py
@@ -2,8 +2,6 @@
import re
-from time import sleep
-
from pyload.plugin.captcha import ReCaptcha
from pyload.plugin.internal.SimpleHoster import SimpleHoster
@@ -11,9 +9,10 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster
class UploadableCh(SimpleHoster):
__name__ = "UploadableCh"
__type__ = "hoster"
- __version__ = "0.08"
+ __version__ = "0.09"
__pattern__ = r'http://(?:www\.)?uploadable\.ch/file/(?P<ID>\w+)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Uploadable.ch hoster plugin"""
__license__ = "GPLv3"
@@ -35,13 +34,13 @@ class UploadableCh(SimpleHoster):
def handleFree(self, pyfile):
# Click the "free user" button and wait
- a = self.load(pyfile.url, cookies=True, post={'downloadLink': "wait"}, decode=True)
+ a = self.load(pyfile.url, post={'downloadLink': "wait"}, decode=True)
self.logDebug(a)
self.wait(30)
# Make the recaptcha appear and show it the pyload interface
- b = self.load(pyfile.url, cookies=True, post={'checkDownload': "check"}, decode=True)
+ b = self.load(pyfile.url, post={'checkDownload': "check"}, decode=True)
self.logDebug(b) #: Expected output: {"success":"showCaptcha"}
recaptcha = ReCaptcha(self)
@@ -50,7 +49,6 @@ class UploadableCh(SimpleHoster):
# Submit the captcha solution
self.load("http://www.uploadable.ch/checkReCaptcha.php",
- cookies=True,
post={'recaptcha_challenge_field' : challenge,
'recaptcha_response_field' : response,
'recaptcha_shortencode_field': self.info['pattern']['ID']},
@@ -59,18 +57,18 @@ class UploadableCh(SimpleHoster):
self.wait(3)
# Get ready for downloading
- self.load(pyfile.url, cookies=True, post={'downloadLink': "show"}, decode=True)
+ self.load(pyfile.url, post={'downloadLink': "show"}, decode=True)
self.wait(3)
# Download the file
- self.download(pyfile.url, cookies=True, post={'download': "normal"}, disposition=True)
+ self.download(pyfile.url, post={'download': "normal"}, disposition=True)
- def checkFile(self):
+ def checkFile(self, rules={}):
if self.checkDownload({'wait': re.compile("Please wait for")}):
self.logInfo("Downloadlimit reached, please wait or reconnect")
self.wait(60 * 60, True)
self.retry()
- return super(UploadableCh, self).checkFile()
+ return super(UploadableCh, self).checkFile(rules)
diff --git a/pyload/plugin/hoster/UploadboxCom.py b/pyload/plugin/hoster/UploadboxCom.py
index 01e4c6854..33b81b97e 100644
--- a/pyload/plugin/hoster/UploadboxCom.py
+++ b/pyload/plugin/hoster/UploadboxCom.py
@@ -9,6 +9,7 @@ class UploadboxCom(DeadHoster):
__version__ = "0.05"
__pattern__ = r'http://(?:www\.)?uploadbox\.com/files/.+'
+ __config__ = []
__description__ = """UploadBox.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/UploadedTo.py b/pyload/plugin/hoster/UploadedTo.py
index f9b121bfe..165b29c7a 100644
--- a/pyload/plugin/hoster/UploadedTo.py
+++ b/pyload/plugin/hoster/UploadedTo.py
@@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
import re
-
-from time import sleep
+import time
from pyload.network.RequestFactory import getURL
from pyload.plugin.internal.CaptchaService import ReCaptcha
@@ -12,9 +11,10 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster
class UploadedTo(SimpleHoster):
__name__ = "UploadedTo"
__type__ = "hoster"
- __version__ = "0.84"
+ __version__ = "0.85"
__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)]
__description__ = """Uploaded.net hoster plugin"""
__license__ = "GPLv3"
@@ -48,7 +48,7 @@ class UploadedTo(SimpleHoster):
info['status'] = 1
break
else:
- sleep(3)
+ time.sleep(3)
return info
@@ -109,9 +109,9 @@ class UploadedTo(SimpleHoster):
self.checkErrors()
- def checkFile(self):
+ def checkFile(self, rules={}):
if self.checkDownload({'limit-dl': self.DL_LIMIT_ERROR}):
self.wait(3 * 60 * 60, True)
self.retry()
- return super(UploadedTo, self).checkFile()
+ return super(UploadedTo, self).checkFile(rules)
diff --git a/pyload/plugin/hoster/UploadhereCom.py b/pyload/plugin/hoster/UploadhereCom.py
index 77970a97b..259b53dc1 100644
--- a/pyload/plugin/hoster/UploadhereCom.py
+++ b/pyload/plugin/hoster/UploadhereCom.py
@@ -9,6 +9,7 @@ class UploadhereCom(DeadHoster):
__version__ = "0.12"
__pattern__ = r'http://(?:www\.)?uploadhere\.com/\w{10}'
+ __config__ = []
__description__ = """Uploadhere.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/UploadheroCom.py b/pyload/plugin/hoster/UploadheroCom.py
index 917053f18..2def499d9 100644
--- a/pyload/plugin/hoster/UploadheroCom.py
+++ b/pyload/plugin/hoster/UploadheroCom.py
@@ -5,15 +5,18 @@
import re
+from urlparse import urljoin
+
from pyload.plugin.internal.SimpleHoster import SimpleHoster
class UploadheroCom(SimpleHoster):
__name__ = "UploadheroCom"
__type__ = "hoster"
- __version__ = "0.17"
+ __version__ = "0.18"
__pattern__ = r'http://(?:www\.)?uploadhero\.com?/dl/\w+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """UploadHero.co plugin"""
__license__ = "GPLv3"
@@ -21,53 +24,45 @@ class UploadheroCom(SimpleHoster):
("zoidberg", "zoidberg@mujmail.cz")]
- NAME_PATTERN = r'<div class="nom_de_fichier">(?P<N>.*?)</div>'
- SIZE_PATTERN = r'Taille du fichier : </span><strong>(?P<S>.*?)</strong>'
- OFFLINE_PATTERN = r'<p class="titre_dl_2">|<div class="raison"><strong>Le lien du fichier ci-dessus n\'existe plus.'
+ NAME_PATTERN = r'<div class="nom_de_fichier">(?P<N>.+?)<'
+ SIZE_PATTERN = r'>Filesize: </span><strong>(?P<S>[\d.,]+) (?P<U>[\w^_]+)'
+ OFFLINE_PATTERN = r'<p class="titre_dl_2">'
COOKIES = [("uploadhero.co", "lang", "en")]
- IP_BLOCKED_PATTERN = r'href="(/lightbox_block_download\.php\?min=.*?)"'
- IP_WAIT_PATTERN = r'<span id="minutes">(\d+)</span>.*\s*<span id="seconds">(\d+)</span>'
+ IP_BLOCKED_PATTERN = r'href="(/lightbox_block_download\.php\?min=.+?)"'
+ IP_WAIT_PATTERN = r'<span id="minutes">(\d+)</span>.*\s*<span id="seconds">(\d+)</span>'
CAPTCHA_PATTERN = r'"(/captchadl\.php\?\w+)"'
- LINK_FREE_PATTERN = r'var magicomfg = \'<a href="(http://[^<>"]*?)"|"(http://storage\d+\.uploadhero\.co/\?d=\w+/[^<>"/]+)"'
- LINK_PREMIUM_PATTERN = r'<a href="([^"]+)" id="downloadnow"'
+ LINK_FREE_PATTERN = r'var magicomfg = \'<a href="(.+?)"|"(http://storage\d+\.uploadhero\.co.+?)"'
+ LINK_PREMIUM_PATTERN = r'<a href="(.+?)" id="downloadnow"'
def handleFree(self, pyfile):
- self.checkErrors()
-
m = re.search(self.CAPTCHA_PATTERN, self.html)
if m is None:
- self.error(_("CAPTCHA_PATTERN not found"))
- captcha_url = "http://uploadhero.co" + m.group(1)
+ self.error(_("Captcha not found"))
- for _i in xrange(5):
- captcha = self.decryptCaptcha(captcha_url)
- self.html = self.load(pyfile.url, get={"code": captcha})
- m = re.search(self.LINK_FREE_PATTERN, self.html)
- if m:
- self.correctCaptcha()
- download_url = m.group(1) or m.group(2)
- break
- else:
- self.invalidCaptcha()
- else:
- self.fail(_("No valid captcha code entered"))
+ captcha = self.decryptCaptcha(urljoin("http://uploadhero.co", m.group(1)))
- self.download(download_url)
+ self.html = self.load(pyfile.url,
+ get={"code": captcha})
+
+ m = re.search(self.LINK_FREE_PATTERN, self.html)
+ if m:
+ self.link = m.group(1) or m.group(2)
+ self.wait(50)
def checkErrors(self):
m = re.search(self.IP_BLOCKED_PATTERN, self.html)
if m:
- self.html = self.load("http://uploadhero.co%s" % m.group(1))
+ self.html = self.load(urljoin("http://uploadhero.co", m.group(1)))
m = re.search(self.IP_WAIT_PATTERN, self.html)
wait_time = (int(m.group(1)) * 60 + int(m.group(2))) if m else 5 * 60
self.wait(wait_time, True)
self.retry()
- self.info.pop('error', None)
+ return super(UploadheroCom, self).checkErrors()
diff --git a/pyload/plugin/hoster/UploadkingCom.py b/pyload/plugin/hoster/UploadkingCom.py
index 6f4374096..33ecfd574 100644
--- a/pyload/plugin/hoster/UploadkingCom.py
+++ b/pyload/plugin/hoster/UploadkingCom.py
@@ -9,6 +9,7 @@ class UploadkingCom(DeadHoster):
__version__ = "0.14"
__pattern__ = r'http://(?:www\.)?uploadking\.com/\w{10}'
+ __config__ = []
__description__ = """UploadKing.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/UpstoreNet.py b/pyload/plugin/hoster/UpstoreNet.py
index 98e5c0d64..20c207a70 100644
--- a/pyload/plugin/hoster/UpstoreNet.py
+++ b/pyload/plugin/hoster/UpstoreNet.py
@@ -12,6 +12,7 @@ class UpstoreNet(SimpleHoster):
__version__ = "0.05"
__pattern__ = r'https?://(?:www\.)?upstore\.net/'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Upstore.Net File Download Hoster"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/UptoboxCom.py b/pyload/plugin/hoster/UptoboxCom.py
index da93b3c6b..de23d4ad0 100644
--- a/pyload/plugin/hoster/UptoboxCom.py
+++ b/pyload/plugin/hoster/UptoboxCom.py
@@ -6,7 +6,7 @@ from pyload.plugin.internal.XFSHoster import XFSHoster
class UptoboxCom(XFSHoster):
__name__ = "UptoboxCom"
__type__ = "hoster"
- __version__ = "0.17"
+ __version__ = "0.18"
__pattern__ = r'https?://(?:www\.)?(uptobox|uptostream)\.com/\w{12}'
@@ -15,8 +15,9 @@ class UptoboxCom(XFSHoster):
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
- INFO_PATTERN = r'"para_title">(?P<N>.+) \((?P<S>[\d.,]+) (?P<U>[\w^_]+)\)'
- OFFLINE_PATTERN = r'>(File not found|Access Denied|404 Not Found)'
+ INFO_PATTERN = r'"para_title">(?P<N>.+) \((?P<S>[\d.,]+) (?P<U>[\w^_]+)\)'
+ OFFLINE_PATTERN = r'>(File not found|Access Denied|404 Not Found)'
+ TEMP_OFFLINE_PATTERN = r'>Service Unavailable'
LINK_PATTERN = r'"(https?://\w+\.uptobox\.com/d/.*?)"'
diff --git a/pyload/plugin/hoster/VeehdCom.py b/pyload/plugin/hoster/VeehdCom.py
index 91d7cc443..f9756662c 100644
--- a/pyload/plugin/hoster/VeehdCom.py
+++ b/pyload/plugin/hoster/VeehdCom.py
@@ -11,8 +11,8 @@ class VeehdCom(Hoster):
__version__ = "0.23"
__pattern__ = r'http://veehd\.com/video/\d+_\S+'
- __config__ = [("filename_spaces", "bool", "Allow spaces in filename", False),
- ("replacement_char", "str", "Filename replacement character", "_")]
+ __config__ = [("filename_spaces", "bool", "Allow spaces in filename", False),
+ ("replacement_char", "str", "Filename replacement character", "_")]
__description__ = """Veehd.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/VeohCom.py b/pyload/plugin/hoster/VeohCom.py
index a4394736d..0fa118355 100644
--- a/pyload/plugin/hoster/VeohCom.py
+++ b/pyload/plugin/hoster/VeohCom.py
@@ -11,7 +11,8 @@ class VeohCom(SimpleHoster):
__version__ = "0.22"
__pattern__ = r'http://(?:www\.)?veoh\.com/(tv/)?(watch|videos)/(?P<ID>v\w+)'
- __config__ = [("quality", "Low;High;Auto", "Quality", "Auto")]
+ __config__ = [("use_premium", "bool" , "Use premium account if available", True ),
+ ("quality" , "Low;High;Auto", "Quality" , "Auto")]
__description__ = """Veoh.com hoster plugin"""
__license__ = "GPLv3"
@@ -33,7 +34,7 @@ class VeohCom(SimpleHoster):
def handleFree(self, pyfile):
- quality = self.getConfig("quality")
+ quality = self.getConfig('quality')
if quality == "Auto":
quality = ("High", "Low")
diff --git a/pyload/plugin/hoster/VimeoCom.py b/pyload/plugin/hoster/VimeoCom.py
index c48ad3414..fb6ea094a 100644
--- a/pyload/plugin/hoster/VimeoCom.py
+++ b/pyload/plugin/hoster/VimeoCom.py
@@ -11,8 +11,9 @@ class VimeoCom(SimpleHoster):
__version__ = "0.04"
__pattern__ = r'https?://(?:www\.)?(player\.)?vimeo\.com/(video/)?(?P<ID>\d+)'
- __config__ = [("quality", "Lowest;Mobile;SD;HD;Highest", "Quality", "Highest"),
- ("original", "bool", "Try to download the original file first", True)]
+ __config__ = [("use_premium", "bool" , "Use premium account if available" , True ),
+ ("quality" , "Lowest;Mobile;SD;HD;Highest", "Quality" , "Highest"),
+ ("original" , "bool" , "Try to download the original file", True )]
__description__ = """Vimeo.com hoster plugin"""
__license__ = "GPLv3"
@@ -46,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.getConfig('original'):
if "original" in link:
self.download(link[q])
return
else:
self.logInfo(_("Original file not downloadable"))
- quality = self.getConfig("quality")
+ quality = self.getConfig('quality')
if quality == "Highest":
qlevel = ("hd", "sd", "mobile")
elif quality == "Lowest":
diff --git a/pyload/plugin/hoster/Vipleech4UCom.py b/pyload/plugin/hoster/Vipleech4UCom.py
index 100def197..0550f5c77 100644
--- a/pyload/plugin/hoster/Vipleech4UCom.py
+++ b/pyload/plugin/hoster/Vipleech4UCom.py
@@ -9,6 +9,7 @@ class Vipleech4UCom(DeadHoster):
__version__ = "0.20"
__pattern__ = r'http://(?:www\.)?vipleech4u\.com/manager\.php'
+ __config__ = []
__description__ = """Vipleech4u.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/WarserverCz.py b/pyload/plugin/hoster/WarserverCz.py
index d44b751f9..bedda34a7 100644
--- a/pyload/plugin/hoster/WarserverCz.py
+++ b/pyload/plugin/hoster/WarserverCz.py
@@ -9,6 +9,7 @@ class WarserverCz(DeadHoster):
__version__ = "0.13"
__pattern__ = r'http://(?:www\.)?warserver\.cz/stahnout/\d+'
+ __config__ = []
__description__ = """Warserver.cz hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/WebshareCz.py b/pyload/plugin/hoster/WebshareCz.py
index 58c9c6a44..baeecfc94 100644
--- a/pyload/plugin/hoster/WebshareCz.py
+++ b/pyload/plugin/hoster/WebshareCz.py
@@ -12,6 +12,7 @@ class WebshareCz(SimpleHoster):
__version__ = "0.16"
__pattern__ = r'https?://(?:www\.)?webshare\.cz/(?:#/)?file/(?P<ID>\w+)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """WebShare.cz hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/WrzucTo.py b/pyload/plugin/hoster/WrzucTo.py
index de78d7af2..88eb38789 100644
--- a/pyload/plugin/hoster/WrzucTo.py
+++ b/pyload/plugin/hoster/WrzucTo.py
@@ -13,6 +13,7 @@ class WrzucTo(SimpleHoster):
__version__ = "0.03"
__pattern__ = r'http://(?:www\.)?wrzuc\.to/(\w+(\.wt|\.html)|(\w+/?linki/\w+))'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Wrzuc.to hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/WuploadCom.py b/pyload/plugin/hoster/WuploadCom.py
index 729db1d4d..0b4411a5b 100644
--- a/pyload/plugin/hoster/WuploadCom.py
+++ b/pyload/plugin/hoster/WuploadCom.py
@@ -9,6 +9,7 @@ class WuploadCom(DeadHoster):
__version__ = "0.23"
__pattern__ = r'http://(?:www\.)?wupload\..+?/file/((\w+/)?\d+)(/.*)?'
+ __config__ = []
__description__ = """Wupload.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/X7To.py b/pyload/plugin/hoster/X7To.py
index ac01bc5ff..f8700ba67 100644
--- a/pyload/plugin/hoster/X7To.py
+++ b/pyload/plugin/hoster/X7To.py
@@ -9,6 +9,7 @@ class X7To(DeadHoster):
__version__ = "0.41"
__pattern__ = r'http://(?:www\.)?x7\.to/'
+ __config__ = []
__description__ = """X7.to hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/XFileSharingPro.py b/pyload/plugin/hoster/XFileSharingPro.py
index 8b9f7fcfa..e90826536 100644
--- a/pyload/plugin/hoster/XFileSharingPro.py
+++ b/pyload/plugin/hoster/XFileSharingPro.py
@@ -8,7 +8,7 @@ from pyload.plugin.internal.XFSHoster import XFSHoster
class XFileSharingPro(XFSHoster):
__name__ = "XFileSharingPro"
__type__ = "hoster"
- __version__ = "0.44"
+ __version__ = "0.45"
__pattern__ = r'^unmatchable$'
@@ -34,9 +34,6 @@ class XFileSharingPro(XFSHoster):
self.HOSTER_DOMAIN = re.match(self.__pattern__, self.pyfile.url).group("DOMAIN").lower()
self.HOSTER_NAME = "".join(part.capitalize() for part in re.split(r'(\.|\d+)', self.HOSTER_DOMAIN) if part != '.')
- if self.HOSTER_NAME[0].isdigit():
- self.HOSTER_NAME = 'X' + self.HOSTER_NAME
-
account = self.core.accountManager.getAccountPlugin(self.HOSTER_NAME)
if account and account.canUse():
diff --git a/pyload/plugin/hoster/XHamsterCom.py b/pyload/plugin/hoster/XHamsterCom.py
index 92340152f..73944a61b 100644
--- a/pyload/plugin/hoster/XHamsterCom.py
+++ b/pyload/plugin/hoster/XHamsterCom.py
@@ -22,7 +22,7 @@ class XHamsterCom(Hoster):
__version__ = "0.12"
__pattern__ = r'http://(?:www\.)?xhamster\.com/movies/.+'
- __config__ = [("type", ".mp4;.flv", "Preferred type", ".mp4")]
+ __config__ = [("type", ".mp4;.flv", "Preferred type", ".mp4")]
__description__ = """XHamster.com hoster plugin"""
__license__ = "GPLv3"
@@ -35,8 +35,8 @@ class XHamsterCom(Hoster):
if not self.file_exists():
self.offline()
- if self.getConfig("type"):
- self.desired_fmt = self.getConfig("type")
+ if self.getConfig('type'):
+ self.desired_fmt = self.getConfig('type')
pyfile.name = self.get_file_name() + self.desired_fmt
self.download(self.get_file_url())
diff --git a/pyload/plugin/hoster/XdadevelopersCom.py b/pyload/plugin/hoster/XdadevelopersCom.py
index 386973a94..8ef79657f 100644
--- a/pyload/plugin/hoster/XdadevelopersCom.py
+++ b/pyload/plugin/hoster/XdadevelopersCom.py
@@ -14,6 +14,7 @@ class XdadevelopersCom(SimpleHoster):
__version__ = "0.03"
__pattern__ = r'https?://(?:www\.)?forum\.xda-developers\.com/devdb/project/dl/\?id=\d+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Xda-developers.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/Xdcc.py b/pyload/plugin/hoster/Xdcc.py
index b9aa45419..10d50369f 100644
--- a/pyload/plugin/hoster/Xdcc.py
+++ b/pyload/plugin/hoster/Xdcc.py
@@ -4,11 +4,11 @@ import re
import socket
import struct
import sys
+import time
from os import makedirs
from os.path import exists, join
from select import select
-from time import time
from pyload.plugin.Hoster import Hoster
from pyload.utils import fs_join
@@ -84,12 +84,12 @@ class Xdcc(Hoster):
#######################
# CONNECT TO IRC AND IDLE FOR REAL LINK
- dl_time = time()
+ dl_time = time.time()
sock = socket.socket()
sock.connect((host, int(port)))
if nick == "pyload":
- nick = "pyload-%d" % (time() % 1000) # last 3 digits
+ nick = "pyload-%d" % (time.time() % 1000) # last 3 digits
sock.send("NICK %s\r\n" % nick)
sock.send("USER %s %s bla :%s\r\n" % (ident, host, real))
@@ -111,13 +111,13 @@ class Xdcc(Hoster):
break
if retry:
- if time() > retry:
+ if time.time() > retry:
retry = None
- dl_time = time()
+ dl_time = time.time()
sock.send("PRIVMSG %s :xdcc send #%s\r\n" % (bot, pack))
else:
- if (dl_time + self.timeout) < time(): # todo: add in config
+ if (dl_time + self.timeout) < time.time(): # todo: add in config
sock.send("QUIT :byebye\r\n")
sock.close()
self.fail(_("XDCC Bot did not answer"))
@@ -159,7 +159,7 @@ class Xdcc(Hoster):
sock.send("NOTICE %s :%s\r\n" % (msg['origin'], "pyLoad! IRC Interface"))
elif msg['text'] == "\x01TIME\x01":
self.logDebug("Sending CTCP TIME")
- sock.send("NOTICE %s :%d\r\n" % (msg['origin'], time()))
+ sock.send("NOTICE %s :%d\r\n" % (msg['origin'], time.time()))
elif msg['text'] == "\x01LAG\x01":
pass # don't know how to answer
@@ -172,7 +172,7 @@ class Xdcc(Hoster):
print "%s: %s" % (msg['origin'], msg['text'])
if "You already requested that pack" in msg['text']:
- retry = time() + 300
+ retry = time.time() + 300
if "you must be on a known channel to request a pack" in msg['text']:
self.fail(_("Wrong channel"))
diff --git a/pyload/plugin/hoster/YibaishiwuCom.py b/pyload/plugin/hoster/YibaishiwuCom.py
index a53acdaf5..9f90dbe5e 100644
--- a/pyload/plugin/hoster/YibaishiwuCom.py
+++ b/pyload/plugin/hoster/YibaishiwuCom.py
@@ -12,6 +12,7 @@ class YibaishiwuCom(SimpleHoster):
__version__ = "0.14"
__pattern__ = r'http://(?:www\.)?(?:u\.)?115\.com/file/(?P<ID>\w+)'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """115.com hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/YoutubeCom.py b/pyload/plugin/hoster/YoutubeCom.py
index bf8785022..260b1ba3d 100644
--- a/pyload/plugin/hoster/YoutubeCom.py
+++ b/pyload/plugin/hoster/YoutubeCom.py
@@ -36,13 +36,13 @@ class YoutubeCom(Hoster):
__version__ = "0.41"
__pattern__ = r'https?://(?:[^/]*\.)?(youtube\.com|youtu\.be)/watch\?(?:.*&)?v=.+'
- __config__ = [("quality", "sd;hd;fullhd;240p;360p;480p;720p;1080p;3072p", "Quality Setting" , "hd" ),
- ("fmt" , "int" , "FMT/ITAG Number (0 for auto)", 0 ),
- (".mp4" , "bool" , "Allow .mp4" , True ),
- (".flv" , "bool" , "Allow .flv" , True ),
- (".webm" , "bool" , "Allow .webm" , False),
- (".3gp" , "bool" , "Allow .3gp" , False),
- ("3d" , "bool" , "Prefer 3D" , False)]
+ __config__ = [("quality", "sd;hd;fullhd;240p;360p;480p;720p;1080p;3072p", "Quality Setting" , "hd" ),
+ ("fmt" , "int" , "FMT/ITAG Number (0 for auto)", 0 ),
+ (".mp4" , "bool" , "Allow .mp4" , True ),
+ (".flv" , "bool" , "Allow .flv" , True ),
+ (".webm" , "bool" , "Allow .webm" , False),
+ (".3gp" , "bool" , "Allow .3gp" , False),
+ ("3d" , "bool" , "Prefer 3D" , False)]
__description__ = """Youtube.com hoster plugin"""
__license__ = "GPLv3"
@@ -95,7 +95,7 @@ class YoutubeCom(Hoster):
self.tempOffline()
#get config
- use3d = self.getConfig("3d")
+ use3d = self.getConfig('3d')
if use3d:
quality = {"sd": 82, "hd": 84, "fullhd": 85, "240p": 83, "360p": 82,
@@ -104,10 +104,10 @@ 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.getConfig('fmt')
if not desired_fmt:
- desired_fmt = quality.get(self.getConfig("quality"), 18)
+ desired_fmt = quality.get(self.getConfig('quality'), 18)
elif desired_fmt not in self.formats:
self.logWarning(_("FMT %d unknown, using default") % desired_fmt)
diff --git a/pyload/plugin/hoster/ZShareNet.py b/pyload/plugin/hoster/ZShareNet.py
index 12c65b206..fb02370f5 100644
--- a/pyload/plugin/hoster/ZShareNet.py
+++ b/pyload/plugin/hoster/ZShareNet.py
@@ -9,6 +9,7 @@ class ZShareNet(DeadHoster):
__version__ = "0.21"
__pattern__ = r'https?://(?:ww[2w]\.)?zshares?\.net/.+'
+ __config__ = []
__description__ = """ZShare.net hoster plugin"""
__license__ = "GPLv3"
diff --git a/pyload/plugin/hoster/ZeveraCom.py b/pyload/plugin/hoster/ZeveraCom.py
index 264a62a7d..96bbf3455 100644
--- a/pyload/plugin/hoster/ZeveraCom.py
+++ b/pyload/plugin/hoster/ZeveraCom.py
@@ -10,9 +10,10 @@ from pyload.plugin.internal.MultiHoster import MultiHoster
class ZeveraCom(MultiHoster):
__name__ = "ZeveraCom"
__type__ = "hoster"
- __version__ = "0.28"
+ __version__ = "0.29"
__pattern__ = r'https?://(?:www\.)zevera\.com/(getFiles\.ashx|Members/download\.ashx)\?.*ourl=.+'
+ __config__ = [("use_premium", "bool", "Use premium account if available", True)]
__description__ = """Zevera.com multi-hoster plugin"""
__license__ = "GPLv3"
@@ -24,8 +25,8 @@ class ZeveraCom(MultiHoster):
self.link = "https://%s/getFiles.ashx?ourl=%s" % (self.account.HOSTER_DOMAIN, pyfile.url)
- def checkFile(self):
+ def checkFile(self, rules={}):
if self.checkDownload({"error": 'action="ErrorDownload.aspx'}):
self.fail(_("Error response received"))
- return super(ZeveraCom, self).checkFile()
+ return super(ZeveraCom, self).checkFile(rules)
diff --git a/pyload/plugin/hoster/ZippyshareCom.py b/pyload/plugin/hoster/ZippyshareCom.py
index f52d90b8b..784eccb68 100644
--- a/pyload/plugin/hoster/ZippyshareCom.py
+++ b/pyload/plugin/hoster/ZippyshareCom.py
@@ -2,6 +2,8 @@
import re
+from BeautifulSoup import BeautifulSoup
+
from pyload.plugin.internal.CaptchaService import ReCaptcha
from pyload.plugin.internal.SimpleHoster import SimpleHoster
@@ -9,22 +11,24 @@ from pyload.plugin.internal.SimpleHoster import SimpleHoster
class ZippyshareCom(SimpleHoster):
__name__ = "ZippyshareCom"
__type__ = "hoster"
- __version__ = "0.73"
+ __version__ = "0.77"
__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)]
__description__ = """Zippyshare.com hoster plugin"""
__license__ = "GPLv3"
- __authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
+ __authors__ = [("Walter Purcaro", "vuolter@gmail.com"),
+ ("sebdelsol", "seb.morin@gmail.com")]
COOKIES = [("zippyshare.com", "ziplocale", "en")]
- NAME_PATTERN = r'("\d{6,}/"[ ]*\+.+?"/|<title>Zippyshare.com - )(?P<N>.+?)("|</title>)'
+ NAME_PATTERN = r'("/|<title>Zippyshare.com - )(?P<N>[^/]+?)("\);|</title>)'
SIZE_PATTERN = r'>Size:.+?">(?P<S>[\d.,]+) (?P<U>[\w^_]+)'
- OFFLINE_PATTERN = r'>File does not exist on this server'
+ OFFLINE_PATTERN = r'does not exist (anymore )?on this server<'
- LINK_PREMIUM_PATTERN = r'document.location = \'(.+?)\''
+ LINK_PREMIUM_PATTERN = r"document.location = '(.+?)'"
def setup(self):
@@ -46,17 +50,38 @@ class ZippyshareCom(SimpleHoster):
self.error(e)
else:
- self.link = '/'.join(("d", self.info['pattern']['KEY'], str(self.get_checksum()), self.pyfile.name))
+ self.link = self.get_link()
- def get_checksum(self):
- try:
- b1 = eval(re.search(r'\.omg = (.+?);', self.html).group(1))
- b2 = eval(re.search(r'\* \((.+?)\)', self.html).group(1))
- checksum = b1 * b2 + 18
+ def get_link(self):
+ # get all the scripts inside the html body
+ soup = BeautifulSoup(self.html)
+ scripts = (s.getText().strip() for s in soup.body.findAll('script', type='text/javascript'))
- except Exception:
- self.error(_("Unable to calculate checksum"))
+ # meant to be populated with the initialization of all the DOM elements found in the scripts
+ initScripts = set()
- else:
- return checksum
+ def replElementById(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
+
+ varName = re.sub(r'-', '', 'GVAR[%s+"_%s"]' %(id, attr))
+
+ realid = id.strip('"\'')
+ if id != realid: #id is not a variable, so look for realid.attr in the html
+ initValues = filter(None, [elt.get(attr, None) for elt in soup.findAll(id=realid)])
+ initValue = '"%s"' % initValues[-1] if initValues else 'null'
+ initScripts.add('%s = %s;' % (varName, initValue))
+
+ return varName
+
+ # handle all getElementById
+ reVar = r'document.getElementById\(([\'"\w-]+)\)(\.)?(getAttribute\([\'"])?(\w+)?([\'"]\))?'
+ scripts = [re.sub(reVar, replElementById, 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]
+
+ # get the file's url by evaluating all the scripts
+ scripts = ['var GVAR = {}'] + list(initScripts) + scripts + ['GVAR["dlbutton_href"]']
+ return self.js.eval('\n'.join(scripts))