diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-10 16:54:05 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-10 16:54:05 +0100 |
commit | 3b64c8c07f2a331db66e6af6b5f617e6630d7b44 (patch) | |
tree | 0b071af35a7677f36895ec1dd8333f4ef56c79d8 /pyload/plugins/container | |
parent | License cleanup (diff) | |
parent | [CaptchaService] New service AdYouLike + AdsCaptcha detect_key fixup (diff) | |
download | pyload-3b64c8c07f2a331db66e6af6b5f617e6630d7b44.tar.xz |
Merge branch 'stable' into 0.4.10
Conflicts:
module/plugins/hooks/ClickAndLoad.py
module/plugins/internal/CaptchaService.py
pyload/plugins/addon/Checksum.py
pyload/plugins/addon/DownloadScheduler.py
pyload/plugins/addon/ExternalScripts.py
pyload/plugins/addon/ExtractArchive.py
pyload/plugins/addon/IRCInterface.py
pyload/plugins/addon/MergeFiles.py
pyload/plugins/addon/MultiHome.py
pyload/plugins/addon/SkipRev.py
pyload/plugins/addon/UnSkipOnFail.py
pyload/plugins/addon/WindowsPhoneToastNotify.py
pyload/plugins/container/CCF.py
pyload/plugins/hook/BypassCaptcha.py
pyload/plugins/hook/Captcha9kw.py
pyload/plugins/hook/CaptchaBrotherhood.py
pyload/plugins/hook/DeathByCaptcha.py
pyload/plugins/hook/ExpertDecoders.py
pyload/plugins/hook/ImageTyperz.py
pyload/plugins/hoster/DlFreeFr.py
pyload/plugins/internal/OCR.py
Diffstat (limited to 'pyload/plugins/container')
-rw-r--r-- | pyload/plugins/container/CCF.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pyload/plugins/container/CCF.py b/pyload/plugins/container/CCF.py index 98533cbd8..a558baa03 100644 --- a/pyload/plugins/container/CCF.py +++ b/pyload/plugins/container/CCF.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- +from __future__ import with_statement + import re from os import makedirs @@ -14,7 +16,7 @@ from pyload.utils import safe_join class CCF(Container): __name__ = "CCF" - __version__ = "0.2" + __version__ = "0.20" __pattern__ = r'.+\.ccf' @@ -35,8 +37,7 @@ class CCF(Container): download_folder = self.config['general']['download_folder'] tempdlc_name = safe_join(download_folder, "tmp_%s.dlc" % pyfile.name) - tempdlc = open(tempdlc_name, "w") - tempdlc.write(re.search(r'<dlc>(.*)</dlc>', tempdlc_content, re.S).group(1)) - tempdlc.close() + with open(tempdlc_name, "w") as tempdlc: + tempdlc.write(re.search(r'<dlc>(.*)</dlc>', tempdlc_content, re.S).group(1)) self.urls = [tempdlc_name] |