代码
# -*- coding: utf-8 -*-
# @Time: 2021/3/31
# @Author: Eritque arcus
# @File: downloadImage.py
import mimetypes
import os
import regex
import requests
if __name__ == '__main__':
p = input("输入hexo的source目录") # image path like D:\hexo\hexo\source
# 去尾
if p.endswith("\\"):
p = p[:len(p) - 1]
image_p = p + "\\images"
post_p = p + "\\_posts"
# 查看博文目录是否存在
if not os.path.exists(post_p):
print