根据图片名称和下载数量进行选择下载,下载的位置在默认路径D://text
源码(只为实现功能,代码未优化,老铁轻喷 )
#!/usr/bin/env python
#coding=utf-8
import base64
import ctypes
import math
import requests
import json
import os
import urllib
from tkinter import *
from tkinter import messagebox
from PIL import ImageTk
from PIL import Image
def getBaiDuPhoto(last_dir,keyword,pNum):
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36",
"referer": "https://image.baidu.com"
}
url = 'https://image.baidu.com/search/acjson?'
# keyword = input("请输入要下载的图片:")
# pNum = input("请输入要下载的数量:")
ii=math.ceil(int(pNum)/60)#向上取整数,循环的次数
zdNum = 60;
ys = 0;
if(int(pNum)<60):
zdNum=pNum
else:
ys = divmod(int(pNum),60)[1]
# 随机数
num = 0
for bl in range(ii):
#最后一次循环,且余数大于0,取相应的数量图片
if(bl==int(ii)-1 and int(ys)>0):
zdNum=ys
param = {
'tn': 'resultjson_com',
'logid': ' 7517080705015306512',
'ipn': 'rj',
'ct': '201326592',
'is': '',
'fp': 'result',
'queryWord': keyword,
'cl': '2',
'lm': '-1',
'ie': 'utf-8',
'oe': 'utf-8',
'adpicid': '',
'st': '',
'z': '',
'ic': '',
'hd': '',
'latest': '',
'copyright': '',
'word': keyword,
's': '',
'se': '',
'tab': '',
'width': '',
'height': '',
'face': '',
'istype': '',
'qc': '',
'nc': '1',
'fr': '',
'expermode': '',
'force': '',
'cg': 'star',
'pn': 60*bl,#pn代表从第几个数据显示
'rn': zdNum,#代表传输多少数据,最大为60
'gsm': '1e',
}
# 将编码形式转换为utf-8
response = requests.get(url=url, headers=headers, params=param)
response.encoding = 'utf-8'
response = response.text
# print(response)
data_s = json.loads(response)
# pprint.pprint(data_s)
data = data_s['data']
# 图片下载地址
# last_dir = "D://text"
dir = last_dir+"/" + keyword
if os.path.exists(last_dir):
if os.path.exists(dir):
print("文件夹已经存在")
else:
os.mkdir(dir)
print(dir + "已经创建成功")
else:
os.mkdir(last_dir)
if os.path.exists(dir):
print("文件夹已经存在")
else:
os.mkdir(dir)
print(dir + "已经创建成功")
# 循环下载图片
for i in range(len(data)):
try:
string=data[i]['thumbURL']
print("正在下载" + string)
f_req = urllib.request.Request(string, headers=headers)
f_url = urllib.request.urlopen(f_req).read()
fs = open(dir + "/" + keyword + str(num) + ".jpg", "wb+")
fs.write(f_url)
fs.close()
num += 1
print(string + "已下载成功")
except KeyError as e:
print('无这个属性')
except AttributeError as e:
print('无这个属性')
except OSError:
print(1)
else:
print(0)
def helloCallBack(E3,E1,E2,b1):
if(E3!="" and E1!=""):
getBaiDuPhoto(E3,E1,E2)
messagebox.showinfo("提示信息","下载完成")
def get_image(filename,width,height):
im = Image.open(filename).resize((width,height))
return ImageTk.PhotoImage(im)
top = Tk()
#调用api设置成由应用程序缩放
ctypes.windll.shcore.SetProcessDpiAwareness(1)
#调用api获得当前的缩放因子
ScaleFactor=ctypes.windll.shcore.GetScaleFactorForDevice(0)
#设置缩放因子
top.tk.call('tk', 'scaling', ScaleFactor/75)
#设置窗口的大小宽x高+偏移量
top.geometry('300x200+500+200')
#设置窗口标题
top.title('爬虫程序--图片下载')
# root.overrideredirect(1)
#设置窗口图标
tmp = open('favicon.ico', 'wb') #创建临时的文件
tmp.write(base64.b64decode("AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/Dg4O/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAA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/wEBAf8BAQH/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8BAQH/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AQEB/xISEv8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wYGBv8MDAz/AAAA/wAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=")) ##把这个one图片解码出来,写入文件中去。
tmp.close()
#设置左上角logo
top.iconbitmap("favicon.ico")
# 创建窗口对象的背景色
canvas_top = Canvas(top,width=500,height=200)
im_top = get_image("wy.ico", 500, 200)
canvas_top.create_image(250,100,image=im_top)
canvas_top.pack()
frame1 = Frame(canvas_top)
frame2 = Frame(canvas_top)
frame3 = Frame(canvas_top)
frame4 = Frame(canvas_top)
L1 = Label(frame1, text="图片名称")
L1.pack(side=LEFT)
E1 = Entry(frame1, bd=5)
E1.pack(side=RIGHT)
L2 = Label(frame2, text="下载数量")
L2.pack(side=LEFT)
#验证输入框是否正整数
def check_digit(content):
if content.isdigit() or content == "":
return True
else:
return False
entry_validate=top.register(check_digit)
E2 = Entry(frame2, bd=5,validate='key',vcmd=(entry_validate,'%P'))
E2.pack(side=RIGHT)
L3 = Label(frame4, text="默认地址:")
L3.pack(side=LEFT)
E3 = Entry(frame4, bd=5)
E3.insert(0, "D://text")
E3.pack(side=RIGHT)
b1 = Button(frame3, text="下载", fg='blue', command = lambda:helloCallBack(E3.get(),E1.get(),E2.get(),b1))
b1.pack()
frame1.pack(padx=1,pady=1)
frame2.pack(padx=10,pady=10)
frame4.pack(padx=10,pady=10)
frame3.pack(padx=10,pady=10)
top.mainloop()
exe程序 包地址:
https://mp.csdn.net/mp_download/manage/download/UpDetailed
源码打包方案:请参考
https://mp.csdn.net/mp_blog/creation/editor/116457830
微信公众号精彩博文:号:wy15010267