summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-08 23:34:54 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-08 23:34:54 +0100
commit29079852619040ef862554ec261b03b34cbed852 (patch)
treed84c81c727d9af6f93b9e2a2d66ecd85b5f26785 /module
parent"New Year" Update: account plugins (diff)
downloadpyload-29079852619040ef862554ec261b03b34cbed852.tar.xz
"New Year" Update: crypter plugins
Diffstat (limited to 'module')
-rw-r--r--module/plugins/crypter/LinkdecrypterCom.py33
-rw-r--r--module/plugins/crypter/SafelinkingNet.py4
-rw-r--r--module/plugins/crypter/XFileSharingProFolder.py15
-rw-r--r--module/plugins/crypter/_1KhDe.py (renamed from module/plugins/crypter/OneKhDe.py)6
-rw-r--r--module/plugins/crypter/_4ChanOrg.py (renamed from module/plugins/crypter/FourChanOrg.py)6
5 files changed, 22 insertions, 42 deletions
diff --git a/module/plugins/crypter/LinkdecrypterCom.py b/module/plugins/crypter/LinkdecrypterCom.py
index 7eb5d3096..7f24784c7 100644
--- a/module/plugins/crypter/LinkdecrypterCom.py
+++ b/module/plugins/crypter/LinkdecrypterCom.py
@@ -7,7 +7,7 @@ from module.plugins.Crypter import Crypter
class LinkdecrypterCom(Crypter):
__name__ = "LinkdecrypterCom"
__type__ = "crypter"
- __version__ = "0.28"
+ __version__ = "0.29"
__pattern__ = r'^unmatchable$'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
@@ -31,40 +31,15 @@ class LinkdecrypterCom(Crypter):
def decrypt(self, pyfile):
- # API not working anymore
- self.urls = self.decryptHTML()
-
-
- def decryptAPI(self):
- get_dict = {"t": "link", "url": self.pyfile.url, "lcache": "1"}
- self.html = self.load('http://linkdecrypter.com/api', get=get_dict)
- if self.html.startswith('http://'):
- return self.html.splitlines()
-
- if self.html == 'INTERRUPTION(PASSWORD)':
- get_dict['pass'] = self.password
-
- self.html = self.load('http://linkdecrypter.com/api', get=get_dict)
- if self.html.startswith('http://'):
- return self.html.splitlines()
-
- self.logError("API", self.html)
- if self.html == 'INTERRUPTION(PASSWORD)':
- self.fail(_("No or incorrect password"))
-
- return None
-
-
- def decryptHTML(self):
retries = 5
- post_dict = {"link_cache": "on", "pro_links": self.pyfile.url, "modo_links": "text"}
+ post_dict = {"link_cache": "on", "pro_links": pyfile.url, "modo_links": "text"}
self.html = self.load('http://linkdecrypter.com/', post=post_dict, cookies=True, decode=True)
while retries:
m = re.search(self.TEXTAREA_PATTERN, self.html, flags=re.S)
if m:
- return [x for x in m.group(1).splitlines() if '[LINK-ERROR]' not in x]
+ self.urls = [x for x in m.group(1).splitlines() if '[LINK-ERROR]' not in x]
m = re.search(self.CAPTCHA_PATTERN, self.html)
if m:
@@ -91,5 +66,3 @@ class LinkdecrypterCom(Crypter):
else:
retries -= 1
self.html = self.load('http://linkdecrypter.com/', cookies=True, decode=True)
-
- return None
diff --git a/module/plugins/crypter/SafelinkingNet.py b/module/plugins/crypter/SafelinkingNet.py
index 709083b51..a56a0a44c 100644
--- a/module/plugins/crypter/SafelinkingNet.py
+++ b/module/plugins/crypter/SafelinkingNet.py
@@ -14,7 +14,7 @@ from module.plugins.internal.CaptchaService import SolveMedia
class SafelinkingNet(Crypter):
__name__ = "SafelinkingNet"
__type__ = "crypter"
- __version__ = "0.11"
+ __version__ = "0.13"
__pattern__ = r'https?://(?:www\.)?safelinking\.net/([pd])/\w+'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
@@ -42,6 +42,8 @@ class SafelinkingNet(Crypter):
else:
postData = {"post-protect": "1"}
+ self.html = self.load(url)
+
if "link-password" in self.html:
postData['link-password'] = self.getPassword()
diff --git a/module/plugins/crypter/XFileSharingProFolder.py b/module/plugins/crypter/XFileSharingProFolder.py
index 10e4d8c83..5ad9f7678 100644
--- a/module/plugins/crypter/XFileSharingProFolder.py
+++ b/module/plugins/crypter/XFileSharingProFolder.py
@@ -8,7 +8,7 @@ from module.plugins.internal.XFSCrypter import XFSCrypter, create_getInfo
class XFileSharingProFolder(XFSCrypter):
__name__ = "XFileSharingProFolder"
__type__ = "crypter"
- __version__ = "0.03"
+ __version__ = "0.04"
__pattern__ = r'^unmatchable$'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
@@ -30,21 +30,26 @@ class XFileSharingProFolder(XFSCrypter):
self.__pattern__ = self.core.pluginManager.crypterPlugins[self.__name__]['pattern']
- self.HOSTER_DOMAIN = re.match(self.__pattern__, self.pyfile.url).group(1).lower()
- self.HOSTER_NAME = "".join([str.capitalize() for str in self.HOSTER_DOMAIN.split('.')])
+ self.HOSTER_DOMAIN = re.match(self.__pattern__, self.pyfile.url).group("DOMAIN").lower()
+ self.HOSTER_NAME = "".join([part.capitalize() for part in re.split(r'(\.|\d+)', self.HOSTER_DOMAIN) if part != '.'])
+
+ if self.HOSTER_NAME[0].isdigit():
+ self.HOSTER_NAME = '_' + self.HOSTER_NAME
account = self.core.accountManager.getAccountPlugin(self.HOSTER_NAME)
if account and account.canUse():
self.account = account
+
elif self.account:
self.account.HOSTER_DOMAIN = self.HOSTER_DOMAIN
+
else:
return
self.user, data = self.account.selectAccount()
- self.req = self.account.getAccountRequest(self.user)
- self.premium = self.account.isPremium(self.user)
+ self.req = self.account.getAccountRequest(self.user)
+ self.premium = self.account.isPremium(self.user)
getInfo = create_getInfo(XFileSharingProFolder)
diff --git a/module/plugins/crypter/OneKhDe.py b/module/plugins/crypter/_1KhDe.py
index cfb084da8..c8ac3020c 100644
--- a/module/plugins/crypter/OneKhDe.py
+++ b/module/plugins/crypter/_1KhDe.py
@@ -6,10 +6,10 @@ from module.unescape import unescape
from module.plugins.Crypter import Crypter
-class OneKhDe(Crypter):
- __name__ = "OneKhDe"
+class _1KhDe(Crypter):
+ __name__ = "1KhDe"
__type__ = "crypter"
- __version__ = "0.10"
+ __version__ = "0.11"
__pattern__ = r'http://(?:www\.)?1kh\.de/f/'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),
diff --git a/module/plugins/crypter/FourChanOrg.py b/module/plugins/crypter/_4ChanOrg.py
index d6c5c86cc..a5e815639 100644
--- a/module/plugins/crypter/FourChanOrg.py
+++ b/module/plugins/crypter/_4ChanOrg.py
@@ -7,10 +7,10 @@ import re
from module.plugins.Crypter import Crypter
-class FourChanOrg(Crypter):
- __name__ = "FourChanOrg"
+class _4ChanOrg(Crypter):
+ __name__ = "4ChanOrg"
__type__ = "crypter"
- __version__ = "0.30"
+ __version__ = "0.31"
__pattern__ = r'http://(?:www\.)?boards\.4chan\.org/\w+/res/(\d+)'
__config__ = [("use_subfolder", "bool", "Save package to subfolder", True),