summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/hoster
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-05 13:32:36 +0200
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-10-05 13:32:36 +0200
commitd1e2da48ff1158c84bab62aba3e62ff16f24f124 (patch)
tree14c2b461b84ab1c07ab39fbe3a80aa69c7b4c8ef /pyload/plugins/hoster
parentFix refs on hook plugins + add missing __init__ files (diff)
parentRemove old Ev0InFetcher hook (diff)
downloadpyload-d1e2da48ff1158c84bab62aba3e62ff16f24f124.tar.xz
Merge branch 'stable' into 0.4.10
Conflicts: module/plugins/internal/CaptchaService.py pyload/plugins/account/CyberlockerCh.py pyload/plugins/account/EgoFilesCom.py pyload/plugins/account/HotfileCom.py pyload/plugins/crypter/HotfileFolderCom.py pyload/plugins/crypter/LinkSaveIn.py pyload/plugins/crypter/OneKhDe.py pyload/plugins/hoster/EgoFilesCom.py pyload/plugins/internal/XFSPAccount.py
Diffstat (limited to 'pyload/plugins/hoster')
-rw-r--r--pyload/plugins/hoster/BitshareCom.py7
-rw-r--r--pyload/plugins/hoster/DepositfilesCom.py2
-rw-r--r--pyload/plugins/hoster/DlFreeFr.py10
-rw-r--r--pyload/plugins/hoster/EgoFilesCom.py84
-rw-r--r--pyload/plugins/hoster/FilerNet.py2
-rw-r--r--pyload/plugins/hoster/HotfileCom.py2
-rw-r--r--pyload/plugins/hoster/OboomCom.py6
-rw-r--r--pyload/plugins/hoster/SpeedyshareCom.py2
-rw-r--r--pyload/plugins/hoster/UploadingCom.py14
9 files changed, 33 insertions, 96 deletions
diff --git a/pyload/plugins/hoster/BitshareCom.py b/pyload/plugins/hoster/BitshareCom.py
index 75d3ea38b..8896e6833 100644
--- a/pyload/plugins/hoster/BitshareCom.py
+++ b/pyload/plugins/hoster/BitshareCom.py
@@ -22,15 +22,17 @@ class BitshareCom(SimpleHoster):
FILE_INFO_PATTERN = r'Downloading (?P<N>.+) - (?P<S>[\d.]+) (?P<U>\w+)</h1>'
OFFLINE_PATTERN = r'(>We are sorry, but the requested file was not found in our database|>Error - File not available<|The file was deleted either by the uploader, inactivity or due to copyright claim)'
+ COOKIES = [(".bitshare.com", "language_selection", "EN")]
+
FILE_AJAXID_PATTERN = r'var ajaxdl = "(.*?)";'
TRAFFIC_USED_UP = r'Your Traffic is used up for today. Upgrade to premium to continue!'
def setup(self):
- self.req.cj.setCookie(".bitshare.com", "language_selection", "EN")
self.multiDL = self.premium
self.chunkLimit = 1
+
def process(self, pyfile):
if self.premium:
self.account.relogin(self.user)
@@ -77,6 +79,7 @@ class BitshareCom(SimpleHoster):
elif check == "error":
self.retry(5, 5 * 60, "Bitshare host : Error occured")
+
def getDownloadUrl(self):
# Return location if direct download is active
if self.premium:
@@ -131,6 +134,7 @@ class BitshareCom(SimpleHoster):
return url
+
def handleErrors(self, response, separator):
self.logDebug("Checking response [%s]" % response)
if "ERROR:Session timed out" in response:
@@ -139,6 +143,7 @@ class BitshareCom(SimpleHoster):
msg = response.split(separator)[-1]
self.fail(msg)
+
def handleCaptchaErrors(self, response):
self.logDebug("Result of captcha resolving [%s]" % response)
if "SUCCESS" in response:
diff --git a/pyload/plugins/hoster/DepositfilesCom.py b/pyload/plugins/hoster/DepositfilesCom.py
index 660adb06d..55cdc875f 100644
--- a/pyload/plugins/hoster/DepositfilesCom.py
+++ b/pyload/plugins/hoster/DepositfilesCom.py
@@ -11,7 +11,7 @@ from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class DepositfilesCom(SimpleHoster):
__name__ = "DepositfilesCom"
__type__ = "hoster"
- __version__ = "0.48"
+ __version__ = "0.49"
__pattern__ = r'https?://(?:www\.)?(depositfiles\.com|dfiles\.(eu|ru))(/\w{1,3})?/files/(?P<ID>\w+)'
diff --git a/pyload/plugins/hoster/DlFreeFr.py b/pyload/plugins/hoster/DlFreeFr.py
index 0365754bc..1e256368c 100644
--- a/pyload/plugins/hoster/DlFreeFr.py
+++ b/pyload/plugins/hoster/DlFreeFr.py
@@ -40,10 +40,12 @@ class AdYouLike:
ADYOULIKE_CALLBACK = r'Adyoulike.g._jsonp_5579316662423138'
ADYOULIKE_CHALLENGE_PATTERN = ADYOULIKE_CALLBACK + r'\((.*?)\)'
+
def __init__(self, plugin, engine="adyoulike"):
self.plugin = plugin
self.engine = engine
+
def challenge(self, html):
adyoulike_data_string = None
m = re.search(self.ADYOULIKE_INPUT_PATTERN, html)
@@ -71,6 +73,7 @@ class AdYouLike:
return ayl_data, challenge_data
+
def result(self, ayl, challenge):
"""
Adyoulike.g._jsonp_5579316662423138
@@ -117,6 +120,7 @@ class DlFreeFr(SimpleHoster):
__author_name__ = ("the-razer", "zoidberg", "Toilal")
__author_mail__ = ("daniel_ AT gmx DOT net", "zoidberg@mujmail.cz", "toilal.dev@gmail.com")
+
FILE_NAME_PATTERN = r'Fichier:</td>\s*<td[^>]*>(?P<N>[^>]*)</td>'
FILE_SIZE_PATTERN = r'Taille:</td>\s*<td[^>]*>(?P<S>[\d.]+[KMG])o'
OFFLINE_PATTERN = r"Erreur 404 - Document non trouv|Fichier inexistant|Le fichier demand&eacute; n'a pas &eacute;t&eacute; trouv&eacute;"
@@ -127,13 +131,13 @@ class DlFreeFr(SimpleHoster):
self.limitDL = 5
self.chunkLimit = 1
+
def init(self):
factory = self.core.requestFactory
self.req = CustomBrowser(factory.bucket, factory.getOptions())
- def process(self, pyfile):
- self.req.setCookieJar(None)
+ def process(self, pyfile):
pyfile.url = replace_patterns(pyfile.url, self.FILE_URL_REPLACEMENTS)
valid_url = pyfile.url
headers = self.load(valid_url, just_header=True)
@@ -157,6 +161,7 @@ class DlFreeFr(SimpleHoster):
else:
self.fail("Invalid return code: " + str(headers.get('code')))
+
def handleFree(self):
action, inputs = self.parseHtmlForm('action="getfile.pl"')
@@ -180,6 +185,7 @@ class DlFreeFr(SimpleHoster):
else:
self.fail("Invalid response")
+
def getLastHeaders(self):
#parse header
header = {"code": self.req.code}
diff --git a/pyload/plugins/hoster/EgoFilesCom.py b/pyload/plugins/hoster/EgoFilesCom.py
index 9d477e156..e5888c4f1 100644
--- a/pyload/plugins/hoster/EgoFilesCom.py
+++ b/pyload/plugins/hoster/EgoFilesCom.py
@@ -1,94 +1,18 @@
# -*- coding: utf-8 -*-
-#
-# Test links:
-# http://egofiles.com/mOZfMI1WLZ6HBkGG/random.bin
-import re
+from pyload.plugins.internal.DeadHoster import DeadHoster, create_getInfo
-from pyload.plugins.internal.CaptchaService import ReCaptcha
-from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
-
-class EgoFilesCom(SimpleHoster):
+class EgoFilesCom(DeadHoster):
__name__ = "EgoFilesCom"
__type__ = "hoster"
- __version__ = "0.15"
+ __version__ = "0.16"
- __pattern__ = r'https?://(?:www\.)?egofiles.com/(\w+)'
+ __pattern__ = r'https?://(?:www\.)?egofiles\.com/\w+'
__description__ = """Egofiles.com hoster plugin"""
__author_name__ = "stickell"
__author_mail__ = "l.stickell@yahoo.it"
- FILE_INFO_PATTERN = r'<div class="down-file">\s+(?P<N>[^\t]+)\s+<div class="file-properties">\s+(File size|Rozmiar): (?P<S>[\w.]+) (?P<U>\w+) \|'
- OFFLINE_PATTERN = r'(File size|Rozmiar): 0 KB'
- WAIT_TIME_PATTERN = r'For next free download you have to wait <strong>((?P<m>\d*)m)? ?((?P<s>\d+)s)?</strong>'
- LINK_PATTERN = r'<a href="(?P<link>[^"]+)">Download ></a>'
-
-
- def setup(self):
- # Set English language
- self.load("https://egofiles.com/ajax/lang.php?lang=en", just_header=True)
-
- def process(self, pyfile):
- if self.premium and (not self.FORCE_CHECK_TRAFFIC or self.checkTrafficLeft()):
- self.handlePremium()
- else:
- self.handleFree()
-
- def handleFree(self):
- self.html = self.load(self.pyfile.url, decode=True)
- self.getFileInfo()
-
- # Wait time between free downloads
- if 'For next free download you have to wait' in self.html:
- m = re.search(self.WAIT_TIME_PATTERN, self.html).groupdict('0')
- waittime = int(m['m']) * 60 + int(m['s'])
- self.wait(waittime, True)
-
- downloadURL = r''
-
- recaptcha = ReCaptcha(self)
-
- captcha_key = recaptcha.detect_key()
- if captcha_key is None:
- self.parseError("ReCaptcha key not found")
-
- for _ in xrange(5):
- challenge, response = recaptcha.challenge(captcha_key)
- post_data = {'recaptcha_challenge_field': challenge,
- 'recaptcha_response_field': response}
- self.html = self.load(self.pyfile.url, post=post_data, decode=True)
- m = re.search(self.LINK_PATTERN, self.html)
- if m is None:
- self.logInfo("Wrong captcha")
- self.invalidCaptcha()
- elif hasattr(m, 'group'):
- downloadURL = m.group('link')
- self.correctCaptcha()
- break
- else:
- self.fail('Unknown error - Plugin may be out of date')
-
- if not downloadURL:
- self.fail("No Download url retrieved/all captcha attempts failed")
-
- self.download(downloadURL, disposition=True)
-
- def handlePremium(self):
- header = self.load(self.pyfile.url, just_header=True)
- if 'location' in header:
- self.logDebug("DIRECT LINK from header: " + header['location'])
- self.download(header['location'])
- else:
- self.html = self.load(self.pyfile.url, decode=True)
- self.getFileInfo()
- m = re.search(r'<a href="(?P<link>[^"]+)">Download ></a>', self.html)
- if m is None:
- self.parseError('Unable to detect direct download url')
- else:
- self.logDebug("DIRECT URL from html: " + m.group('link'))
- self.download(m.group('link'), disposition=True)
-
getInfo = create_getInfo(EgoFilesCom)
diff --git a/pyload/plugins/hoster/FilerNet.py b/pyload/plugins/hoster/FilerNet.py
index 91df4ff7e..5b3a07871 100644
--- a/pyload/plugins/hoster/FilerNet.py
+++ b/pyload/plugins/hoster/FilerNet.py
@@ -16,7 +16,7 @@ from pyload.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FilerNet(SimpleHoster):
__name__ = "FilerNet"
__type__ = "hoster"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'https?://(?:www\.)?filer\.net/get/(\w+)'
diff --git a/pyload/plugins/hoster/HotfileCom.py b/pyload/plugins/hoster/HotfileCom.py
index 1dd8b4f4e..41831342f 100644
--- a/pyload/plugins/hoster/HotfileCom.py
+++ b/pyload/plugins/hoster/HotfileCom.py
@@ -8,7 +8,7 @@ class HotfileCom(DeadHoster):
__type__ = "hoster"
__version__ = "0.37"
- __pattern__ = r'https?://(www.)?hotfile\.com/dl/\d+/[0-9a-zA-Z]+/'
+ __pattern__ = r'https?://(?:www\.)?hotfile\.com/dl/\d+/\w+'
__description__ = """Hotfile.com hoster plugin"""
__author_name__ = ("sitacuisses", "spoob", "mkaay", "JoKoT3")
diff --git a/pyload/plugins/hoster/OboomCom.py b/pyload/plugins/hoster/OboomCom.py
index 19e3d2ad4..e9496b469 100644
--- a/pyload/plugins/hoster/OboomCom.py
+++ b/pyload/plugins/hoster/OboomCom.py
@@ -13,9 +13,9 @@ from pyload.plugins.internal.CaptchaService import ReCaptcha
class OboomCom(Hoster):
__name__ = "OboomCom"
__type__ = "hoster"
- __version__ = "0.1"
+ __version__ = "0.2"
- __pattern__ = r'https?://(?:www\.)?oboom\.com/(#(id=|/)?)?(?P<ID>[A-Z0-9]{8})'
+ __pattern__ = r'https?://(?:www\.)?oboom\.com/(#(id=|/)?)?(?P<ID>\w{8})'
__description__ = """oboom.com hoster plugin"""
__author_name__ = "stanley"
@@ -27,7 +27,7 @@ class OboomCom(Hoster):
def setup(self):
self.chunkLimit = 1
- self.multiDL = self.premium
+ self.multiDL = self.resumeDownload = self.premium
def process(self, pyfile):
diff --git a/pyload/plugins/hoster/SpeedyshareCom.py b/pyload/plugins/hoster/SpeedyshareCom.py
index 42bb3e453..5dd29dad0 100644
--- a/pyload/plugins/hoster/SpeedyshareCom.py
+++ b/pyload/plugins/hoster/SpeedyshareCom.py
@@ -15,7 +15,7 @@ class SpeedyshareCom(SimpleHoster):
__type__ = "hoster"
__version__ = "0.02"
- __pattern__ = r"https?://(www\.)?(speedyshare\.com|speedy\.sh)/\w+"
+ __pattern__ = r"https?://(?:www\.)?(speedyshare\.com|speedy\.sh)/\w+"
__description__ = """Speedyshare.com hoster plugin"""
__author_name__ = "zapp-brannigan"
diff --git a/pyload/plugins/hoster/UploadingCom.py b/pyload/plugins/hoster/UploadingCom.py
index 882cb863f..1df258c4f 100644
--- a/pyload/plugins/hoster/UploadingCom.py
+++ b/pyload/plugins/hoster/UploadingCom.py
@@ -19,18 +19,18 @@ class UploadingCom(SimpleHoster):
__author_name__ = ("jeix", "mkaay", "zoidberg")
__author_mail__ = ("jeix@hasnomail.de", "mkaay@mkaay.de", "zoidberg@mujmail.cz")
+
FILE_NAME_PATTERN = r'id="file_title">(?P<N>.+)</'
FILE_SIZE_PATTERN = r'size tip_container">(?P<S>[\d.]+) (?P<U>\w+)<'
OFFLINE_PATTERN = r'(Page|file) not found'
+ COOKIES = [(".uploading.com", "lang", "1"),
+ (".uploading.com", "language", "1"),
+ (".uploading.com", "setlang", "en"),
+ (".uploading.com", "_lang", "en")]
- def process(self, pyfile):
- # set lang to english
- self.req.cj.setCookie(".uploading.com", "lang", "1")
- self.req.cj.setCookie(".uploading.com", "language", "1")
- self.req.cj.setCookie(".uploading.com", "setlang", "en")
- self.req.cj.setCookie(".uploading.com", "_lang", "en")
+ def process(self, pyfile):
if not "/get/" in pyfile.url:
pyfile.url = pyfile.url.replace("/files", "/files/get")
@@ -42,6 +42,7 @@ class UploadingCom(SimpleHoster):
else:
self.handleFree()
+
def handlePremium(self):
postData = {'action': 'get_link',
'code': self.file_info['ID'],
@@ -55,6 +56,7 @@ class UploadingCom(SimpleHoster):
raise Exception("Plugin defect.")
+
def handleFree(self):
m = re.search('<h2>((Daily )?Download Limit)</h2>', self.html)
if m: