import os
import requests


class OutPutUse(object):
    def __init__(self):
        self.real_download = True
        self.save_root_dir = 'output'

    def download_and_save(self, url, mj_name):
        print('正在下载图片:', mj_name, url)
        if self.real_download is False:
            return
        save_dir = self.save_root_dir + os.path.sep + mj_name
        if os.path.exists(save_dir) is False:
            os.makedirs(save_dir)
        save_file = save_dir + os.path.sep + url.split("/")[-1]

        if os.path.exists(save_file):
            print('本地已经存在该图片:', mj_name, url)
            return
        try:
            content = requests.get(url, timeout=60).content
            with open(save_file, "wb") as file_input:
                file_input.write(content)
        except Exception:
            print('#ERROR# 下载[%s]的图片:%s出错！', mj_name, url)
@@ -817,33 +817,51 @@
 t('#
-ERROR# %E4%B8%8B%E8%BD%BD%5B%25s%5D
+download_and_save# %E4%B8%8B%E8%BD%BD%7B0%7D
 %E7%9A%84%E5%9B%BE%E7%89%87:
-%25s
+%7B1%7D
 %E5%87%BA%E9%94%99%EF%BC%81'
-, 
+.format(
 mj_n
@@ -857,20 +857,21 @@
 format(mj_name, url)
+)

fix some bug.