summaryrefslogtreecommitdiffstats
path: root/Plugins
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-11 13:31:01 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2009-06-11 13:31:01 +0200
commitace4ced0f245c98f0ded17bed5cf293dca51c5e0 (patch)
treee55a5d483bd41435e5a07959f85630e25598e209 /Plugins
parentmerged (diff)
downloadpyload-ace4ced0f245c98f0ded17bed5cf293dca51c5e0.tar.xz
~DLC Support~ , closed #10
Diffstat (limited to 'Plugins')
-rw-r--r--Plugins/CCF.py18
-rw-r--r--Plugins/DLC.pycbin0 -> 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
new file mode 100644
index 000000000..5d4809178
--- /dev/null
+++ b/Plugins/DLC.pyc
Binary files differ