diff options
Diffstat (limited to 'module/plugins')
| -rw-r--r-- | module/plugins/container/CCF.py | 18 | ||||
| -rw-r--r-- | module/plugins/decrypter/SerienjunkiesOrg.py | 1 | 
2 files changed, 5 insertions, 14 deletions
| diff --git a/module/plugins/container/CCF.py b/module/plugins/container/CCF.py index 88b567904..12728d022 100644 --- a/module/plugins/container/CCF.py +++ b/module/plugins/container/CCF.py @@ -2,7 +2,6 @@  # -*- coding: utf-8 -*-  import os.path -import random  import re  import tempfile  import urllib2 @@ -36,20 +35,11 @@ class CCF(Plugin):              "upload": open(infile, "rb")}          tempdlc_content = opener.open('http://service.jdownloader.net/dlcrypt/getDLC.php', params).read() -        random.seed() -        tempdir = tempfile.gettempdir() -        if tempdir[0] == '/': -            delim = '/' -        else: -            delim = '\\' -        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 = open(tempdlc_name, "w") +        tempdlc = tempfile.NamedTemporaryFile(delete=False, suffix='.dlc')          tempdlc.write(re.search(r'<dlc>(.*)</dlc>', tempdlc_content, re.DOTALL).group(1)) -        tempdlc.close +        tempdlc.close() -        self.links.append(tempdlc_name) +        self.links.append(tempdlc.name)          return True + diff --git a/module/plugins/decrypter/SerienjunkiesOrg.py b/module/plugins/decrypter/SerienjunkiesOrg.py index af7dc8169..d8396bd0b 100644 --- a/module/plugins/decrypter/SerienjunkiesOrg.py +++ b/module/plugins/decrypter/SerienjunkiesOrg.py @@ -5,6 +5,7 @@ import re  from module.Plugin import Plugin  from module.BeautifulSoup import BeautifulSoup  from module.unescape import unescape +from module.download_thread import CaptchaError  class SerienjunkiesOrg(Plugin):      def __init__(self, parent): | 
