扒图

import requests
import json
import urllib

def getSogouImag(path):
    imgs = requests.get('https://pic.xx.com/napi/pc/searchList?mode=13&dm=4&cwidth=1920&cheight=1080&tagQSign=%E4%BA%8C%E6%AC%A1%E5%85%83,31edb1d9%7C%E5%94%AF%E7%BE%8E,5adca9b9&start=0&xml_len=48&query=%E7%94%B5%E8%84%91%E5%A3%81%E7%BA%B8&st=189')
    jd = json.loads(imgs.text)
    jd = jd['data']['items']
    imgs_url = []
    for j in jd:
        imgs_url.append(j['oriPicUrl'])
    print(imgs_url)
    m = 0
    for img_url in imgs_url:
        urllib.request.urlretrieve(img_url,path+str(m)+'.jpg')
        m = m + 1
    print('Download complete!')

getSogouImag('d:/壁纸2/')

 

上一篇:京东自营和POP如何修改主账号安全验证手机号


下一篇:jd-gui或jad反编译工具bug