diff options
author | fragonib <devnull@localhost> | 2011-06-05 16:24:21 +0200 |
---|---|---|
committer | fragonib <devnull@localhost> | 2011-06-05 16:24:21 +0200 |
commit | 2c3b64a41b48f52cc721679cb108dd378cfbaf2b (patch) | |
tree | 8b626eee93fa310dbccc1562225272eac476222e /module/plugins/crypter | |
parent | closed #323 (diff) | |
download | pyload-2c3b64a41b48f52cc721679cb108dd378cfbaf2b.tar.xz |
Use new logging functions
Diffstat (limited to 'module/plugins/crypter')
-rw-r--r-- | module/plugins/crypter/LinkSaveIn.py | 36 | ||||
-rw-r--r-- | module/plugins/crypter/NCryptIn.py | 40 | ||||
-rw-r--r-- | module/plugins/crypter/NetfolderIn.py | 14 | ||||
-rw-r--r-- | module/plugins/crypter/RelinkUs.py | 20 | ||||
-rw-r--r-- | module/plugins/crypter/ShareLinksBiz.py | 46 |
5 files changed, 78 insertions, 78 deletions
diff --git a/module/plugins/crypter/LinkSaveIn.py b/module/plugins/crypter/LinkSaveIn.py index 5a72b750a..ac64acf3e 100644 --- a/module/plugins/crypter/LinkSaveIn.py +++ b/module/plugins/crypter/LinkSaveIn.py @@ -64,24 +64,24 @@ class LinkSaveIn(Crypter): def isOnline(self):
if "<big>Error 404 - Folder not found!</big>" in self.html:
- self.log.debug("%s: File not found" % self.__name__)
+ self.logDebug("File not found")
return False
return True
def isPasswordProtected(self):
if re.search(r'''<input.*?type="password"''', self.html):
- self.log.debug("%s: Links are password protected" % self.__name__)
+ self.logDebug("Links are password protected")
return True
def isCaptchaProtected(self):
if "<b>Captcha:</b>" in self.html:
- self.log.debug("%s: Links are captcha protected" % self.__name__)
+ self.logDebug("Links are captcha protected")
return True
return False
def unlockPasswordProtection(self):
password = self.getPassword()
- self.log.debug("%s: Submitting password [%s] for protected links" % (self.__name__, password))
+ self.logDebug("Submitting password [%s] for protected links" % password)
post = {"id": self.fileid, "besucherpasswort": password, 'login': 'submit'}
self.html = self.load(self.pyfile.url, post=post)
@@ -94,17 +94,17 @@ class LinkSaveIn(Crypter): def getPackageInfo(self):
name = self.pyfile.package().name
folder = self.pyfile.package().folder
- self.log.debug("%s: Defaulting to pyfile name [%s] and folder [%s] for package" % (self.__name__, name, folder))
+ self.logDebug("Defaulting to pyfile name [%s] and folder [%s] for package" % (name, folder))
return name, folder
def handleErrors(self):
if "The visitorpassword you have entered is wrong" in self.html:
- self.log.debug("%s: Incorrect password, please set right password on 'Edit package' form and retry" % self.__name__)
+ self.logDebug("Incorrect password, please set right password on 'Edit package' form and retry")
self.fail("Incorrect password, please set right password on 'Edit package' form and retry")
if self.captcha:
if "Wrong code. Please retry" in self.html:
- self.log.debug("%s: Invalid captcha, retrying" % self.__name__)
+ self.logDebug("Invalid captcha, retrying")
self.invalidCaptcha()
self.retry()
else:
@@ -112,36 +112,36 @@ class LinkSaveIn(Crypter): def handleWebLinks(self):
package_links = []
- self.log.debug("%s: Handling Web links" % self.__name__)
+ self.logDebug("Handling Web links")
#@TODO: Gather paginated web links
pattern = r'<a href="http://linksave\.in/(\w{43})"'
ids = re.findall(pattern, self.html)
- self.log.debug("%s: Decrypting %d Web links" % (self.__name__, len(ids)))
+ self.logDebug("Decrypting %d Web links" % len(ids))
for i, id in enumerate(ids):
try:
webLink = "http://linksave.in/%s" % id
- self.log.debug("%s: Decrypting Web link %d, %s" % (self.__name__, i+1, webLink))
+ self.logDebug("Decrypting Web link %d, %s" % (i+1, webLink))
fwLink = "http://linksave.in/fw-%s" % id
response = self.load(fwLink)
jscode = re.findall(r'<script type="text/javascript">(.*)</script>', response)[-1]
jseval = self.js.eval("document = { write: function(e) { return e; } }; %s" % jscode)
dlLink = re.search(r'http://linksave\.in/dl-\w+', jseval).group(0)
- self.log.debug("%s: JsEngine returns value [%s] for redirection link" % (self.__name__, dlLink))
+ self.logDebug("JsEngine returns value [%s] for redirection link" % dlLink)
response = self.load(dlLink)
link = unescape(re.search(r'<iframe src="(.+?)"', response).group(1))
package_links.append(link)
except Exception, detail:
- self.log.debug("%s: Error decrypting Web link %s, %s" % (self.__name__, webLink, detail))
+ self.logDebug("Error decrypting Web link %s, %s" % (webLink, detail))
return package_links
def handleContainers(self):
package_links = []
- self.log.debug("%s: Handling Container links" % self.__name__)
+ self.logDebug("Handling Container links")
pattern = r"\('(?:rsdf|ccf|dlc)_link'\).href=unescape\('(.*?\.(?:rsdf|ccf|dlc))'\)"
containersLinks = re.findall(pattern, self.html)
- self.log.debug("%s: Decrypting %d Container links" % (self.__name__, len(containersLinks)))
+ self.logDebug("Decrypting %d Container links" % len(containersLinks))
for containerLink in containersLinks:
link = "http://linksave.in/%s" % unescape(containerLink)
package_links.append(link)
@@ -149,7 +149,7 @@ class LinkSaveIn(Crypter): def handleCNL2(self):
package_links = []
- self.log.debug("%s: Handling CNL2 links" % self.__name__)
+ self.logDebug("Handling CNL2 links")
if 'cnl2_load' in self.html:
try:
@@ -171,14 +171,14 @@ class LinkSaveIn(Crypter): vcrypted = re.findall(crypted_re, self.html)
# Log and return
- self.log.debug("%s: Detected %d crypted blocks" % (self.__name__, len(vcrypted)))
+ self.logDebug("Detected %d crypted blocks" % len(vcrypted))
return vcrypted, vjk
def _getLinks(self, crypted, jk):
# Get key
jreturn = self.js.eval("%s f()" % jk)
- self.log.debug("%s: JsEngine returns value [%s]" % (self.__name__, jreturn))
+ self.logDebug("JsEngine returns value [%s]" % jreturn)
key = binascii.unhexlify(jreturn)
# Decode crypted
@@ -196,5 +196,5 @@ class LinkSaveIn(Crypter): links = filter(lambda x: x != "", links)
# Log and return
- self.log.debug("%s: Package has %d links" % (self.__name__, len(links)))
+ self.logDebug("Package has %d links" % len(links))
return links
diff --git a/module/plugins/crypter/NCryptIn.py b/module/plugins/crypter/NCryptIn.py index 4d9426481..a8eaac631 100644 --- a/module/plugins/crypter/NCryptIn.py +++ b/module/plugins/crypter/NCryptIn.py @@ -68,13 +68,13 @@ class NCryptIn(Crypter): def isOnline(self):
if "Your folder does not exist" in self.cleanedHtml:
- self.log.debug("%s: File not found" % self.__name__)
+ self.logDebug("File not found")
return False
return True
def isProtected(self):
if re.search(r'''<form.*?name.*?protected.*?>''', self.cleanedHtml):
- self.log.debug("%s: Links are protected" % self.__name__)
+ self.logDebug("Links are protected")
return True
return False
@@ -84,11 +84,11 @@ class NCryptIn(Crypter): if m is not None:
title = m[-1].strip()
name = folder = title
- self.log.debug("%s: Found name [%s] and folder [%s] in package info" % (self.__name__, name, folder))
+ self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder))
else:
name = self.package.name
folder = self.package.folder
- self.log.debug("%s: Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (self.__name__, name, folder))
+ self.logDebug("Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (name, folder))
return name, folder
def unlockProtection(self):
@@ -100,23 +100,23 @@ class NCryptIn(Crypter): # Submit package password
if "password" in form:
password = self.getPassword()
- self.log.debug("%s: Submitting password [%s] for protected links" % (self.__name__, password))
+ self.logDebug("Submitting password [%s] for protected links" % password)
postData['password'] = password
# Resolve anicaptcha
if "anicaptcha" in form:
self.captcha = True
- self.log.debug("%s: Captcha protected, resolving captcha" % self.__name__)
+ self.logDebug("Captcha protected, resolving captcha")
captchaUri = re.search(r'src="(/temp/anicaptcha/[^"]+)', form).group(1)
captcha = self.decryptCaptcha("http://ncrypt.in" + captchaUri)
- self.log.debug("%s: Captcha resolved [%s]" % (self.__name__, captcha))
+ self.logDebug("Captcha resolved [%s]" % captcha)
postData['captcha'] = captcha
# Resolve recaptcha
if "recaptcha" in form:
self.captcha = True
id = re.search(r'\?k=(.*?)"', form).group(1)
- self.log.debug("%s: Resolving ReCaptcha with key [%s]" % (self.__name__, id))
+ self.logDebug("Resolving ReCaptcha with key [%s]" % id)
recaptcha = ReCaptcha(self)
challenge, code = recaptcha.challenge(id)
postData['recaptcha_challenge_field'] = challenge
@@ -129,12 +129,12 @@ class NCryptIn(Crypter): def handleErrors(self):
if "This password is invalid!" in self.cleanedHtml:
- self.log.debug("%s: Incorrect password, please set right password on 'Edit package' form and retry" % self.__name__)
+ self.logDebug("Incorrect password, please set right password on 'Edit package' form and retry")
self.fail("Incorrect password, please set right password on 'Edit package' form and retry")
if self.captcha:
if "The securitycheck was wrong!" in self.cleanedHtml:
- self.log.debug("%s: Invalid captcha, retrying" % self.__name__)
+ self.logDebug("Invalid captcha, retrying")
self.invalidCaptcha()
self.retry()
else:
@@ -142,28 +142,28 @@ class NCryptIn(Crypter): def handleWebLinks(self):
package_links = []
- self.log.debug("%s: Handling Web links" % self.__name__)
+ self.logDebug("Handling Web links")
pattern = r"(http://ncrypt\.in/link-.*?=)"
links = re.findall(pattern, self.html)
- self.log.debug("%s: Decrypting %d Web links" % (self.__name__, len(links)))
+ self.logDebug("Decrypting %d Web links" % len(links))
for i, link in enumerate(links):
- self.log.debug("%s: Decrypting Web link %d, %s" % (self.__name__, i+1, link))
+ self.logDebug("Decrypting Web link %d, %s" % (i+1, link))
try:
url = link.replace("link-", "frame-")
link = self.load(url, just_header=True)['location']
package_links.append(link)
except Exception, detail:
- self.log.debug("%s: Error decrypting Web link %s, %s" % (self.__name__, link, detail))
+ self.logDebug("Error decrypting Web link %s, %s" % (link, detail))
return package_links
def handleContainers(self):
package_links = []
- self.log.debug("%s: Handling Container links" % self.__name__)
+ self.logDebug("Handling Container links")
pattern = r"/container/(rsdf|dlc|ccf)/([a-z0-9]+)"
containersLinks = re.findall(pattern, self.html)
- self.log.debug("%s: Decrypting %d Container links" % (self.__name__, len(containersLinks)))
+ self.logDebug("Decrypting %d Container links" % len(containersLinks))
for containerLink in containersLinks:
link = "http://ncrypt.in/container/%s/%s.%s" % (containerLink[0], containerLink[1], containerLink[0])
package_links.append(link)
@@ -171,7 +171,7 @@ class NCryptIn(Crypter): def handleCNL2(self):
package_links = []
- self.log.debug("%s: Handling CNL2 links" % self.__name__)
+ self.logDebug("Handling CNL2 links")
if 'cnl2_output' in self.cleanedHtml:
try:
@@ -195,14 +195,14 @@ class NCryptIn(Crypter): vcrypted = re.findall(crypted_re, self.html)
# Log and return
- self.log.debug("%s: Detected %d crypted blocks" % (self.__name__, len(vcrypted)))
+ self.logDebug("Detected %d crypted blocks" % len(vcrypted))
return vcrypted, vjk
def _getLinks(self, crypted, jk):
# Get key
jreturn = self.js.eval("%s f()" % jk)
- self.log.debug("%s: JsEngine returns value [%s]" % (self.__name__, jreturn))
+ self.logDebug("JsEngine returns value [%s]" % jreturn)
key = binascii.unhexlify(jreturn)
# Decode crypted
@@ -220,5 +220,5 @@ class NCryptIn(Crypter): links = filter(lambda x: x != "", links)
# Log and return
- self.log.debug("%s: Block has %d links" % (self.__name__, len(links)))
+ self.logDebug("Block has %d links" % len(links))
return links
\ No newline at end of file diff --git a/module/plugins/crypter/NetfolderIn.py b/module/plugins/crypter/NetfolderIn.py index 3a1e4e331..c8110ef6b 100644 --- a/module/plugins/crypter/NetfolderIn.py +++ b/module/plugins/crypter/NetfolderIn.py @@ -36,7 +36,7 @@ class NetfolderIn(Crypter): def isPasswordProtected(self): if '<input type="password" name="password"' in self.html: - self.log.debug("%s: Links are password protected" % self.__name__) + self.logDebug("Links are password protected") return True return False @@ -47,19 +47,19 @@ class NetfolderIn(Crypter): m = re.match(self.__pattern__, self.pyfile.url) id = max(m.group('id1'), m.group('id2')) except AttributeError: - self.log.debug("%s: Unable to get package id from url [%s]" % (self.__name__, url)) + self.logDebug("Unable to get package id from url [%s]" % url) return url = "http://netfolder.in/folder.php?folder_id=" + id password = self.getPassword() # Submit package password post = { 'password' : password, 'save' : 'Absenden' } - self.log.debug("%s: Submitting password [%s] for protected links with id [%s]" % (self.__name__, password, id)) + self.logDebug("Submitting password [%s] for protected links with id [%s]" % (password, id)) html = self.load(url, {}, post) # Check for invalid password if '<div class="InPage_Error">' in html: - self.log.debug("%s: Incorrect password, please set right password on Edit package form and retry" % self.__name__) + self.logDebug("Incorrect password, please set right password on Edit package form and retry") return None return html @@ -70,16 +70,16 @@ class NetfolderIn(Crypter): m = re.search(title_re, self.html) if m is not None: name = folder = m.group('title') - self.log.debug("%s: Found name [%s] and folder [%s] in package info" % (self.__name__, name, folder)) + self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder)) return name, folder else: name = self.pyfile.package().name folder = self.pyfile.package().folder - self.log.debug("%s: Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (self.__name__, name, folder)) + self.logDebug("Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (name, folder)) return name, folder def getLinks(self): links = re.search(r'name="list" value="(.*?)"', self.html).group(1).split(",") - self.log.debug("%s: Package has %d links" % (self.__name__, len(links))) + self.logDebug("Package has %d links" % len(links)) return links diff --git a/module/plugins/crypter/RelinkUs.py b/module/plugins/crypter/RelinkUs.py index 4376a8c8d..c2bc6c589 100644 --- a/module/plugins/crypter/RelinkUs.py +++ b/module/plugins/crypter/RelinkUs.py @@ -54,13 +54,13 @@ class RelinkUs(Crypter): def isOnline(self): if "sorry.png" in self.html: - self.log.debug("%s: File not found" % self.__name__) + self.logDebug("File not found") return False return True def isPasswordProtected(self): if "<h1>Container Protection</h1>" in self.html: - self.log.debug("%s: Links are password protected" % self.__name__) + self.logDebug("Links are password protected") return True return False @@ -72,7 +72,7 @@ class RelinkUs(Crypter): url = self.pyfile.url m = re.match(self.__pattern__, url) if m is None: - self.log.debug("%s: Unable to get package id from url [%s]" % (self.__name__, url)) + self.logDebug("Unable to get package id from url [%s]" % url) return id = m.group('id') password = self.getPassword() @@ -80,12 +80,12 @@ class RelinkUs(Crypter): # Submit package password url = "http://www.relink.us/container_password.php?id=" + id post = { '#' : '', 'password' : password, 'pw' : 'submit' } - self.log.debug("%s: Submitting password [%s] for protected links with id [%s]" % (self.__name__, password, id)) + self.logDebug("Submitting password [%s] for protected links with id [%s]" % (password, id)) html = self.load(url, {}, post) # Check for invalid password if "An error occurred!" in html: - self.log.debug("%s: Incorrect password, please set right password on Add package form and retry" % self.__name__) + self.logDebug("Incorrect password, please set right password on Add package form and retry") return None else: return html @@ -95,12 +95,12 @@ class RelinkUs(Crypter): m = re.search(title_re, self.html) if m is not None: name = folder = m.group('title') - self.log.debug("%s: Found name [%s] and folder [%s] in package info" % (self.__name__, name, folder)) + self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder)) return name, folder else: name = self.package.name folder = self.package.folder - self.log.debug("%s: Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (self.__name__, name, folder)) + self.logDebug("Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (name, folder)) return name, folder def getCipherParams(self): @@ -119,14 +119,14 @@ class RelinkUs(Crypter): crypted = vars[RelinkUs._CRYPTED_KEY_] # Log and return - self.log.debug("%s: Javascript cipher key function [%s]" % (self.__name__, jk)) + self.logDebug("Javascript cipher key function [%s]" % jk) return crypted, jk def getLinks(self, crypted, jk): # Get key jreturn = self.js.eval("%s f()" % jk) - self.log.debug("%s: JsEngine returns value key=[%s]" % (self.__name__, jreturn)) + self.logDebug("JsEngine returns value key=[%s]" % jreturn) key = binascii.unhexlify(jreturn) # Decode crypted @@ -144,5 +144,5 @@ class RelinkUs(Crypter): links = filter(lambda x: x != "", links) # Log and return - self.log.debug("%s: Package has %d links" % (self.__name__, len(links))) + self.logDebug("Package has %d links" % len(links)) return links diff --git a/module/plugins/crypter/ShareLinksBiz.py b/module/plugins/crypter/ShareLinksBiz.py index fef10b7f1..7676e9cbf 100644 --- a/module/plugins/crypter/ShareLinksBiz.py +++ b/module/plugins/crypter/ShareLinksBiz.py @@ -64,19 +64,19 @@ class ShareLinksBiz(Crypter): def isOnline(self):
if "No usable content was found" in self.html:
- self.log.debug("%s: File not found" % self.__name__)
+ self.logDebug("File not found")
return False
return True
def isPasswordProtected(self):
if re.search(r'''<form.*?id="passwordForm".*?>''', self.html):
- self.log.debug("%s: Links are protected" % self.__name__)
+ self.logDebug("Links are protected")
return True
return False
def isCaptchaProtected(self):
if '<map id="captchamap"' in self.html:
- self.log.debug("%s: Links are captcha protected" % self.__name__)
+ self.logDebug("Links are captcha protected")
return True
return False
@@ -87,27 +87,27 @@ class ShareLinksBiz(Crypter): def unlockPasswordProtection(self):
password = self.getPassword()
- self.log.debug("%s: Submitting password [%s] for protected links" % (self.__name__, password))
- post = {"password": self.package.password, 'login': 'Submit form'}
+ self.logDebug("Submitting password [%s] for protected links" % password)
+ post = {"password": password, 'login': 'Submit form'}
url = self.baseUrl + '/' + self.fileId
self.html = self.load(url, post=post)
def unlockCaptchaProtection(self):
# Get captcha map
captchaMap = self._getCaptchaMap()
- self.log.debug("%s: Captcha map with [%d] positions" % (self.__name__, len(captchaMap.keys())))
+ self.logDebug("Captcha map with [%d] positions" % len(captchaMap.keys()))
# Request user for captcha coords
m = re.search(r'<img src="/captcha.gif\?d=(.*?)&PHPSESSID=(.*?)&legend=1"', self.html)
captchaUrl = self.baseUrl + '/captcha.gif?d=%s&PHPSESSID=%s' % (m.group(1), m.group(2))
- self.log.debug("%s: Waiting user for correct position" % self.__name__)
+ self.logDebug("Waiting user for correct position")
coords = self.decryptCaptcha(captchaUrl, forceUser=True, imgtype="gif", result_type='positional')
- self.log.debug("%s: Captcha resolved, coords [%s]" % (self.__name__, str(coords)))
+ self.logDebug("Captcha resolved, coords [%s]" % str(coords))
# Resolve captcha
href = self._resolveCoords(coords, captchaMap)
if href is None:
- self.log.debug("%s: Invalid captcha resolving, retrying" % self.__name__)
+ self.logDebug("Invalid captcha resolving, retrying")
self.invalidCaptcha()
self.setWait(5, False)
self.wait()
@@ -132,12 +132,12 @@ class ShareLinksBiz(Crypter): def handleErrors(self):
if "The inserted password was wrong" in self.html:
- self.log.debug("%s: Incorrect password, please set right password on 'Edit package' form and retry" % self.__name__)
+ self.logDebug("Incorrect password, please set right password on 'Edit package' form and retry")
self.fail("Incorrect password, please set right password on 'Edit package' form and retry")
if self.captcha:
if "Your choice was wrong" in self.html:
- self.log.debug("%s: Invalid captcha, retrying" % self.__name__)
+ self.logDebug("Invalid captcha, retrying")
self.invalidCaptcha()
self.setWait(5)
self.wait()
@@ -151,24 +151,24 @@ class ShareLinksBiz(Crypter): if m is not None:
title = m.group(1).strip()
name = folder = title
- self.log.debug("%s: Found name [%s] and folder [%s] in package info" % (self.__name__, name, folder))
+ self.logDebug("Found name [%s] and folder [%s] in package info" % (name, folder))
else:
name = self.package.name
folder = self.package.folder
- self.log.debug("%s: Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (self.__name__, name, folder))
+ self.logDebug("Package info not found, defaulting to pyfile name [%s] and folder [%s]" % (name, folder))
return name, folder
def handleWebLinks(self):
package_links = []
- self.log.debug("%s: Handling Web links" % self.__name__)
+ self.logDebug("Handling Web links")
#@TODO: Gather paginated web links
pattern = r"javascript:_get\('(.*?)', \d+, ''\)"
ids = re.findall(pattern, self.html)
- self.log.debug("%s: Decrypting %d Web links" % (self.__name__, len(ids)))
+ self.logDebug("Decrypting %d Web links" % len(ids))
for i, id in enumerate(ids):
try:
- self.log.debug("%s: Decrypting Web link %d, [%s]" % (self.__name__, i+1, id))
+ self.logDebug("Decrypting Web link %d, [%s]" % (i+1, id))
dwLink = self.baseUrl + "/get/lnk/" + id
response = self.load(dwLink)
code = re.search(r'frm/(\d+)', response).group(1)
@@ -178,19 +178,19 @@ class ShareLinksBiz(Crypter): jscode = self.js.eval("f = %s" % jscode)
jslauncher = "window=''; parent={frames:{Main:{location:{href:''}}},location:''}; %s; parent.frames.Main.location.href"
dlLink = self.js.eval(jslauncher % jscode)
- self.log.debug("%s: JsEngine returns value [%s] for redirection link" % (self.__name__, dlLink))
+ self.logDebug("JsEngine returns value [%s] for redirection link" % dlLink)
package_links.append(dlLink)
except Exception, detail:
- self.log.debug("%s: Error decrypting Web link [%s], %s" % (self.__name__, id, detail))
+ self.logDebug("Error decrypting Web link [%s], %s" % (id, detail))
return package_links
def handleContainers(self):
package_links = []
- self.log.debug("%s: Handling Container links" % self.__name__)
+ self.logDebug("Handling Container links")
pattern = r"javascript:_get\('(.*?)', 0, '(rsdf|ccf|dlc)'\)"
containersLinks = re.findall(pattern, self.html)
- self.log.debug("%s: Decrypting %d Container links" % (self.__name__, len(containersLinks)))
+ self.logDebug("Decrypting %d Container links" % len(containersLinks))
for containerLink in containersLinks:
link = "%s/get/%s/%s" % (self.baseUrl, containerLink[1], containerLink[0])
package_links.append(link)
@@ -198,7 +198,7 @@ class ShareLinksBiz(Crypter): def handleCNL2(self):
package_links = []
- self.log.debug("%s: Handling CNL2 links" % self.__name__)
+ self.logDebug("Handling CNL2 links")
if '/lib/cnl2/ClicknLoad.swf' in self.html:
try:
@@ -233,7 +233,7 @@ class ShareLinksBiz(Crypter): # Get key
jreturn = self.js.eval("%s f()" % jk)
- self.log.debug("%s: JsEngine returns value [%s]" % (self.__name__, jreturn))
+ self.logDebug("JsEngine returns value [%s]" % jreturn)
key = binascii.unhexlify(jreturn)
# Decode crypted
@@ -251,5 +251,5 @@ class ShareLinksBiz(Crypter): links = filter(lambda x: x != "", links)
# Log and return
- self.log.debug("%s: Block has %d links" % (self.__name__, len(links)))
+ self.logDebug("Block has %d links" % len(links))
return links
\ No newline at end of file |