summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/PastebinCom.py
diff options
context:
space:
mode:
authorGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
committerGravatar lazlev <lazlev@yopmail.com> 2015-08-09 00:50:54 +0200
commitb0ef3f1673e1930916604bb1264ca3a38414bc8d (patch)
treec97936e4d2a4cd6eb1072c65c8a08a7d18816b18 /module/plugins/crypter/PastebinCom.py
parent[XFileSharingPro][XFileSharingProFolder] Added default __pattern__ (diff)
parentFix https://github.com/pyload/pyload/issues/1707 (diff)
downloadpyload-b0ef3f1673e1930916604bb1264ca3a38414bc8d.tar.xz
Merge pull request #1 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/crypter/PastebinCom.py')
-rw-r--r--module/plugins/crypter/PastebinCom.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/module/plugins/crypter/PastebinCom.py b/module/plugins/crypter/PastebinCom.py
index 751b47cc9..c8a7473f1 100644
--- a/module/plugins/crypter/PastebinCom.py
+++ b/module/plugins/crypter/PastebinCom.py
@@ -6,9 +6,10 @@ from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo
class PastebinCom(SimpleCrypter):
__name__ = "PastebinCom"
__type__ = "crypter"
- __version__ = "0.03"
+ __version__ = "0.05"
+ __status__ = "testing"
- __pattern__ = r'http://(?:www\.)?pastebin\.com/\w+'
+ __pattern__ = r'https://(?:www\.)?pastebin\.com/(.+i=)?(?P<ID>\w{8})'
__config__ = [("use_premium" , "bool", "Use premium account if available" , True),
("use_subfolder" , "bool", "Save package to subfolder" , True),
("subfolder_per_pack", "bool", "Create a subfolder for each package", True)]
@@ -18,8 +19,10 @@ class PastebinCom(SimpleCrypter):
__authors__ = [("stickell", "l.stickell@yahoo.it")]
- LINK_PATTERN = r'<div class="de\d+">(https?://[^ <]+)(?:[^<]*)</div>'
- NAME_PATTERN = r'<div class="paste_box_line1" title="(?P<N>.+?)">'
+ URL_REPLACEMENTS = [(__pattern__ + '.*', r'http://www.pastebin.com/\g<ID>')]
+
+ NAME_PATTERN = r'<div class="paste_box_line1" title="(?P<N>.+?)"'
+ LINK_PATTERN = r'<div class="de\d+">(.+?)<'
getInfo = create_getInfo(PastebinCom)