summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/hoster')
-rw-r--r--pyload/plugins/hoster/AlldebridCom.py33
-rw-r--r--pyload/plugins/hoster/BasePlugin.py15
-rw-r--r--pyload/plugins/hoster/BayfilesCom.py4
-rw-r--r--pyload/plugins/hoster/BezvadataCz.py1
-rw-r--r--pyload/plugins/hoster/CzshareCom.py5
-rw-r--r--pyload/plugins/hoster/DebridItaliaCom.py16
-rw-r--r--pyload/plugins/hoster/DepositfilesCom.py7
-rw-r--r--pyload/plugins/hoster/DuploadOrg.py35
-rw-r--r--pyload/plugins/hoster/EgoFilesCom.py3
-rw-r--r--pyload/plugins/hoster/FastixRu.py28
-rw-r--r--pyload/plugins/hoster/FastshareCz.py39
-rw-r--r--pyload/plugins/hoster/FileApeCom.py5
-rw-r--r--pyload/plugins/hoster/FilesMailRu.py2
-rw-r--r--pyload/plugins/hoster/FreakshareCom.py4
-rw-r--r--pyload/plugins/hoster/HotfileCom.py1
-rw-r--r--pyload/plugins/hoster/Keep2shareCC.py11
-rw-r--r--pyload/plugins/hoster/MegasharesCom.py8
-rw-r--r--pyload/plugins/hoster/MovReelCom.py113
-rw-r--r--pyload/plugins/hoster/MultiDebridCom.py16
-rw-r--r--pyload/plugins/hoster/MultishareCz.py19
-rw-r--r--pyload/plugins/hoster/MyvideoDe.py3
-rw-r--r--pyload/plugins/hoster/NetloadIn.py17
-rw-r--r--pyload/plugins/hoster/NovafileCom.py14
-rw-r--r--pyload/plugins/hoster/NowDownloadEu.py22
-rw-r--r--pyload/plugins/hoster/PornhostCom.py4
-rw-r--r--pyload/plugins/hoster/Premium4Me.py9
-rw-r--r--pyload/plugins/hoster/PremiumizeMe.py17
-rw-r--r--pyload/plugins/hoster/PutlockerCom.py56
-rw-r--r--pyload/plugins/hoster/RPNetBiz.py76
-rw-r--r--pyload/plugins/hoster/RapidgatorNet.py4
-rw-r--r--pyload/plugins/hoster/RapidshareCom.py8
-rw-r--r--pyload/plugins/hoster/RealdebridCom.py32
-rw-r--r--pyload/plugins/hoster/RyushareCom.py10
-rw-r--r--pyload/plugins/hoster/ShareplaceCom.py4
-rw-r--r--pyload/plugins/hoster/ShragleCom.py1
-rw-r--r--pyload/plugins/hoster/SimplydebridCom.py5
-rw-r--r--pyload/plugins/hoster/SockshareCom.py33
-rw-r--r--pyload/plugins/hoster/TusfilesNet.py11
-rw-r--r--pyload/plugins/hoster/UnrestrictLi.py26
-rw-r--r--pyload/plugins/hoster/UploadedTo.py11
-rw-r--r--pyload/plugins/hoster/WebshareCz.py3
-rw-r--r--pyload/plugins/hoster/WuploadCom.py6
-rw-r--r--pyload/plugins/hoster/X7To.py11
-rw-r--r--pyload/plugins/hoster/XHamsterCom.py3
-rw-r--r--pyload/plugins/hoster/YoupornCom.py3
-rw-r--r--pyload/plugins/hoster/YourfilesTo.py4
-rw-r--r--pyload/plugins/hoster/YoutubeCom.py8
-rw-r--r--pyload/plugins/hoster/ZeveraCom.py5
-rw-r--r--pyload/plugins/hoster/ZippyshareCom.py11
49 files changed, 397 insertions, 385 deletions
diff --git a/pyload/plugins/hoster/AlldebridCom.py b/pyload/plugins/hoster/AlldebridCom.py
index af1b500ea..82f4531a6 100644
--- a/pyload/plugins/hoster/AlldebridCom.py
+++ b/pyload/plugins/hoster/AlldebridCom.py
@@ -3,20 +3,16 @@
import re
from urllib import unquote
from random import randrange
-from pyload.plugins.Hoster import Hoster
-from pyload.utils import parseFileSize, json_loads
+from module.plugins.Hoster import Hoster
+from module.common.json_layer import json_loads
+from module.utils import parseFileSize
class AlldebridCom(Hoster):
__name__ = "AlldebridCom"
- __version__ = "0.33"
+ __version__ = "0.34"
__type__ = "hoster"
- __config__ = [("activated", "bool", "Activated", "False"),
- ("https", "bool", "Enable HTTPS", "False"),
- ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to stanard download if download fails", "False"),
- ("interval", "int", "Reload interval in hours (0 to disable)", "24")]
+
__pattern__ = r"https?://.*alldebrid\..*"
__description__ = """Alldebrid.com hoster plugin"""
__author_name__ = ("Andy, Voigt")
@@ -27,24 +23,22 @@ class AlldebridCom(Hoster):
name = unquote(url.rsplit("/", 1)[1])
except IndexError:
name = "Unknown_Filename..."
- if name.endswith("..."): #incomplete filename, append random stuff
+ if name.endswith("..."): # incomplete filename, append random stuff
name += "%s.tmp" % randrange(100, 999)
return name
- def init(self):
- self.tries = 0
- self.chunkLimit = 3
+ def setup(self):
+ self.chunkLimit = 16
self.resumeDownload = True
def process(self, pyfile):
- if not self.account:
- self.logError(_("Please enter your %s account or deactivate this plugin") % "AllDebrid")
- self.fail("No AllDebrid account provided")
-
- self.logDebug("AllDebrid: Old URL: %s" % pyfile.url)
if re.match(self.__pattern__, pyfile.url):
new_url = pyfile.url
+ elif not self.account:
+ self.logError(_("Please enter your %s account or deactivate this plugin") % "AllDebrid")
+ self.fail("No AllDebrid account provided")
else:
+ self.logDebug("Old URL: %s" % pyfile.url)
password = self.getPassword().splitlines()
password = "" if not password else password[0]
@@ -71,7 +65,8 @@ class AlldebridCom(Hoster):
else:
new_url = new_url.replace("https://", "http://")
- self.logDebug("AllDebrid: New URL: %s" % new_url)
+ if new_url != pyfile.url:
+ self.logDebug("New URL: %s" % new_url)
if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown"):
#only use when name wasnt already set
diff --git a/pyload/plugins/hoster/BasePlugin.py b/pyload/plugins/hoster/BasePlugin.py
index b6d208f99..2bdfda7c4 100644
--- a/pyload/plugins/hoster/BasePlugin.py
+++ b/pyload/plugins/hoster/BasePlugin.py
@@ -14,7 +14,7 @@ class BasePlugin(Hoster):
__type__ = "hoster"
__pattern__ = r"^unmatchable$"
__version__ = "0.19"
- __description__ = """Base Plugin when any other didn't fit"""
+ __description__ = """Base Plugin when any other didnt fit"""
__author_name__ = ("RaNaN")
__author_mail__ = ("RaNaN@pyload.org")
@@ -30,14 +30,15 @@ class BasePlugin(Hoster):
self.multiDL = False
return
- #TODO: remove debug
- if pyfile.url.lower().startswith("debug"):
- self.decryptCaptcha("http://forum.pyload.org/lib/tpl/pyload/images/pyload-logo-edited3.5-new-font-small.png", imgtype="png")
- self.download("http://download.pyload.org/random100.bin")
- return
+ # self.__name__ = "NetloadIn"
+ # pyfile.name = "test"
+ # self.html = self.load("http://localhost:9000/short")
+ # self.download("http://localhost:9000/short")
+ # self.api = self.load("http://localhost:9000/short")
+ # self.decryptCaptcha("http://localhost:9000/captcha")
#
# if pyfile.url == "79":
- # self.core.api.addPackage("test", [str(i) for i in range(80)], 1)
+ # self.core.api.addPackage("test", [str(i) for i in range(80)], 1)
#
# return
if pyfile.url.startswith("http"):
diff --git a/pyload/plugins/hoster/BayfilesCom.py b/pyload/plugins/hoster/BayfilesCom.py
index bb1e78bb3..a696bac26 100644
--- a/pyload/plugins/hoster/BayfilesCom.py
+++ b/pyload/plugins/hoster/BayfilesCom.py
@@ -26,8 +26,8 @@ from module.common.json_layer import json_loads
class BayfilesCom(SimpleHoster):
__name__ = "BayfilesCom"
__type__ = "hoster"
- __pattern__ = r"http://(?:www\.)?bayfiles\.com/file/\w+/\w+/.*"
- __version__ = "0.04"
+ __pattern__ = r"http://(?:www\.)?bayfiles\.(?:com|net)/file/\w+/\w+/.*"
+ __version__ = "0.05"
__description__ = """Bayfiles.com plugin - free only"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
diff --git a/pyload/plugins/hoster/BezvadataCz.py b/pyload/plugins/hoster/BezvadataCz.py
index a4dfbdc44..daed65095 100644
--- a/pyload/plugins/hoster/BezvadataCz.py
+++ b/pyload/plugins/hoster/BezvadataCz.py
@@ -20,6 +20,7 @@ import re
from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+
class BezvadataCz(SimpleHoster):
__name__ = "BezvadataCz"
__type__ = "hoster"
diff --git a/pyload/plugins/hoster/CzshareCom.py b/pyload/plugins/hoster/CzshareCom.py
index fdfce6226..58573d329 100644
--- a/pyload/plugins/hoster/CzshareCom.py
+++ b/pyload/plugins/hoster/CzshareCom.py
@@ -47,10 +47,6 @@ class CzshareCom(SimpleHoster):
MULTIDL_PATTERN = r"<p><font color='red'>Z[^<]*PROFI.</font></p>"
USER_CREDIT_PATTERN = r'<div class="credit">\s*kredit: <strong>([0-9., ]+)([kKMG]i?B)</strong>\s*</div><!-- .credit -->'
- def setup(self):
- self.multiDL = self.resumeDownload = self.premium
- self.chunkLimit = 1
-
def checkTrafficLeft(self):
# check if user logged in
found = re.search(self.USER_CREDIT_PATTERN, self.html)
@@ -136,7 +132,6 @@ class CzshareCom(SimpleHoster):
url = "http://%s/download.php?%s" % (found.group(1), found.group(2))
self.wait()
- self.multiDL = True
self.download(url)
self.checkDownloadedFile()
diff --git a/pyload/plugins/hoster/DebridItaliaCom.py b/pyload/plugins/hoster/DebridItaliaCom.py
index 5af69a3ab..ebea0ac13 100644
--- a/pyload/plugins/hoster/DebridItaliaCom.py
+++ b/pyload/plugins/hoster/DebridItaliaCom.py
@@ -22,7 +22,7 @@ from pyload.plugins.Hoster import Hoster
class DebridItaliaCom(Hoster):
__name__ = "DebridItaliaCom"
- __version__ = "0.04"
+ __version__ = "0.05"
__type__ = "hoster"
__config__ = [("activated", "bool", "Activated", "False"),
("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
@@ -34,19 +34,18 @@ class DebridItaliaCom(Hoster):
__author_name__ = ("stickell")
__author_mail__ = ("l.stickell@yahoo.it")
- def init(self):
+ def setup(self):
self.chunkLimit = -1
self.resumeDownload = True
def process(self, pyfile):
- if not self.account:
- self.logError(_("Please enter your %s account or deactivate this plugin") % "DebridItalia")
- self.fail("No DebridItalia account provided")
-
- self.logDebug("Old URL: %s" % pyfile.url)
if re.match(self.__pattern__, pyfile.url):
new_url = pyfile.url
+ elif not self.account:
+ self.logError(_("Please enter your %s account or deactivate this plugin") % "DebridItalia")
+ self.fail("No DebridItalia account provided")
else:
+ self.logDebug("Old URL: %s" % pyfile.url)
url = "http://debriditalia.com/linkgen2.php?xjxfun=convertiLink&xjxargs[]=S<![CDATA[%s]]>" % pyfile.url
page = self.load(url)
self.logDebug("XML data: %s" % page)
@@ -56,7 +55,8 @@ class DebridItaliaCom(Hoster):
else:
new_url = re.search(r'<a href="(?:[^"]+)">(?P<direct>[^<]+)</a>', page).group('direct')
- self.logDebug("New URL: %s" % new_url)
+ if new_url != pyfile.url:
+ self.logDebug("New URL: %s" % new_url)
self.download(new_url, disposition=True)
diff --git a/pyload/plugins/hoster/DepositfilesCom.py b/pyload/plugins/hoster/DepositfilesCom.py
index 7a84fdb25..99c0d13a1 100644
--- a/pyload/plugins/hoster/DepositfilesCom.py
+++ b/pyload/plugins/hoster/DepositfilesCom.py
@@ -10,7 +10,7 @@ from module.plugins.internal.CaptchaService import ReCaptcha
class DepositfilesCom(SimpleHoster):
__name__ = "DepositfilesCom"
__type__ = "hoster"
- __pattern__ = r"http://[\w\.]*?(depositfiles\.com|dfiles\.eu)(/\w{1,3})?/files/[\w]+"
+ __pattern__ = r"https?://[\w\.]*?(depositfiles\.com|dfiles\.eu)(/\w{1,3})?/files/[\w]+"
__version__ = "0.45"
__description__ = """Depositfiles.com Download Hoster"""
__author_name__ = ("spoob", "zoidberg")
@@ -26,10 +26,6 @@ class DepositfilesCom(SimpleHoster):
RECAPTCHA_PATTERN = r"Recaptcha.create\('([^']+)'"
DOWNLOAD_LINK_PATTERN = r'<form id="downloader_file_form" action="(http://.+?\.(dfiles\.eu|depositfiles\.com)/.+?)" method="post"'
- def setup(self):
- self.multiDL = False
- self.resumeDownload = self.premium
-
def handleFree(self):
self.html = self.load(self.pyfile.url, post={"gateway_result": "1"}, cookies=True)
if re.search(self.FILE_OFFLINE_PATTERN, self.html):
@@ -113,7 +109,6 @@ class DepositfilesCom(SimpleHoster):
self.retry()
link = unquote(
re.search('<div id="download_url">\s*<a href="(http://.+?\.depositfiles.com/.+?)"', self.html).group(1))
- self.multiDL = True
self.download(link, disposition=True)
diff --git a/pyload/plugins/hoster/DuploadOrg.py b/pyload/plugins/hoster/DuploadOrg.py
new file mode 100644
index 000000000..6ee2bcc7b
--- /dev/null
+++ b/pyload/plugins/hoster/DuploadOrg.py
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+
+############################################################################
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU Affero General Public License as #
+# published by the Free Software Foundation, either version 3 of the #
+# License, or (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU Affero General Public License for more details. #
+# #
+# You should have received a copy of the GNU Affero General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+############################################################################
+
+from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo
+
+
+class DuploadOrg(XFileSharingPro):
+ __name__ = "DuploadOrg"
+ __type__ = "hoster"
+ __pattern__ = r"http://(www\.)?dupload\.org/\w{12}"
+ __version__ = "0.01"
+ __description__ = """Dupload.grg hoster plugin"""
+ __author_name__ = ("stickell")
+ __author_mail__ = ("l.stickell@yahoo.it")
+
+ HOSTER_NAME = "dupload.org"
+
+ FILE_INFO_PATTERN = r'<h3[^>]*>(?P<N>.+) \((?P<S>[\d.]+) (?P<U>\w+)\)</h3>'
+
+
+getInfo = create_getInfo(DuploadOrg)
diff --git a/pyload/plugins/hoster/EgoFilesCom.py b/pyload/plugins/hoster/EgoFilesCom.py
index 274286cf1..22ca99931 100644
--- a/pyload/plugins/hoster/EgoFilesCom.py
+++ b/pyload/plugins/hoster/EgoFilesCom.py
@@ -39,8 +39,7 @@ class EgoFilesCom(SimpleHoster):
DIRECT_LINK_PATTERN = r'<a href="(?P<link>[^"]+)">Download ></a>'
RECAPTCHA_KEY = '6LeXatQSAAAAAHezcjXyWAni-4t302TeYe7_gfvX'
- def init(self):
- self.file_info = {}
+ def setup(self):
# Set English language
self.load("https://egofiles.com/ajax/lang.php?lang=en", just_header=True)
diff --git a/pyload/plugins/hoster/FastixRu.py b/pyload/plugins/hoster/FastixRu.py
index db3302579..8805081c9 100644
--- a/pyload/plugins/hoster/FastixRu.py
+++ b/pyload/plugins/hoster/FastixRu.py
@@ -3,21 +3,17 @@
import re
from urllib import unquote
from random import randrange
-from pyload.plugins.Hoster import Hoster
-from pyload.utils import json_loads
+from module.plugins.Hoster import Hoster
+from module.common.json_layer import json_loads
class FastixRu(Hoster):
__name__ = "FastixRu"
- __version__ = "0.02"
+ __version__ = "0.04"
__type__ = "hoster"
- __config__ = [("activated", "bool", "Activated", "False"),
- ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("unloadFailing", "bool", "Revert to standard download if download fails", "False"),
- ("interval", "int", "Reload interval in hours (0 to disable)", "24")]
- __pattern__ = r"http?://.*fastix.ru\..*"
+ __pattern__ = r"http://(?:www\.)?fastix\.(ru|it)/file/(?P<ID>[a-zA-Z0-9]{24})"
__description__ = """Fastix hoster plugin"""
- __author_name__ = ("Massimo, Rosamilia")
+ __author_name__ = ("Massimo Rosamilia")
__author_mail__ = ("max@spiritix.eu")
def getFilename(self, url):
@@ -29,19 +25,18 @@ class FastixRu(Hoster):
name += "%s.tmp" % randrange(100, 999)
return name
- def init(self):
+ def setup(self):
self.chunkLimit = 3
self.resumeDownload = True
def process(self, pyfile):
- if not self.account:
- self.logError(_("Please enter your %s account or deactivate this plugin") % "Fastix")
- self.fail("No Fastix account provided")
-
- self.logDebug("Old URL: %s" % pyfile.url)
if re.match(self.__pattern__, pyfile.url):
new_url = pyfile.url
+ elif not self.account:
+ self.logError(_("Please enter your %s account or deactivate this plugin") % "Fastix")
+ self.fail("No Fastix account provided")
else:
+ self.logDebug("Old URL: %s" % pyfile.url)
api_key = self.account.getAccountData(self.user)
api_key = api_key["api"]
url = "http://fastix.ru/api_v2/?apikey=%s&sub=getdirectlink&link=%s" % (api_key, pyfile.url)
@@ -53,7 +48,8 @@ class FastixRu(Hoster):
else:
new_url = data["downloadlink"]
- self.logDebug("New URL: %s" % new_url)
+ if new_url != pyfile.url:
+ self.logDebug("New URL: %s" % new_url)
if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown"):
#only use when name wasnt already set
diff --git a/pyload/plugins/hoster/FastshareCz.py b/pyload/plugins/hoster/FastshareCz.py
index 47ecda65a..3e33d0fd9 100644
--- a/pyload/plugins/hoster/FastshareCz.py
+++ b/pyload/plugins/hoster/FastshareCz.py
@@ -20,58 +20,47 @@
# http://www.fastshare.cz/2141189/random.bin
import re
-from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, replace_patterns
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FastshareCz(SimpleHoster):
__name__ = "FastshareCz"
__type__ = "hoster"
__pattern__ = r"http://(?:\w*\.)?fastshare.cz/\d+/.+"
- __version__ = "0.16"
+ __version__ = "0.20"
__description__ = """FastShare.cz"""
__author_name__ = ("zoidberg", "stickell")
FILE_INFO_PATTERN = r'<h1 class="dwp">(?P<N>[^<]+)</h1>\s*<div class="fileinfo">\s*(?:Velikost|Size)\s*: (?P<S>[^,]+),'
- FILE_OFFLINE_PATTERN = ur'<td align=center>Tento soubor byl smazán'
+ FILE_OFFLINE_PATTERN = 'The file ?has been deleted'
FILE_URL_REPLACEMENTS = [('#.*', '')]
+ SH_COOKIES = [('fastshare.cz', 'lang', 'en')]
FREE_URL_PATTERN = r'action=(/free/.*?)>\s*<img src="([^"]*)"><br'
PREMIUM_URL_PATTERN = r'(http://data\d+\.fastshare\.cz/download\.php\?id=\d+\&[^\s\"\'<>]+)'
NOT_ENOUGH_CREDIC_PATTERN = "Nem.te dostate.n. kredit pro sta.en. tohoto souboru"
- def process(self, pyfile):
- pyfile.url = replace_patterns(pyfile.url, self.FILE_URL_REPLACEMENTS)
- self.req.setOption("timeout", 120)
- if self.premium and (not self.SH_CHECK_TRAFFIC or self.checkTrafficLeft()):
- self.handlePremium()
- else:
- self.html = self.load(pyfile.url, decode=not self.SH_BROKEN_ENCODING, cookies=self.SH_COOKIES)
- self.getFileInfo()
- self.handleFree()
-
def handleFree(self):
- if u">100% FREE slotů je plných.<" in self.html:
- self.setWait(60, False)
- self.wait()
- self.retry(120, "No free slots")
+ if '100% of FREE slots are full' in self.html:
+ self.retry(120, 60, "No free slots")
found = re.search(self.FREE_URL_PATTERN, self.html)
if not found:
self.parseError("Free URL")
action, captcha_src = found.groups()
- captcha = self.decryptCaptcha("http://www.fastshare.cz/" + captcha_src)
- self.download("http://www.fastshare.cz/" + action, post={"code": captcha, "submit": u"stáhnout"})
+ captcha = self.decryptCaptcha("http://www.fastshare.cz" + captcha_src)
+ self.download("http://www.fastshare.cz" + action, post={"code": captcha, "btn.x": 77, "btn.y": 18})
check = self.checkDownload({
"paralell_dl":
- "<title>FastShare.cz</title>|<script>alert\('Pres FREE muzete stahovat jen jeden soubor najednou.'\)"
+ "<title>FastShare.cz</title>|<script>alert\('Pres FREE muzete stahovat jen jeden soubor najednou.'\)",
+ "wrong_captcha": "Download for FREE"
})
- self.logDebug(self.req.lastEffectiveURL, self.req.lastURL, self.req.code)
if check == "paralell_dl":
- self.setWait(600, True)
- self.wait()
- self.retry(6, "Paralell download")
+ self.retry(6, 600, "Paralell download")
+ elif check == "wrong_captcha":
+ self.retry(5, 1, "Wrong captcha")
def handlePremium(self):
header = self.load(self.pyfile.url, just_header=True)
@@ -90,7 +79,7 @@ class FastshareCz(SimpleHoster):
url = found.group(1)
self.logDebug("PREMIUM URL: %s" % url)
- self.download(url)
+ self.download(url, disposition=True)
check = self.checkDownload({"credit": re.compile(self.NOT_ENOUGH_CREDIC_PATTERN)})
if check == "credit":
diff --git a/pyload/plugins/hoster/FileApeCom.py b/pyload/plugins/hoster/FileApeCom.py
index 2ba01f3a0..f07fbfc8a 100644
--- a/pyload/plugins/hoster/FileApeCom.py
+++ b/pyload/plugins/hoster/FileApeCom.py
@@ -16,7 +16,6 @@ class FileApeCom(Hoster):
def setup(self):
self.multiDL = False
- self.html = None
def process(self, pyfile):
self.pyfile = pyfile
@@ -46,8 +45,8 @@ class FileApeCom(Hoster):
self.wait()
self.html = self.load(continuePage)
- linkMatch = \
- re.search(r"<div style=\"text-align:center; font-size: 30px;\"><a href=\"(http://.*?)\"", self.html)
+ linkMatch = re.search(r"<div style=\"text-align:center; font-size: 30px;\"><a href=\"(http://.*?)\"", self.html)
+
if not linkMatch:
linkMatch = re.search(r"\"(http://tx\d+\.fileape\.com/[a-z]+/.*?)\"", self.html)
if linkMatch:
diff --git a/pyload/plugins/hoster/FilesMailRu.py b/pyload/plugins/hoster/FilesMailRu.py
index 6ce3a9e01..2b87c309e 100644
--- a/pyload/plugins/hoster/FilesMailRu.py
+++ b/pyload/plugins/hoster/FilesMailRu.py
@@ -6,6 +6,7 @@ from module.plugins.Hoster import Hoster, chunks
from module.network.RequestFactory import getURL
+
def getInfo(urls):
result = []
for chunk in chunks(urls, 10):
@@ -40,7 +41,6 @@ class FilesMailRu(Hoster):
def setup(self):
if not self.account:
self.multiDL = False
- self.chunkLimit = 1
def process(self, pyfile):
self.html = self.load(pyfile.url)
diff --git a/pyload/plugins/hoster/FreakshareCom.py b/pyload/plugins/hoster/FreakshareCom.py
index 5a42d1a47..cb84a468a 100644
--- a/pyload/plugins/hoster/FreakshareCom.py
+++ b/pyload/plugins/hoster/FreakshareCom.py
@@ -165,7 +165,7 @@ class FreakshareCom(Hoster):
if challenge:
re_captcha = ReCaptcha(self)
- request_options["recaptcha_challenge_field"], request_options["recaptcha_response_field"] \
- = re_captcha.challenge(challenge.group(1))
+ (request_options["recaptcha_challenge_field"],
+ request_options["recaptcha_response_field"]) = re_captcha.challenge(challenge.group(1))
return request_options
diff --git a/pyload/plugins/hoster/HotfileCom.py b/pyload/plugins/hoster/HotfileCom.py
index a7a46e03b..255acad33 100644
--- a/pyload/plugins/hoster/HotfileCom.py
+++ b/pyload/plugins/hoster/HotfileCom.py
@@ -9,6 +9,7 @@ from module.network.RequestFactory import getURL
from module.utils import chunks
+
def getInfo(urls):
api_url_base = "http://api.hotfile.com/"
diff --git a/pyload/plugins/hoster/Keep2shareCC.py b/pyload/plugins/hoster/Keep2shareCC.py
index 5e4f5f540..d2a13e35b 100644
--- a/pyload/plugins/hoster/Keep2shareCC.py
+++ b/pyload/plugins/hoster/Keep2shareCC.py
@@ -15,6 +15,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
############################################################################
+# Test links (random.bin):
+# http://k2s.cc/file/527111edfb9ba/random.bin
+
import re
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
@@ -24,8 +27,8 @@ from module.plugins.internal.CaptchaService import ReCaptcha
class Keep2shareCC(SimpleHoster):
__name__ = "Keep2shareCC"
__type__ = "hoster"
- __pattern__ = r"http://(?:www\.)?keep2share\.cc/file/\w+"
- __version__ = "0.03"
+ __pattern__ = r"https?://(?:www\.)?(keep2share|k2s|keep2s)\.cc/file/(?P<ID>[a-zA-Z0-9]{13})"
+ __version__ = "0.05"
__description__ = """Keep2share.cc hoster plugin"""
__author_name__ = ("stickell")
__author_mail__ = ("l.stickell@yahoo.it")
@@ -39,6 +42,8 @@ class Keep2shareCC(SimpleHoster):
RECAPTCHA_KEY = '6LcYcN0SAAAAABtMlxKj7X0hRxOY8_2U86kI1vbb'
+ FILE_URL_REPLACEMENTS = [(__pattern__, r"http://www.keep2share.cc/file/\g<ID>")]
+
def handleFree(self):
fid = re.search(r'<input type="hidden" name="slow_id" value="([^"]+)">', self.html).group(1)
self.html = self.load(self.pyfile.url, post={'yt0': '', 'slow_id': fid})
@@ -46,7 +51,7 @@ class Keep2shareCC(SimpleHoster):
m = re.search(self.WAIT_PATTERN, self.html)
if m:
wait_string = m.group(1)
- wait_time = int(wait_string[0:2]) * 3600 + int(wait_string[3:5]) * 60 + int(wait_string[6:8])
+ wait_time = int(wait_string[0:2]) * 60 * 60 + int(wait_string[3:5]) * 60 + int(wait_string[6:8])
self.setWait(wait_time, True)
self.wait()
self.process(self.pyfile)
diff --git a/pyload/plugins/hoster/MegasharesCom.py b/pyload/plugins/hoster/MegasharesCom.py
index 4e43d4a00..26cf8ab8e 100644
--- a/pyload/plugins/hoster/MegasharesCom.py
+++ b/pyload/plugins/hoster/MegasharesCom.py
@@ -25,7 +25,7 @@ class MegasharesCom(SimpleHoster):
__name__ = "MegasharesCom"
__type__ = "hoster"
__pattern__ = r"http://(\w+\.)?megashares.com/.*"
- __version__ = "0.23"
+ __version__ = "0.24"
__description__ = """megashares.com plugin - free only"""
__author_name__ = ("zoidberg")
__author_mail__ = ("zoidberg@mujmail.cz")
@@ -70,9 +70,9 @@ class MegasharesCom(SimpleHoster):
"http://d01.megashares.com/index.php?secgfx=gfx&random_num=%s" % random_num)
self.logInfo("Reactivating passport %s: %s %s" % (passport_num, random_num, verifyinput))
- url = "http://d01.megashares.com%s&rs=check_passport_renewal" % request_uri + \
- "&rsargs[]=%s&rsargs[]=%s&rsargs[]=%s" % (verifyinput, random_num, passport_num) + \
- "&rsargs[]=replace_sec_pprenewal&rsrnd=%s" % str(int(time() * 1000))
+ url = ("http://d01.megashares.com%s&rs=check_passport_renewal" % request_uri +
+ "&rsargs[]=%s&rsargs[]=%s&rsargs[]=%s" % (verifyinput, random_num, passport_num) +
+ "&rsargs[]=replace_sec_pprenewal&rsrnd=%s" % str(int(time() * 1000)))
self.logDebug(url)
response = self.load(url)
diff --git a/pyload/plugins/hoster/MovReelCom.py b/pyload/plugins/hoster/MovReelCom.py
index 2fbff66a6..5d8754ee7 100644
--- a/pyload/plugins/hoster/MovReelCom.py
+++ b/pyload/plugins/hoster/MovReelCom.py
@@ -1,110 +1,23 @@
# -*- coding: utf-8 -*-
-import re
-from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-from module.utils import html_unescape
-from module.network.RequestFactory import getURL
+#import re
+from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo
+#from pycurl import FOLLOWLOCATION, LOW_SPEED_TIME
-
-class MovReelCom(SimpleHoster):
+class MovReelCom(XFileSharingPro):
__name__ = "MovReelCom"
__type__ = "hoster"
__pattern__ = r"http://movreel.com/.*"
- __version__ = "1.00"
+ __version__ = "1.20"
__description__ = """MovReel.com hoster plugin"""
__author_name__ = ("JorisV83")
__author_mail__ = ("jorisv83-pyload@yahoo.com")
- FILE_INFO_PATTERN = r'You have requested <font color="red">http://movreel.com/.*/(?P<N>.+?)</font>.*\((?P<S>[\d.]+) (?P<U>..)\)</font>'
- FILE_OFFLINE_PATTERN = r'<b>File Not Found</b>'
-
- def setup(self):
- self.resumeDownload = True
- self.multiDL = False
-
- def handleFree(self):
-
- # Define search patterns
- op_pattern = '<input type="hidden" name="op" value="(.*)">'
- id_pattern = '<input type="hidden" name="id" value="(.*)">'
- fn_pattern = '<input type="hidden" name="fname" value="(.*)">'
- re_pattern = '<input type="hidden" name="referer" value="(.*)">'
- ul_pattern = '<input type="hidden" name="usr_login" value="(.*)">'
- rand_pattern = '<input type="hidden" name="rand" value="(.*)">'
- link_pattern = "var file_link = '(.*)';"
- downlimit_pattern = '<br><p class="err">You have reached the download-limit: .*</p>'
-
- # Get HTML source
- self.logDebug("Getting first HTML source")
- html = self.load(self.pyfile.url)
- self.logDebug(" > Done")
-
- op_val = re.search(op_pattern, html).group(1)
- id_val = re.search(id_pattern, html).group(1)
- fn_val = re.search(fn_pattern, html).group(1)
- re_val = re.search(re_pattern, html).group(1)
- ul_val = re.search(ul_pattern, html).group(1)
-
- # Debug values
- self.logDebug(" > Op " + op_val)
- self.logDebug(" > Id " + id_val)
- self.logDebug(" > Fname " + fn_val)
- self.logDebug(" > Referer " + re_val)
- self.logDebug(" > User Login " + ul_val)
-
- # Create post data
- post_data = {"op": op_val, "usr_login": ul_val, "id": id_val, "fname": fn_val, "referer": re_val,
- "method_free": "+Free+Download"}
-
- # Post and get new HTML source
- self.logDebug("Getting second HTML source")
- html = self.load(self.pyfile.url, post=post_data, decode=True)
- self.logDebug(" > Done")
-
- # Check download limit
- if re.search(downlimit_pattern, html) is not None:
- self.retry(3, 7200, "Download limit reached, wait 2h")
-
- # Retrieve data
- if re.search(op_pattern, html) is not None:
- op_val = re.search(op_pattern, html).group(1)
- else:
- self.retry(3, 10, "Second html: no op found!!")
-
- if re.search(id_pattern, html) is not None:
- id_val = re.search(id_pattern, html).group(1)
- else:
- self.retry(3, 10, "Second html: no id found!!")
-
- if re.search(rand_pattern, html) is not None:
- rand_val = re.search(rand_pattern, html).group(1)
- else:
- self.retry(3, 10, "Second html: no rand found!!")
-
- re_val = self.pyfile.url
-
- # Debug values
- self.logDebug(" > Op " + op_val)
- self.logDebug(" > Id " + id_val)
- self.logDebug(" > Rand " + rand_val)
- self.logDebug(" > Referer " + re_val)
-
- # Create post data
- post_data = {"op": op_val, "id": id_val, "rand": rand_val, "referer": re_val, "method_free": "+Free+Download",
- "method_premium": "", "down_direct": "1"}
-
- # Post and get new HTML source
- self.logDebug("Getting third HTML source")
- html = self.load(self.pyfile.url, post=post_data, decode=True)
- self.logDebug(" > Done")
-
- # Get link value
- if re.search(link_pattern, html) is not None:
- link_val = re.search(link_pattern, html).group(1)
- self.logDebug(" > Link " + link_val)
- self.download(link_val)
- else:
- self.logDebug("No link found!!")
- self.retry(3, 10, "No link found!!")
-
-
+ #FILE_NAME_PATTERN = r'<b>Filename:</b>(?P<N>.*?)<br>'
+ #FILE_SIZE_PATTERN = r'<b>Size:</b>(?P<S>.*?)<br>'
+ FILE_INFO_PATTERN = r'<h3>(?P<N>.+?) <small><sup>(?P<S>[\d.]+) (?P<U>..)</sup> </small></h3>'
+ FILE_OFFLINE_PATTERN = r'<b>File Not Found</b><br><br>'
+ DIRECT_LINK_PATTERN = r'<a href="(http://[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/.*)">Download Link</a>'
+ #OVR_DOWNLOAD_LINK_PATTERN = "var file_link = '(.*)';"
+ HOSTER_NAME = "movreel.com"
+
getInfo = create_getInfo(MovReelCom)
diff --git a/pyload/plugins/hoster/MultiDebridCom.py b/pyload/plugins/hoster/MultiDebridCom.py
index 92517f5a8..e38a16cbb 100644
--- a/pyload/plugins/hoster/MultiDebridCom.py
+++ b/pyload/plugins/hoster/MultiDebridCom.py
@@ -23,7 +23,7 @@ from pyload.utils import json_loads
class MultiDebridCom(Hoster):
__name__ = "MultiDebridCom"
- __version__ = "0.02"
+ __version__ = "0.03"
__type__ = "hoster"
__config__ = [("activated", "bool", "Activated", "False"),
("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
@@ -35,19 +35,18 @@ class MultiDebridCom(Hoster):
__author_name__ = ("stickell")
__author_mail__ = ("l.stickell@yahoo.it")
- def init(self):
+ def setup(self):
self.chunkLimit = -1
self.resumeDownload = True
def process(self, pyfile):
- if not self.account:
- self.logError(_("Please enter your %s account or deactivate this plugin") % "Multi-debrid.com")
- self.fail("No Multi-debrid.com account provided")
-
- self.logDebug("Original URL: %s" % pyfile.url)
if re.match(self.__pattern__, pyfile.url):
new_url = pyfile.url
+ elif not self.account:
+ self.logError(_("Please enter your %s account or deactivate this plugin") % "Multi-debrid.com")
+ self.fail("No Multi-debrid.com account provided")
else:
+ self.logDebug("Original URL: %s" % pyfile.url)
page = self.req.load('http://multi-debrid.com/api.php',
get={'user': self.user, 'pass': self.account.getAccountData(self.user)['password'],
'link': pyfile.url})
@@ -57,6 +56,7 @@ class MultiDebridCom(Hoster):
self.fail('Unable to unrestrict link')
new_url = page['link']
- self.logDebug("Unrestricted URL: " + new_url)
+ if new_url != pyfile.url:
+ self.logDebug("Unrestricted URL: " + new_url)
self.download(new_url, disposition=True)
diff --git a/pyload/plugins/hoster/MultishareCz.py b/pyload/plugins/hoster/MultishareCz.py
index 38acc9842..f9289a923 100644
--- a/pyload/plugins/hoster/MultishareCz.py
+++ b/pyload/plugins/hoster/MultishareCz.py
@@ -18,17 +18,14 @@
import re
from random import random
-from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
+from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class MultishareCz(SimpleHoster):
__name__ = "MultishareCz"
__type__ = "hoster"
- __config__ = [("activated", "bool", "Activated", "False"),
- ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", "uloz.to")]
__pattern__ = r"http://(?:\w*\.)?multishare.cz/stahnout/(?P<ID>\d+).*"
- __version__ = "0.41"
+ __version__ = "0.34"
__description__ = """MultiShare.cz"""
__author_name__ = ("zoidberg")
@@ -54,12 +51,11 @@ class MultishareCz(SimpleHoster):
self.download("http://www.multishare.cz/html/download_free.php?ID=%s" % self.fileID)
def handlePremium(self):
- if not self.checkTrafficLeft():
+ if not self.checkCredit():
self.logWarning("Not enough credit left to download file")
self.resetAccount()
self.download("http://www.multishare.cz/html/download_premium.php?ID=%s" % self.fileID)
- self.checkTrafficLeft()
def handleOverriden(self):
if not self.premium:
@@ -68,14 +64,19 @@ class MultishareCz(SimpleHoster):
self.html = self.load('http://www.multishare.cz/html/mms_ajax.php', post={"link": self.pyfile.url}, decode=True)
self.getFileInfo()
- if not self.checkTrafficLeft():
+ if not self.checkCredit():
self.fail("Not enough credit left to download file")
url = "http://dl%d.mms.multishare.cz/html/mms_process.php" % round(random() * 10000 * random())
params = {"u_ID": self.acc_info["u_ID"], "u_hash": self.acc_info["u_hash"], "link": self.pyfile.url}
self.logDebug(url, params)
self.download(url, get=params)
- self.checkTrafficLeft()
+
+ def checkCredit(self):
+ self.acc_info = self.account.getAccountInfo(self.user, True)
+ self.logInfo("User %s has %i MB left" % (self.user, self.acc_info["trafficleft"] / 1024))
+
+ return self.pyfile.size / 1024 <= self.acc_info["trafficleft"]
getInfo = create_getInfo(MultishareCz)
diff --git a/pyload/plugins/hoster/MyvideoDe.py b/pyload/plugins/hoster/MyvideoDe.py
index e32fee5c8..1bd73e376 100644
--- a/pyload/plugins/hoster/MyvideoDe.py
+++ b/pyload/plugins/hoster/MyvideoDe.py
@@ -14,9 +14,6 @@ class MyvideoDe(Hoster):
__author_name__ = ("spoob")
__author_mail__ = ("spoob@pyload.org")
- def setup(self):
- self.html = None
-
def process(self, pyfile):
self.pyfile = pyfile
self.download_html()
diff --git a/pyload/plugins/hoster/NetloadIn.py b/pyload/plugins/hoster/NetloadIn.py
index 773f2e427..71c8dd4f2 100644
--- a/pyload/plugins/hoster/NetloadIn.py
+++ b/pyload/plugins/hoster/NetloadIn.py
@@ -4,10 +4,9 @@
import re
from time import sleep, time
-
from module.plugins.Hoster import Hoster
from module.network.RequestFactory import getURL
-from module.utils import chunks
+from module.plugins.Plugin import chunks
def getInfo(urls):
@@ -54,16 +53,13 @@ class NetloadIn(Hoster):
__name__ = "NetloadIn"
__type__ = "hoster"
__pattern__ = r"https?://.*netload\.in/(?:datei(.*?)(?:\.htm|/)|index.php?id=10&file_id=)"
- __version__ = "0.44"
+ __version__ = "0.45"
__description__ = """Netload.in Download Hoster"""
__author_name__ = ("spoob", "RaNaN", "Gregy")
__author_mail__ = ("spoob@pyload.org", "ranan@pyload.org", "gregy@gregy.cz")
def setup(self):
- self.multiDL = False
- if self.premium:
- self.multiDL = self.resumeDownload = True
- self.chunkLimit = -1
+ self.multiDL = self.resumeDownload = self.premium
def process(self, pyfile):
self.url = pyfile.url
@@ -79,7 +75,12 @@ class NetloadIn(Hoster):
if self.premium:
self.logDebug("Netload: Use Premium Account")
- return True
+ settings = self.load("http://www.netload.in/index.php?id=2&lang=en")
+ if '<option value="2" selected="selected">Direkter Download' in settings:
+ self.logDebug("Using direct download")
+ return True
+ else:
+ self.logDebug("Direct downloads not enabled. Parsing html for a download URL")
if self.download_html():
return True
diff --git a/pyload/plugins/hoster/NovafileCom.py b/pyload/plugins/hoster/NovafileCom.py
index 6457734e5..599ec5f7d 100644
--- a/pyload/plugins/hoster/NovafileCom.py
+++ b/pyload/plugins/hoster/NovafileCom.py
@@ -1,4 +1,9 @@
# -*- coding: utf-8 -*-
+
+# Test links (random.bin):
+# http://novafile.com/vfun4z6o2cit
+# http://novafile.com/s6zrr5wemuz4
+
from module.plugins.hoster.XFileSharingPro import XFileSharingPro, create_getInfo
@@ -6,16 +11,15 @@ class NovafileCom(XFileSharingPro):
__name__ = "NovafileCom"
__type__ = "hoster"
__pattern__ = r"http://(?:\w*\.)*novafile\.com/\w{12}"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """novafile.com hoster plugin"""
- __author_name__ = ("zoidberg")
- __author_mail__ = ("zoidberg@mujmail.cz")
+ __author_name__ = ("zoidberg", "stickell")
+ __author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it")
FILE_SIZE_PATTERN = r'<div class="size">(?P<S>.+?)</div>'
- #FILE_OFFLINE_PATTERN = '<b>&quot;File Not Found&quot;</b>|File has been removed due to Copyright Claim'
- FORM_PATTERN = r'name="F\d+"'
ERROR_PATTERN = r'class="alert[^"]*alert-separate"[^>]*>\s*(?:<p>)?(.*?)\s*</'
DIRECT_LINK_PATTERN = r'<a href="(http://s\d+\.novafile\.com/.*?)" class="btn btn-green">Download File</a>'
+ WAIT_PATTERN = r'<p>Please wait <span id="count"[^>]*>(\d+)</span> seconds</p>'
HOSTER_NAME = "novafile.com"
diff --git a/pyload/plugins/hoster/NowDownloadEu.py b/pyload/plugins/hoster/NowDownloadEu.py
index f1cace73b..b5e6b6493 100644
--- a/pyload/plugins/hoster/NowDownloadEu.py
+++ b/pyload/plugins/hoster/NowDownloadEu.py
@@ -24,16 +24,18 @@ from module.utils import fixup
class NowDownloadEu(SimpleHoster):
__name__ = "NowDownloadEu"
__type__ = "hoster"
- __pattern__ = r"http://(www\.)?nowdownload\.(eu|co)/dl/(?P<ID>[a-z0-9]+)"
- __version__ = "0.02"
- __description__ = """NowDownloadEu"""
- __author_name__ = ("godofdream")
+ __pattern__ = r"http://(?:www\.)?nowdownload\.(ch|eu|co)/(dl/|download\.php\?id=)(?P<ID>[a-z0-9]+)"
+ __version__ = "0.03"
+ __description__ = """NowDownloadCh"""
+ __author_name__ = ("godofdream", "Walter Purcaro")
+ __author_mail__ = ("", "vuolter@gmail.com")
+
FILE_INFO_PATTERN = r'Downloading</span> <br> (?P<N>.*) (?P<S>[0-9,.]+) (?P<U>[kKMG])i?B </h4>'
FILE_OFFLINE_PATTERN = r'(This file does not exist!)'
FILE_TOKEN_PATTERN = r'"(/api/token\.php\?token=[a-z0-9]+)"'
FILE_CONTINUE_PATTERN = r'"(/dl2/[a-z0-9]+/[a-z0-9]+)"'
FILE_WAIT_PATTERN = r'\.countdown\(\{until: \+(\d+),'
- FILE_DOWNLOAD_LINK = r'"(http://f\d+\.nowdownload\.eu/dl/[a-z0-9]+/[a-z0-9]+/[^<>"]*?)"'
+ FILE_DOWNLOAD_LINK = r'"(http://f\d+\.nowdownload\.ch/dl/[a-z0-9]+/[a-z0-9]+/[^<>"]*?)"'
FILE_NAME_REPLACEMENTS = [("&#?\w+;", fixup), (r'<[^>]*>', '')]
@@ -45,19 +47,21 @@ class NowDownloadEu(SimpleHoster):
def handleFree(self):
tokenlink = re.search(self.FILE_TOKEN_PATTERN, self.html)
continuelink = re.search(self.FILE_CONTINUE_PATTERN, self.html)
- if (not tokenlink) or (not continuelink):
+ if not tokenlink or not continuelink:
self.fail('Plugin out of Date')
- wait = 60
found = re.search(self.FILE_WAIT_PATTERN, self.html)
if found:
wait = int(found.group(1))
+ else
+ wait = 60
- self.html = self.load("http://www.nowdownload.eu" + str(tokenlink.group(1)))
+ baseurl = "http://www.nowdownload.ch"
+ self.html = self.load(baseurl + str(tokenlink.group(1)))
self.setWait(wait)
self.wait()
- self.html = self.load("http://www.nowdownload.eu" + str(continuelink.group(1)))
+ self.html = self.load(baseurl + str(continuelink.group(1)))
url = re.search(self.FILE_DOWNLOAD_LINK, self.html)
if not url:
diff --git a/pyload/plugins/hoster/PornhostCom.py b/pyload/plugins/hoster/PornhostCom.py
index d443c6a0a..1d340694b 100644
--- a/pyload/plugins/hoster/PornhostCom.py
+++ b/pyload/plugins/hoster/PornhostCom.py
@@ -68,8 +68,8 @@ class PornhostCom(Hoster):
if self.html is None:
self.download_html()
- if re.search(r'gallery not found', self.html) is not None \
- or re.search(r'You will be redirected to', self.html) is not None:
+ if (re.search(r'gallery not found', self.html) is not None or
+ re.search(r'You will be redirected to', self.html) is not None):
return False
else:
return True
diff --git a/pyload/plugins/hoster/Premium4Me.py b/pyload/plugins/hoster/Premium4Me.py
index d98fea4c4..d6c154693 100644
--- a/pyload/plugins/hoster/Premium4Me.py
+++ b/pyload/plugins/hoster/Premium4Me.py
@@ -5,16 +5,15 @@ from urllib import quote
from os.path import exists
from os import remove
-from pyload.plugins.Hoster import Hoster
-from pyload.utils.fs import fs_encode
+from module.plugins.Hoster import Hoster
+from module.utils import fs_encode
+
class Premium4Me(Hoster):
__name__ = "Premium4Me"
__version__ = "0.08"
__type__ = "hoster"
- __config__ = [("activated", "bool", "Activated", "False"),
- ("hosterListMode", "all;listed;unlisted", "Use for downloads from supported hosters:", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", "")]
+
__pattern__ = r"http://premium.to/.*"
__description__ = """Premium.to hoster plugin"""
__author_name__ = ("RaNaN", "zoidberg", "stickell")
diff --git a/pyload/plugins/hoster/PremiumizeMe.py b/pyload/plugins/hoster/PremiumizeMe.py
index 30e39380f..c5c09857f 100644
--- a/pyload/plugins/hoster/PremiumizeMe.py
+++ b/pyload/plugins/hoster/PremiumizeMe.py
@@ -1,16 +1,12 @@
-from pyload.plugins.Hoster import Hoster
-from pyload.utils import json_loads
+from module.plugins.Hoster import Hoster
+
+from module.common.json_layer import json_loads
class PremiumizeMe(Hoster):
__name__ = "PremiumizeMe"
__version__ = "0.12"
__type__ = "hoster"
- __config__ = [("activated", "bool", "Activated", "False"),
- ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to stanard download if download fails", "False"),
- ("interval", "int", "Reload interval in hours (0 to disable)", "24")]
__description__ = """Premiumize.Me hoster plugin"""
# Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady
@@ -22,7 +18,7 @@ class PremiumizeMe(Hoster):
def process(self, pyfile):
# Check account
- if not self.account or not self.account.isUsable():
+ if not self.account or not self.account.canUse():
self.logError(_("Please enter your %s account or deactivate this plugin") % "premiumize.me")
self.fail("No valid premiumize.me account provided")
@@ -36,10 +32,13 @@ class PremiumizeMe(Hoster):
if temp.pop() in suffix_to_remove:
self.pyfile.name = ".".join(temp)
+ # Get account data
+ (user, data) = self.account.selectAccount()
+
# Get rewritten link using the premiumize.me api v1 (see https://secure.premiumize.me/?show=api)
answer = self.load(
"https://api.premiumize.me/pm-api/v1.php?method=directdownloadlink&params[login]=%s&params[pass]=%s&params[link]=%s" % (
- self.account.loginname, self.account.password, self.pyfile.url))
+ user, data['password'], self.pyfile.url))
data = json_loads(answer)
# Check status and decide what to do
diff --git a/pyload/plugins/hoster/PutlockerCom.py b/pyload/plugins/hoster/PutlockerCom.py
index 02205f9cc..7b9ac1f84 100644
--- a/pyload/plugins/hoster/PutlockerCom.py
+++ b/pyload/plugins/hoster/PutlockerCom.py
@@ -17,9 +17,8 @@
@author: jeix
"""
-# http://www.putlocker.com/file/83C174C844583CF7
-
import re
+from os import rename
from module.plugins.internal.SimpleHoster import SimpleHoster
@@ -27,26 +26,28 @@ from module.plugins.internal.SimpleHoster import SimpleHoster
class PutlockerCom(SimpleHoster):
__name__ = "PutlockerCom"
__type__ = "hoster"
- __pattern__ = r'http://(www\.)?putlocker\.com/(file|embed)/[A-Z0-9]+'
- __version__ = "0.27"
+ __pattern__ = r'http://(?:www\.)?putlocker\.com/(mobile/)?(file|embed)/(?P<ID>[A-Z0-9]+)'
+ __version__ = "0.31"
__description__ = """Putlocker.Com"""
- __author_name__ = ("jeix", "stickell")
- __author_mail__ = ("l.stickell@yahoo.it")
+ __author_name__ = ("jeix", "stickell", "Walter Purcaro")
+ __author_mail__ = ("", "l.stickell@yahoo.it", "vuolter@gmail.com")
FILE_OFFLINE_PATTERN = r"This file doesn't exist, or has been removed."
FILE_INFO_PATTERN = r'site-content">\s*<h1>(?P<N>.+)<strong>\( (?P<S>[^)]+) \)</strong></h1>'
- def handleFree(self):
+ FILE_URL_REPLACEMENTS = [(__pattern__, r'http://www.putlocker.com/file/\g<ID>')]
+ HOSTER_NAME = "putlocker.com"
+
+ def setup(self):
self.multiDL = self.resumeDownload = True
self.chunkLimit = -1
- self.pyfile.url = re.sub(r'http://putlocker\.com', r'http://www.putlocker.com', self.pyfile.url)
-
- self.html = self.load(self.pyfile.url, decode=True)
+ def handleFree(self):
+ name = self.pyfile.name
link = self._getLink()
- if not link.startswith('http://'):
- link = "http://www.putlocker.com" + link
+ self.logDebug("Direct link: " + link)
self.download(link, disposition=True)
+ self.processName(name)
def _getLink(self):
hash_data = re.search(r'<input type="hidden" value="([a-z0-9]+)" name="hash">', self.html)
@@ -55,13 +56,13 @@ class PutlockerCom(SimpleHoster):
post_data = {"hash": hash_data.group(1), "confirm": "Continue+as+Free+User"}
self.html = self.load(self.pyfile.url, post=post_data)
- if ">You have exceeded the daily stream limit for your country\\. You can wait until tomorrow" in self.html or \
- "(>This content server has been temporarily disabled for upgrades|Try again soon\\. You can still download it below\\.<)" in self.html:
- self.retry(wait_time=2 * 60 * 60, reason="Download limit exceeded or server disabled")
+ if (">You have exceeded the daily stream limit for your country\\. You can wait until tomorrow" in self.html or
+ "(>This content server has been temporarily disabled for upgrades|Try again soon\\. You can still download it below\\.<)" in self.html):
+ self.retry(wait_time=7200, reason="Download limit exceeded or server disabled") # 2 hours wait
patterns = (r'(/get_file\.php\?id=[A-Z0-9]+&key=[A-Za-z0-9=]+&original=1)',
- r"(/get_file\.php\?download=[A-Z0-9]+&key=[a-z0-9]+)",
- r"(/get_file\.php\?download=[A-Z0-9]+&key=[a-z0-9]+&original=1)",
+ r'(/get_file\.php\?download=[A-Z0-9]+&key=[a-z0-9]+)',
+ r'(/get_file\.php\?download=[A-Z0-9]+&key=[a-z0-9]+&original=1)',
r'<a href="/gopro\.php">Tired of ads and waiting\? Go Pro!</a>[\t\n\rn ]+</div>[\t\n\rn ]+<a href="(/.*?)"')
for pattern in patterns:
link = re.search(pattern, self.html)
@@ -70,11 +71,26 @@ class PutlockerCom(SimpleHoster):
else:
link = re.search(r"playlist: '(/get_file\.php\?stream=[A-Za-z0-9=]+)'", self.html)
if link:
- self.html = self.load("http://www.putlocker.com" + link.group(1))
+ self.html = self.load("http://www.%s%s" % (self.HOSTER_NAME, link.group(1)))
link = re.search(r'media:content url="(http://.*?)"', self.html)
if not link:
- link = re.search("\"(http://media\\-b\\d+\\.putlocker\\.com/download/\\d+/.*?)\"", self.html)
+ pattern = "\"(http://media\\-b\\d+\\.%s\\.%s/download/\\d+/.*?)\"" % self.HOSTER_NAME.rsplit(".")
+ link = re.search(pattern, self.html)
else:
self.parseError('Unable to detect a download link')
- return link.group(1).replace("&amp;", "&")
+ link = link.group(1).replace("&amp;", "&")
+ if link.startswith("http://"):
+ return link
+ else:
+ return "http://www.%s%s" % (self.HOSTER_NAME, link)
+
+ def processName(self, name_old):
+ name = self.pyfile.name
+ if name <= name_old:
+ return
+ name_new = re.sub(r'\.[^.]+$', "", name_old) + name[len(name_old):]
+ filename = self.lastDownload
+ self.pyfile.name = name_new
+ rename(filename, filename.rsplit(name)[0] + name_new)
+ self.logInfo("%(name)s renamed to %(newname)s" % {"name": name, "newname": name_new})
diff --git a/pyload/plugins/hoster/RPNetBiz.py b/pyload/plugins/hoster/RPNetBiz.py
new file mode 100644
index 000000000..ae8ccf8a9
--- /dev/null
+++ b/pyload/plugins/hoster/RPNetBiz.py
@@ -0,0 +1,76 @@
+import re
+
+from module.plugins.Hoster import Hoster
+from module.common.json_layer import json_loads
+
+
+class RPNetBiz(Hoster):
+ __name__ = "RPNetBiz"
+ __version__ = "0.1"
+ __type__ = "hoster"
+ __description__ = """RPNet.Biz hoster plugin"""
+ __pattern__ = r"https?://.*rpnet\.biz"
+ __author_name__ = ("Dman")
+ __author_mail__ = ("dmanugm@gmail.com")
+
+ def setup(self):
+ self.chunkLimit = -1
+ self.resumeDownload = True
+
+ def process(self, pyfile):
+
+ if re.match(self.__pattern__, pyfile.url):
+ link_status = {'generated': pyfile.url}
+ elif not self.account:
+ # Check account
+ self.logError(_("Please enter your %s account or deactivate this plugin") % "rpnet")
+ self.fail("No rpnet account provided")
+ else:
+ (user, data) = self.account.selectAccount()
+
+ self.logDebug("Original URL: %s" % pyfile.url)
+ # Get the download link
+ response = self.load("https://premium.rpnet.biz/client_api.php",
+ get={"username": user, "password": data['password'],
+ "action": "generate", "links": self.pyfile.url})
+
+ self.logDebug("JSON data: %s" % response)
+ link_status = json_loads(response)['links'][0] # get the first link... since we only queried one
+
+ # Check if we only have an id as a HDD link
+ if 'id' in link_status:
+ self.logDebug("Need to wait at least 30 seconds before requery")
+ self.setWait(30) # wait for 30 seconds
+ self.wait()
+ # Lets query the server again asking for the status on the link,
+ # we need to keep doing this until we reach 100
+ max_tries = 30
+ my_try = 0
+ while (my_try <= max_tries):
+ self.logDebug("Try: %d ; Max Tries: %d" % (my_try, max_tries))
+ response = self.load("https://premium.rpnet.biz/client_api.php",
+ get={"username": user, "password": data['password'],
+ "action": "downloadInformation", "id": link_status['id']})
+ self.logDebug("JSON data hdd query: %s" % response)
+ download_status = json_loads(response)['download']
+
+ if download_status['status'] == '100':
+ link_status['generated'] = download_status['rpnet_link']
+ self.logDebug("Successfully downloaded to rpnet HDD: %s" % link_status['generated'])
+ break
+ else:
+ self.logDebug("At %s%% for the file download" % download_status['status'])
+
+ self.setWait(30)
+ self.wait()
+ my_try += 1
+
+ if my_try > max_tries: # We went over the limit!
+ self.fail("Waited for about 15 minutes for download to finish but failed")
+
+ if 'generated' in link_status:
+ self.download(link_status['generated'], disposition=True)
+ elif 'error' in link_status:
+ self.fail(link_status['error'])
+ else:
+ self.fail("Something went wrong, not supposed to enter here")
diff --git a/pyload/plugins/hoster/RapidgatorNet.py b/pyload/plugins/hoster/RapidgatorNet.py
index 64ed6a4b3..611d2ba5d 100644
--- a/pyload/plugins/hoster/RapidgatorNet.py
+++ b/pyload/plugins/hoster/RapidgatorNet.py
@@ -97,8 +97,8 @@ class RapidgatorNet(SimpleHoster):
self.html = self.load(self.pyfile.url, decode=True)
self.getFileInfo()
- if "You can download files up to 500 MB in free mode" in self.html \
- or "This file can be downloaded by premium only" in self.html:
+ if ("You can download files up to 500 MB in free mode" in self.html or
+ "This file can be downloaded by premium only" in self.html):
self.fail("Premium account needed for download")
self.checkWait()
diff --git a/pyload/plugins/hoster/RapidshareCom.py b/pyload/plugins/hoster/RapidshareCom.py
index bef6fcdef..9828bf4ce 100644
--- a/pyload/plugins/hoster/RapidshareCom.py
+++ b/pyload/plugins/hoster/RapidshareCom.py
@@ -1,4 +1,3 @@
-
#!/usr/bin/env python
# -*- coding: utf-8 -*-
@@ -172,8 +171,7 @@ class RapidshareCom(Hoster):
elif int(self.api_data["status"]) > 50:
self.api_data["status"] = str(int(self.api_data["status"]) - 50)
- self.api_data["mirror"] = \
- "http://rs%(serverid)s%(shorthost)s.rapidshare.com/files/%(fileid)s/%(filename)s" % self.api_data
+ self.api_data["mirror"] = "http://rs%(serverid)s%(shorthost)s.rapidshare.com/files/%(fileid)s/%(filename)s" % self.api_data
def freeWait(self):
"""downloads html with the important information
@@ -196,8 +194,8 @@ class RapidshareCom(Hoster):
self.setWait(60)
self.logInfo(_("Already downloading from this ip address, waiting 60 seconds"))
self.wait()
- elif "Too many users downloading from this server right now" in result or \
- "All free download slots are full" in result:
+ elif ("Too many users downloading from this server right now" in result or
+ "All free download slots are full" in result):
self.setWait(120)
self.logInfo(_("RapidShareCom: No free slots"))
self.wait()
diff --git a/pyload/plugins/hoster/RealdebridCom.py b/pyload/plugins/hoster/RealdebridCom.py
index 0a6d26d21..40ee96df9 100644
--- a/pyload/plugins/hoster/RealdebridCom.py
+++ b/pyload/plugins/hoster/RealdebridCom.py
@@ -6,21 +6,16 @@ from time import time
from urllib import quote, unquote
from random import randrange
-from pyload.utils import parseFileSize
-from pyload.utils import json_loads
-from pyload.plugins.Hoster import Hoster
+from module.utils import parseFileSize
+from module.common.json_layer import json_loads
+from module.plugins.Hoster import Hoster
class RealdebridCom(Hoster):
__name__ = "RealdebridCom"
- __version__ = "0.51"
+ __version__ = "0.53"
__type__ = "hoster"
- __config__ = [("activated", "bool", "Activated", "False"),
- ("https", "bool", "Enable HTTPS", "False"),
- ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported):", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to standard download if download fails", "False"),
- ("interval", "int", "Reload interval in hours (0 to disable)", "24")]
+
__pattern__ = r"https?://.*real-debrid\..*"
__description__ = """Real-Debrid.com hoster plugin"""
__author_name__ = ("Devirex, Hazzard")
@@ -35,27 +30,25 @@ class RealdebridCom(Hoster):
name += "%s.tmp" % randrange(100, 999)
return name
- def init(self):
- self.tries = 0
+ def setup(self):
self.chunkLimit = 3
self.resumeDownload = True
def process(self, pyfile):
- if not self.account:
- self.logError(_("Please enter your %s account or deactivate this plugin") % "Real-debrid")
- self.fail("No Real-debrid account provided")
-
- self.logDebug("Real-Debrid: Old URL: %s" % pyfile.url)
if re.match(self.__pattern__, pyfile.url):
new_url = pyfile.url
+ elif not self.account:
+ self.logError(_("Please enter your %s account or deactivate this plugin") % "Real-debrid")
+ self.fail("No Real-debrid account provided")
else:
+ self.logDebug("Old URL: %s" % pyfile.url)
password = self.getPassword().splitlines()
if not password:
password = ""
else:
password = password[0]
- url = "http://real-debrid.com/ajax/unrestrict.php?lang=en&link=%s&password=%s&time=%s" % (
+ url = "https://real-debrid.com/ajax/unrestrict.php?lang=en&link=%s&password=%s&time=%s" % (
quote(pyfile.url, ""), password, int(time() * 1000))
page = self.load(url)
data = json_loads(page)
@@ -79,7 +72,8 @@ class RealdebridCom(Hoster):
else:
new_url = new_url.replace("https://", "http://")
- self.logDebug("Real-Debrid: New URL: %s" % new_url)
+ if new_url != pyfile.url:
+ self.logDebug("New URL: %s" % new_url)
if pyfile.name.startswith("http") or pyfile.name.startswith("Unknown") or pyfile.name.endswith('..'):
#only use when name wasnt already set
diff --git a/pyload/plugins/hoster/RyushareCom.py b/pyload/plugins/hoster/RyushareCom.py
index b53614e78..675eaddde 100644
--- a/pyload/plugins/hoster/RyushareCom.py
+++ b/pyload/plugins/hoster/RyushareCom.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Test links (random.bin):
-# http://ryushare.com/v3u21arv593q/random.bin
+# http://ryushare.com/cl0jy8ric2js/random.bin
import re
@@ -13,7 +13,7 @@ class RyushareCom(XFileSharingPro):
__name__ = "RyushareCom"
__type__ = "hoster"
__pattern__ = r"http://(?:\w*\.)*?ryushare.com/\w{11,}"
- __version__ = "0.12"
+ __version__ = "0.13"
__description__ = """ryushare.com hoster plugin"""
__author_name__ = ("zoidberg", "stickell","quareevo")
__author_mail__ = ("zoidberg@mujmail.cz", "l.stickell@yahoo.it","quareevo@arcor.de")
@@ -21,7 +21,7 @@ class RyushareCom(XFileSharingPro):
HOSTER_NAME = "ryushare.com"
WAIT_PATTERN = r'You have to wait ((?P<hour>\d+) hour[s]?, )?((?P<min>\d+) minute[s], )?(?P<sec>\d+) second[s]'
- DIRECT_LINK_PATTERN = r'<a href="([^"]+)">Click here to download</a>'
+ DIRECT_LINK_PATTERN = r'(http://([^/]*?ryushare.com|\d+\.\d+\.\d+\.\d+)(:\d+/d/|/files/\w+/\w+/)[^"\'<]+)'
SOLVEMEDIA_PATTERN = r'http:\/\/api\.solvemedia\.com\/papi\/challenge\.script\?k=(.*?)"'
def setup(self):
@@ -55,7 +55,7 @@ class RyushareCom(XFileSharingPro):
retry = True
self.wait()
- if retry == True:
+ if retry:
self.retry()
for i in xrange(5):
@@ -83,7 +83,7 @@ class RyushareCom(XFileSharingPro):
self.fail("You have entered 5 invalid captcha codes")
if 'Click here to download' in self.html:
- m = re.search(self.DIRECT_LINK_PATTERN, self.html)
+ m = re.search(r'<a href="([^"]+)">Click here to download</a>', self.html)
return m.group(1)
getInfo = create_getInfo(RyushareCom)
diff --git a/pyload/plugins/hoster/ShareplaceCom.py b/pyload/plugins/hoster/ShareplaceCom.py
index 5f23f9708..e51c3160f 100644
--- a/pyload/plugins/hoster/ShareplaceCom.py
+++ b/pyload/plugins/hoster/ShareplaceCom.py
@@ -15,10 +15,6 @@ class ShareplaceCom(Hoster):
__author_name__ = ("ACCakut, based on YourfilesTo by jeix and skydancer")
__author_mail__ = ("none")
- def setup(self):
- self.html = None
- self.multiDL = True
-
def process(self, pyfile):
self.pyfile = pyfile
self.prepare()
diff --git a/pyload/plugins/hoster/ShragleCom.py b/pyload/plugins/hoster/ShragleCom.py
index 2a2738974..5d19afbc7 100644
--- a/pyload/plugins/hoster/ShragleCom.py
+++ b/pyload/plugins/hoster/ShragleCom.py
@@ -46,7 +46,6 @@ class ShragleCom(Hoster):
__author_mail__ = ("RaNaN@pyload.org", "zoidberg@mujmail.cz")
def setup(self):
- self.html = None
self.multiDL = False
self.check_data = None
diff --git a/pyload/plugins/hoster/SimplydebridCom.py b/pyload/plugins/hoster/SimplydebridCom.py
index 1b518274d..67cc39255 100644
--- a/pyload/plugins/hoster/SimplydebridCom.py
+++ b/pyload/plugins/hoster/SimplydebridCom.py
@@ -4,16 +4,13 @@
from urllib import quote, unquote
import re
-from pyload.plugins.Hoster import Hoster
+from module.plugins.Hoster import Hoster
class SimplydebridCom(Hoster):
__name__ = "SimplydebridCom"
__version__ = "0.1"
__type__ = "hoster"
- __config__ = [("activated", "bool", "Activated", "False"),
- ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", "")]
__pattern__ = r"http://\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/sd.php/*"
__description__ = """simply-debrid.com hoster plugin"""
__author_name__ = ("Kagenoshin")
diff --git a/pyload/plugins/hoster/SockshareCom.py b/pyload/plugins/hoster/SockshareCom.py
new file mode 100644
index 000000000..b2635d8bc
--- /dev/null
+++ b/pyload/plugins/hoster/SockshareCom.py
@@ -0,0 +1,33 @@
+# -*- coding: utf-8 -*-
+
+"""
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License,
+ or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+ @author: Walter Purcaro
+"""
+
+from module.plugins.hoster.PutlockerCom import PutlockerCom
+
+
+class SockshareCom(PutlockerCom):
+ __name__ = "SockshareCom"
+ __type__ = "hoster"
+ __pattern__ = r'http://(?:www\.)?sockshare\.com/(mobile/)?(file|embed)/(?P<ID>[A-Z0-9]+)'
+ __version__ = "0.01"
+ __description__ = """Sockshare.Com"""
+ __author_name__ = ("Walter Purcaro")
+ __author_mail__ = ("vuolter@gmail.com")
+
+ FILE_URL_REPLACEMENTS = [(__pattern__, r'http://www.sockshare.com/file/\g<ID>')]
+ HOSTER_NAME = "sockshare.com"
diff --git a/pyload/plugins/hoster/TusfilesNet.py b/pyload/plugins/hoster/TusfilesNet.py
index a155439b2..e4a64cfdc 100644
--- a/pyload/plugins/hoster/TusfilesNet.py
+++ b/pyload/plugins/hoster/TusfilesNet.py
@@ -13,8 +13,17 @@ class TusfilesNet(XFileSharingPro):
FILE_INFO_PATTERN = r'<li>(?P<N>[^<]+)</li>\s+<li><b>Size:</b> <small>(?P<S>[\d.]+) (?P<U>\w+)</small></li>'
FILE_OFFLINE_PATTERN = r'The file you were looking for could not be found'
-
HOSTER_NAME = "tusfiles.net"
+ def setup(self):
+ self.chunkLimit = 1
+ self.resumeDownload = self.multiDL = True
+ if self.premium:
+ self.limitDL = 5
+ elif self.account:
+ self.limitDL = 3
+ else:
+ self.limitDL = 2
+
getInfo = create_getInfo(TusfilesNet)
diff --git a/pyload/plugins/hoster/UnrestrictLi.py b/pyload/plugins/hoster/UnrestrictLi.py
index 0e64a4697..a3fe5ff5d 100644
--- a/pyload/plugins/hoster/UnrestrictLi.py
+++ b/pyload/plugins/hoster/UnrestrictLi.py
@@ -18,8 +18,8 @@
import re
from datetime import datetime, timedelta
-from pyload.plugins.Hoster import Hoster
-from pyload.utils import json_loads
+from module.plugins.Hoster import Hoster
+from module.common.json_layer import json_loads
def secondsToMidnight():
@@ -35,32 +35,25 @@ def secondsToMidnight():
class UnrestrictLi(Hoster):
__name__ = "UnrestrictLi"
- __version__ = "0.10"
+ __version__ = "0.11"
__type__ = "hoster"
- __config__ = [("activated", "bool", "Activated", "False"),
- ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", ""),
- ("unloadFailing", "bool", "Revert to standard download if download fails", "False"),
- ("interval", "int", "Reload interval in hours (0 to disable)", "24"),
- ("history", "bool", "Delete History", "False")]
__pattern__ = r"https?://.*(unrestrict|unr)\.li"
__description__ = """Unrestrict.li hoster plugin"""
__author_name__ = ("stickell")
__author_mail__ = ("l.stickell@yahoo.it")
- def init(self):
+ def setup(self):
self.chunkLimit = 16
self.resumeDownload = True
def process(self, pyfile):
- if not self.account:
- self.logError(_("Please enter your %s account or deactivate this plugin") % "Unrestrict.li")
- self.fail("No Unrestrict.li account provided")
-
- self.logDebug("Old URL: %s" % pyfile.url)
if re.match(self.__pattern__, pyfile.url):
new_url = pyfile.url
+ elif not self.account:
+ self.logError(_("Please enter your %s account or deactivate this plugin") % "Unrestrict.li")
+ self.fail("No Unrestrict.li account provided")
else:
+ self.logDebug("Old URL: %s" % pyfile.url)
for i in xrange(5):
page = self.req.load('https://unrestrict.li/unrestrict.php',
post={'link': pyfile.url, 'domain': 'long'})
@@ -89,7 +82,8 @@ class UnrestrictLi(Hoster):
new_url = page.keys()[0]
self.api_data = page[new_url]
- self.logDebug("New URL: " + new_url)
+ if new_url != pyfile.url:
+ self.logDebug("New URL: " + new_url)
if hasattr(self, 'api_data'):
self.setNameSize()
diff --git a/pyload/plugins/hoster/UploadedTo.py b/pyload/plugins/hoster/UploadedTo.py
index aee7f32b1..88a8edebb 100644
--- a/pyload/plugins/hoster/UploadedTo.py
+++ b/pyload/plugins/hoster/UploadedTo.py
@@ -89,7 +89,7 @@ class UploadedTo(Hoster):
__name__ = "UploadedTo"
__type__ = "hoster"
__pattern__ = r"https?://[\w\.-]*?(uploaded\.(to|net)|ul\.to)(/file/|/?\?id=|.*?&id=|/)(?P<ID>\w+)"
- __version__ = "0.71"
+ __version__ = "0.72"
__description__ = """Uploaded.net Download Hoster"""
__author_name__ = ("spoob", "mkaay", "zoidberg", "netpok", "stickell")
__author_mail__ = ("spoob@pyload.org", "mkaay@mkaay.de", "zoidberg@mujmail.cz",
@@ -100,14 +100,8 @@ class UploadedTo(Hoster):
DL_LIMIT_PATTERN = "You have reached the max. number of possible free downloads for this hour"
def setup(self):
- self.html = None
- self.multiDL = self.resumeDownload = False
- self.url = False
+ self.multiDL = self.resumeDownload = self.premium
self.chunkLimit = 1 # critical problems with more chunks
- if self.account:
- self.premium = self.account.getAccountInfo(self.user)["premium"]
- if self.premium:
- self.multiDL = self.resumeDownload = True
self.fileID = getID(self.pyfile.url)
self.pyfile.url = "http://uploaded.net/file/%s" % self.fileID
@@ -196,7 +190,6 @@ class UploadedTo(Hoster):
downloadURL = ""
for i in range(5):
- #self.req.lastURL = str(self.url)
re_captcha = ReCaptcha(self)
challenge, result = re_captcha.challenge(challengeId.group(1))
options = {"recaptcha_challenge_field": challenge, "recaptcha_response_field": result}
diff --git a/pyload/plugins/hoster/WebshareCz.py b/pyload/plugins/hoster/WebshareCz.py
index 10a8078c5..1c9ddb290 100644
--- a/pyload/plugins/hoster/WebshareCz.py
+++ b/pyload/plugins/hoster/WebshareCz.py
@@ -34,9 +34,6 @@ class WebshareCz(SimpleHoster):
DOWNLOAD_LINK_PATTERN = r'id="download_link" href="(?P<url>.*?)"'
- def setup(self):
- self.multiDL = True
-
def handleFree(self):
url_a = re.search(r"(var l.*)", self.html).group(1)
url_b = re.search(r"(var keyStr.*)", self.html).group(1)
diff --git a/pyload/plugins/hoster/WuploadCom.py b/pyload/plugins/hoster/WuploadCom.py
index 3dab1b1bb..aaeeb59fd 100644
--- a/pyload/plugins/hoster/WuploadCom.py
+++ b/pyload/plugins/hoster/WuploadCom.py
@@ -47,7 +47,7 @@ class WuploadCom(Hoster):
__name__ = "WuploadCom"
__type__ = "hoster"
__pattern__ = r"http://[\w\.]*?wupload\..*?/file/(([a-z][0-9]+/)?[0-9]+)(/.*)?"
- __version__ = "0.21"
+ __version__ = "0.22"
__description__ = """Wupload com"""
__author_name__ = ("jeix", "paulking")
__author_mail__ = ("jeix@hasnomail.de", "")
@@ -62,9 +62,7 @@ class WuploadCom(Hoster):
CAPTCHA_TYPE1_PATTERN = r'Recaptcha.create\("(.*?)",'
CAPTCHA_TYPE2_PATTERN = r'id="recaptcha_image"><img style="display: block;" src="(.+)image?c=(.+?)"'
- def init(self):
- if self.account:
- self.premium = self.account.getAccountInfo(self.user)["premium"]
+ def setup(self):
if not self.premium:
self.chunkLimit = 1
self.multiDL = False
diff --git a/pyload/plugins/hoster/X7To.py b/pyload/plugins/hoster/X7To.py
index 1b8850d9d..59ec6ed06 100644
--- a/pyload/plugins/hoster/X7To.py
+++ b/pyload/plugins/hoster/X7To.py
@@ -12,19 +12,16 @@ class X7To(Hoster):
__name__ = "X7To"
__type__ = "hoster"
__pattern__ = r"http://(?:www.)?x7.to/"
- __version__ = "0.3"
+ __version__ = "0.4"
__description__ = """X7.To File Download Hoster"""
__author_name__ = ("ernieb")
__author_mail__ = ("ernieb")
FILE_INFO_PATTERN = r'<meta name="description" content="Download: (.*?) \(([0-9,.]+) (KB|MB|GB)\)'
- def init(self):
- if self.premium:
- self.multiDL = self.resumeDownload = False
- self.chunkLimit = 1
- else:
- self.multiDL = False
+ def setup(self):
+ self.multiDL = self.resumeDownload = False
+ self.chunkLimit = 1
self.file_id = re.search(r"http://x7.to/([a-zA-Z0-9]+)", self.pyfile.url).group(1)
self.logDebug("file id is %s" % self.file_id)
diff --git a/pyload/plugins/hoster/XHamsterCom.py b/pyload/plugins/hoster/XHamsterCom.py
index cbdd818c7..721f1cb75 100644
--- a/pyload/plugins/hoster/XHamsterCom.py
+++ b/pyload/plugins/hoster/XHamsterCom.py
@@ -24,9 +24,6 @@ class XHamsterCom(Hoster):
__config__ = [("type", ".mp4;.flv", "Preferred type", ".mp4")]
__description__ = """XHamster.com Video Download Hoster"""
- def setup(self):
- self.html = None
-
def process(self, pyfile):
self.pyfile = pyfile
diff --git a/pyload/plugins/hoster/YoupornCom.py b/pyload/plugins/hoster/YoupornCom.py
index d029db7ba..b0d594ca5 100644
--- a/pyload/plugins/hoster/YoupornCom.py
+++ b/pyload/plugins/hoster/YoupornCom.py
@@ -14,9 +14,6 @@ class YoupornCom(Hoster):
__author_name__ = ("willnix")
__author_mail__ = ("willnix@pyload.org")
- def setup(self):
- self.html = None
-
def process(self, pyfile):
self.pyfile = pyfile
diff --git a/pyload/plugins/hoster/YourfilesTo.py b/pyload/plugins/hoster/YourfilesTo.py
index 8c0784205..0fd094f61 100644
--- a/pyload/plugins/hoster/YourfilesTo.py
+++ b/pyload/plugins/hoster/YourfilesTo.py
@@ -15,10 +15,6 @@ class YourfilesTo(Hoster):
__author_name__ = ("jeix", "skydancer")
__author_mail__ = ("jeix@hasnomail.de", "skydancer@hasnomail.de")
- def setup(self):
- self.html = None
- self.multiDL = True
-
def process(self, pyfile):
self.pyfile = pyfile
self.prepare()
diff --git a/pyload/plugins/hoster/YoutubeCom.py b/pyload/plugins/hoster/YoutubeCom.py
index 316eebd4b..319eb36e6 100644
--- a/pyload/plugins/hoster/YoutubeCom.py
+++ b/pyload/plugins/hoster/YoutubeCom.py
@@ -36,7 +36,7 @@ class YoutubeCom(Hoster):
__name__ = "YoutubeCom"
__type__ = "hoster"
__pattern__ = r"https?://(?:[^/]*?)youtube\.com/watch.*?[?&]v=.*"
- __version__ = "0.35"
+ __version__ = "0.38"
__config__ = [("quality", "sd;hd;fullhd;240p;360p;480p;720p;1080p;3072p", "Quality Setting", "hd"),
("fmt", "int", "FMT/ITAG Number (5-102, 0 for auto)", 0),
(".mp4", "bool", "Allow .mp4", True),
@@ -48,9 +48,6 @@ class YoutubeCom(Hoster):
__author_name__ = ("spoob", "zoidberg")
__author_mail__ = ("spoob@pyload.org", "zoidberg@mujmail.cz")
- # Invalid characters that must be removed from the file name
- invalidChars = ':?><"|\\'
-
# name, width, height, quality ranking, 3D
formats = {5: (".flv", 400, 240, 1, False),
6: (".flv", 640, 400, 4, False),
@@ -141,8 +138,7 @@ class YoutubeCom(Hoster):
name = re.search(file_name_pattern, html).group(1).replace("/", "")
# Cleaning invalid characters from the file name
- for c in self.invalidChars:
- name = name.replace(c, '_')
+ name = name.encode('ascii', 'replace')
pyfile.name = html_unescape(name)
diff --git a/pyload/plugins/hoster/ZeveraCom.py b/pyload/plugins/hoster/ZeveraCom.py
index 6f836dc92..e8b832a13 100644
--- a/pyload/plugins/hoster/ZeveraCom.py
+++ b/pyload/plugins/hoster/ZeveraCom.py
@@ -1,16 +1,13 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-from pyload.plugins.Hoster import Hoster
+from module.plugins.Hoster import Hoster
class ZeveraCom(Hoster):
__name__ = "ZeveraCom"
__version__ = "0.21"
__type__ = "hoster"
- __config__ = [("activated", "bool", "Activated", "False"),
- ("hosterListMode", "all;listed;unlisted", "Use for hosters (if supported)", "all"),
- ("hosterList", "str", "Hoster list (comma separated)", "")]
__pattern__ = r"http://zevera.com/.*"
__description__ = """zevera.com hoster plugin"""
__author_name__ = ("zoidberg")
diff --git a/pyload/plugins/hoster/ZippyshareCom.py b/pyload/plugins/hoster/ZippyshareCom.py
index a3b1cf783..c98679a22 100644
--- a/pyload/plugins/hoster/ZippyshareCom.py
+++ b/pyload/plugins/hoster/ZippyshareCom.py
@@ -1,6 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
+# Test links (random.bin):
+# http://www29.zippyshare.com/v/55578602/file.html
+
import re
import subprocess
import tempfile
@@ -26,6 +29,8 @@ class ZippyshareCom(SimpleHoster):
FILE_INFO_PATTERN = r'document\.getElementById\(\'dlbutton\'\)\.href = "[^;]*/(?P<N>[^"]+)";'
FILE_OFFLINE_PATTERN = r'>File does not exist on this server</div>'
+ SH_COOKIES = [('zippyshare.com', 'ziplocale', 'en')]
+
DOWNLOAD_URL_PATTERN = r"<script type=\"text/javascript\">([^<]*?)(document\.getElementById\('dlbutton'\).href = [^;]+;)"
SEED_PATTERN = r'swfobject.embedSWF\("([^"]+)".*?seed: (\d+)'
CAPTCHA_KEY_PATTERN = r'Recaptcha.create\("([^"]+)"'
@@ -35,16 +40,14 @@ class ZippyshareCom(SimpleHoster):
LAST_KNOWN_VALUES = (9, 2374755) # time = (seed * multiply) % modulo
def setup(self):
- self.html = None
- self.wantReconnect = False
self.multiDL = True
def handleFree(self):
url = self.get_file_url()
if not url:
self.fail("Download URL not found.")
- self.logDebug("Download URL %s" % url)
- self.download(url, cookies=True)
+ self.logDebug("Download URL: %s" % url)
+ self.download(url)
check = self.checkDownload({
"swf_values": re.compile(self.SEED_PATTERN)