diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-06-11 13:31:01 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-06-11 13:31:01 +0200 |
commit | ace4ced0f245c98f0ded17bed5cf293dca51c5e0 (patch) | |
tree | e55a5d483bd41435e5a07959f85630e25598e209 /Plugins | |
parent | merged (diff) | |
download | pyload-ace4ced0f245c98f0ded17bed5cf293dca51c5e0.tar.xz |
~DLC Support~ , closed #10
Diffstat (limited to 'Plugins')
-rw-r--r-- | Plugins/CCF.py | 18 | ||||
-rw-r--r-- | Plugins/DLC.pyc | bin | 0 -> 3692 bytes |
2 files changed, 9 insertions, 9 deletions
diff --git a/Plugins/CCF.py b/Plugins/CCF.py index 9fe3a8546..e583bfbb3 100644 --- a/Plugins/CCF.py +++ b/Plugins/CCF.py @@ -1,14 +1,14 @@ #!/usr/bin/python # -*- coding: utf-8 -*- -import urllib2 -from module.network.MultipartPostHandler import MultipartPostHandler -import tempfile import os.path import random import re +import tempfile +import urllib2 from Plugin import Plugin +from module.network.MultipartPostHandler import MultipartPostHandler class CCF(Plugin): @@ -36,9 +36,9 @@ class CCF(Plugin): infile = url.replace("\n", "") opener = urllib2.build_opener(MultipartPostHandler) - params = { "src" : "ccf", - "filename" : "test.ccf", - "upload" : open(infile, "rb") } + params = {"src": "ccf", + "filename": "test.ccf", + "upload": open(infile, "rb")} tempdlc_content = opener.open('http://service.jdownloader.net/dlcrypt/getDLC.php', params).read() random.seed() @@ -47,11 +47,11 @@ class CCF(Plugin): delim = '/' else: delim = '\\' - tempdlc_name = tempdir+delim+str(random.randint(0, 100))+'-tmp.dlc' + tempdlc_name = tempdir + delim + str(random.randint(0, 100)) + '-tmp.dlc' while os.path.exists(tempdlc_name): - tempdlc_name = tempfile.gettempdir()+'/'+str(random.randint(0, 100))+'-tmp.dlc' + tempdlc_name = tempfile.gettempdir() + '/' + str(random.randint(0, 100)) + '-tmp.dlc' - tempdlc = open(tempdlc_name,"w") + tempdlc = open(tempdlc_name, "w") tempdlc.write(re.search(r'<dlc>(.*)</dlc>', tempdlc_content, re.DOTALL).group(1)) tempdlc.close diff --git a/Plugins/DLC.pyc b/Plugins/DLC.pyc Binary files differnew file mode 100644 index 000000000..5d4809178 --- /dev/null +++ b/Plugins/DLC.pyc |