import os
import requests
import re
# 新建一个文件夹
wenti = '张学友表情包'
number = 10
if not os.path.exists (wenti):
os.makedirs(wenti)
# 爬取网络图片
url = r'http://image.baidu.com/search/flip?tn=baiduimage&ipn=r&ct=201326592&cl=2&lm=-1&st=-1&fm=result&fr=&sf=1&fmq=1497491098685_R&pv=&ic=0&nc=1&z=&se=1&showtab=0&fb=0&width=&height=&face=0&istype=2&ie=utf-8&ctd=1497491098685%5E00_1519X735&word='
url = url + wenti
get = requests.get(url)
tupian_url = re.findall(r'objURL":"(.*?)",', get.text)
harry -爬取图片
最新推荐文章于 2022-07-11 07:35:00 发布