xingtai-斗罗大陆のピクチャーはダウンロードします。


import requests
import re
import os
key = "    "
os.mkdir(key)
url = "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="+key
tu_pian_wang_ye = requests.get(url)

# print(tu_pian_wang_ye.text)

# 1.         
dldl = re.findall('"objURL":"(.*?)",',tu_pian_wang_ye.text)

#          
jstm = 0
for i in dldl:
    pc = requests.get(i)

    jstm = jstm+1
    print("--------------     %d   ---------------" % jstm)

    #     
    f = open("%s/text%d.jpg"%(key,jstm), "wb")
    #     
    f.write(pc.content)
    #     
    f.close()





# 200   404  403