【Web_自动化测试_Python3_webdriver_etree_批量下载京东图片】通过地址抓取静态网页+解析标题和链接+通过链接批量下载图片

import time

import requests
import re, sys, io, os, csv, random

from lxml import etree
from selenium import webdriver
from selenium.webdriver.common.by import By


class Test():
    """
    https://registry.npmmirror.com/binary.html?path=chromedriver/
    """

    def __init__(self):
        sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='gb18030')
        self.base_url = ""
        self.proxies = {"http": None, "https": None}
        self.headers = {
            "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36"
        }

    def down_picture(self, pic_path, pic_name, pic_url):
        try:
            res_pic = requests.get(url=pic_url, headers=self.headers, timeout=10, proxies=self.proxies)  #
            if not os.path.exists(pic_path):
                os.makedirs(pic_path)
            pic_dir = pic_path + "/" + pic_name + '.jpg'
            fp = open(pic_dir, 'wb+')
            fp.write(res_pic.content)
            fp.close()
            print('下载成功:' + str(pic_url))
            return pic_name + ".jpg"
        except requests.exceptions.ConnectionError:
            print('下载失败:' + str(pic_url))

    def get_selenium_html(self, basic_url="https://search.jd.com/Search?keyword=%E5%8F%A3%E7%BA%A2"):
        self.driver = webdriver.Chrome()
        self.driver.implicitly_wait(10)
        self.driver.maximize_window()
        driver = self.driver
        driver.get(url=basic_url)
        cur_title = driver.title.strip().replace(" ", "")
        print(f"Title:{cur_title}")
        for i in range(20):
            driver.execute_script('window.scrollBy(0,300)')  # 前面左右,后面上下(-500, 500)
            time.sleep(1)
            print(f"{i}.滚动{i}次")
        show_location = self.driver.find_element(by=By.XPATH, value='//*[text()="下一页"]')
        self.driver.execute_script("arguments[0].scrollIntoView(false);", show_location)
        # input("开始加载页面...")
        print("开始加载页面...")
        res_html = driver.find_element(by=By.XPATH, value="//*").get_attribute("outerHTML")
        real_name = cur_title
        root_path = f"./测试图片/{real_name}/html"
        if not os.path.exists(root_path):
            os.makedirs(root_path)
        file_name = f"{root_path}/{real_name}.html"
        with open(file_name, "wb") as f:
            f.write(res_html.encode())
        return file_name

    def read_html_down_picture_by_re(self):
        """
        正则匹配不到名字,放弃使用。
        """
        root_path = f"./测试图片/"
        file_name = r"C:\MyFiles\Mydemo\Myproject\api_autoTest_pytest\pytest-auto-api2-master\test_basic\demo\测试图片\香水-商品搜索-京东\香水-商品搜索-京东.html"
        with open(file=file_name, mode="r", encoding="utf-8") as f:
            all_read = f.read().encode('gbk', 'ignore').decode('gbk')
            pictur_url = """img=\"//(.*?)\""""
            src_list = re.findall(pictur_url, all_read)
            # print(len(src_list), src_list)
            for i in src_list[0:]:
                print(len(i), f"//{i}")
                ii = f"//{i}"
                # if "360buy" in i:
                self.down_picture(pic_path=f"{root_path}/picture/", pic_name=str(src_list.index(i)), pic_url="https:" + ii)

    def read_html_down_picture_by_xpath(self, file_name=None):
        root_path = f"./测试图片/"
        with open(file_name, "r", encoding="utf-8") as f:
            all_read = f.read().encode('utf-8', 'ignore').decode('utf-8')
        html = etree.HTML(all_read, etree.HTMLParser())
        main_xpath = '//*[@id="J_goodsList"]/ul/li'
        html_list = html.xpath(main_xpath)
        res_list = []
        title_xpath = "_".join(html.xpath("//title//text()")).strip().replace(" ", "")
        print(f"累计加载图片:{len(html_list)},页面名称:{title_xpath}")
        for i in range(1, len(html_list)):
            # for i in range(1, 2):
            try:
                name_xpath = f'''//*[@id="J_goodsList"]/ul/li[{i}]//div[@class="p-name p-name-type-2"]//em//text()'''
                name = html.xpath(name_xpath)
                price_xpath = f'''//*[@id="J_goodsList"]/ul/li[{i}]//div[@class="p-price"]//i//text()'''
                price = html.xpath(price_xpath)
                url_xpath = f'''//*[@id="J_goodsList"]/ul/li[{i}]//div[@class="p-img"]//img/@src'''
                url = html.xpath(url_xpath)
            except Exception as e:
                print(i)
            name = "_".join([i.strip().replace(" ", "").replace("/", "_").replace(",", "_").replace("*", "_") for i in name])
            price = "_".join([i.strip().replace(" ", "") for i in price])
            url = "_".join([i.strip() for i in url])
            one_info_dict = dict(name=name, price=price, url=url, xpath=url_xpath)
            res_list.append(dict(one_info_dict))
            print(one_info_dict)
            self.down_picture(pic_path=f"{root_path}{title_xpath}/picture", pic_name=str(i)+"_"+str(one_info_dict["name"]), pic_url="https:" + url)


if __name__ == '__main__':
    test = Test()
    # res_path = test.get_selenium_html(basic_url="https://search.jd.com/Search?keyword=%E9%A6%99%E6%B0%B4&enc=utf-8&wq=%E9%A6%99%E6%B0%B4&pvid=814414c289ba41a6bea6ca69b9e1ad6c")
    test.read_html_down_picture_by_xpath("./测试图片/香水-商品搜索-京东/html/香水-商品搜索-京东.html")

 

"C:\Test Files\Python3\python.exe" C:/MyFiles/Mydemo/Myproject/api_autoTest_pytest/pytest-auto/test_basic/demo/down_file.py
累计加载图片:60,页面名称:香水-商品搜索-京东
{'name': 'TOMFORD珍华乌木沉香TF_香水_50ML男士女士_香水_礼盒套装_香水_礼盒送男友送女友表白礼物', 'price': '2250.00', 'url': '//img12.360buyimg.com/n7/jfs/t1/9452/7/19778/52465/632ead68Ed634186d/741404dde8d0c39b.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[1]//div[@class="p-img"]//img/@src'}
下载成功:https://img12.360buyimg.com/n7/jfs/t1/9452/7/19778/52465/632ead68Ed634186d/741404dde8d0c39b.jpg
{'name': '迪奥Dior花漾淡香氛_淡_香水_30ml女士_香水_清新花香生日礼物送女友送朋友(新旧款式随机发货)', 'price': '650.00', 'url': '//img13.360buyimg.com/n7/jfs/t1/186397/19/29118/89650/63317db3E9cf93877/3bc0f19ffd46d8c1.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[2]//div[@class="p-img"]//img/@src'}
下载成功:https://img13.360buyimg.com/n7/jfs/t1/186397/19/29118/89650/63317db3E9cf93877/3bc0f19ffd46d8c1.jpg
{'name': '蔻驰(COACH)纽约女士淡_香水_30ml__香水_礼盒送女友老婆闺蜜生日礼物香氛套装含毛巾丝巾熊花果香调', 'price': '279.00', 'url': '//img11.360buyimg.com/n7/jfs/t1/183236/17/28260/91786/63316d30Ed5749bdb/393efbbf0da58793.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[3]//div[@class="p-img"]//img/@src'}
下载成功:https://img11.360buyimg.com/n7/jfs/t1/183236/17/28260/91786/63316d30Ed5749bdb/393efbbf0da58793.jpg
{'name': '爱心东东_香奈儿_香水_邂逅粉色柔情EDT清新淡香五号之水女士持久礼盒套送老婆礼盒生日礼物女朋友教师节礼物女老师经典5号之水35ml', 'price': '298.00', 'url': '//img10.360buyimg.com/n7/jfs/t1/183617/4/27406/71850/6330a19eE9c3f0b4d/57ae7b8e124701b3.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[4]//div[@class="p-img"]//img/@src'}
下载成功:https://img10.360buyimg.com/n7/jfs/t1/183617/4/27406/71850/6330a19eE9c3f0b4d/57ae7b8e124701b3.jpg
{'name': '爱心东东_香奈儿_香水_邂逅粉色柔情EDT清新淡香五号之水女士持久礼盒套送老婆礼盒生日礼物女朋友教师节礼物女老师粉色邂逅35ml', 'price': '448.00', 'url': '//img10.360buyimg.com/n7/jfs/t1/190837/23/28339/77010/6330a19fE0734326d/11ee8b1e352c7126.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[5]//div[@class="p-img"]//img/@src'}
下载成功:https://img10.360buyimg.com/n7/jfs/t1/190837/23/28339/77010/6330a19fE0734326d/11ee8b1e352c7126.jpg
{'name': '爱心东东_Dior迪奥_香水_花漾甜心小姐淡香氛女士持久淡香礼盒装送老婆礼盒生日礼物女朋友教师节礼物女老师花漾甜心30ml', 'price': '378.00', 'url': '//img11.360buyimg.com/n7/jfs/t1/12092/4/19118/96330/6330a187E21b01404/7e9449bcdfeb351b.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[6]//div[@class="p-img"]//img/@src'}
下载成功:https://img11.360buyimg.com/n7/jfs/t1/12092/4/19118/96330/6330a187E21b01404/7e9449bcdfeb351b.jpg
{'name': '三宅一生(ISSEYMIYAKE)一生之水女士淡_香水_100ml花_香水_香木香送女友女生节日生日礼物', 'price': '950.00', 'url': '//img10.360buyimg.com/n7/jfs/t1/213616/28/21799/85003/63326396Eca6562fd/bbff1d5f39eaea9a.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[7]//div[@class="p-img"]//img/@src'}
下载成功:https://img10.360buyimg.com/n7/jfs/t1/213616/28/21799/85003/63326396Eca6562fd/bbff1d5f39eaea9a.jpg
{'name': '迪奥Dior真我淡香氛_淡_香水_女士50ml清新花香调生日礼物送女友女生送老婆(新旧版本随机发货)', 'price': '890.00', 'url': '//img12.360buyimg.com/n7/jfs/t1/42692/12/19735/74410/63317dbeE355cd322/68754dc9bb319479.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[8]//div[@class="p-img"]//img/@src'}
下载成功:https://img12.360buyimg.com/n7/jfs/t1/42692/12/19735/74410/63317dbeE355cd322/68754dc9bb319479.jpg
{'name': '法颂栀子与清茶女士_香水_栀子花香茶香清新淡香送女友100ml送_香水_小样', 'price': '199.00', 'url': '//img12.360buyimg.com/n7/jfs/t1/115326/31/27645/86098/63227ff2Ebe761b9b/b1c07d9da93eef3e.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[9]//div[@class="p-img"]//img/@src'}
下载成功:https://img12.360buyimg.com/n7/jfs/t1/115326/31/27645/86098/63227ff2Ebe761b9b/b1c07d9da93eef3e.jpg
{'name': '京东国际_爱马仕HERMES尼罗河花园女士淡_香水_30ml法国送女朋友老婆生日礼物', 'price': '325.00', 'url': '//img12.360buyimg.com/n7/jfs/t1/223296/32/17881/76462/63350125E7dee0087/c576a8f8e44f8b84.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[10]//div[@class="p-img"]//img/@src'}
下载成功:https://img12.360buyimg.com/n7/jfs/t1/223296/32/17881/76462/63350125E7dee0087/c576a8f8e44f8b84.jpg
{'name': '祖玛珑蓝风铃_香水_30ml清新淡花香女生_香水_节日生日礼物送女友送男友礼盒JoMaloneLondon', 'price': '640.00', 'url': '//img12.360buyimg.com/n7/jfs/t1/195534/36/28807/95450/632d67a0E98f7d542/bdec68a13e6a5f79.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[11]//div[@class="p-img"]//img/@src'}
下载成功:https://img12.360buyimg.com/n7/jfs/t1/195534/36/28807/95450/632d67a0E98f7d542/bdec68a13e6a5f79.jpg
{'name': '【两套89】_香水_小样女士真我_香水_魅惑花漾甜心淡香氛_香水_三件套花の物语送教师节礼物女老师送女友套装1', 'price': '68.00', 'url': '//img13.360buyimg.com/n7/jfs/t1/136440/23/28494/140202/62edcbaaE7ee0246a/6372698dce11c6e1.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[12]//div[@class="p-img"]//img/@src'}
下载成功:https://img13.360buyimg.com/n7/jfs/t1/136440/23/28494/140202/62edcbaaE7ee0246a/6372698dce11c6e1.jpg
{'name': '海洋至尊Z:SEA飞跃海平线男士_香水_100ml自然持久留香送礼生日礼物淡雅香味清新久香散发感性', 'price': '139.00', 'url': '//img11.360buyimg.com/n7/jfs/t1/153729/27/29837/134020/62ff5a5dEf45dc25d/c65e351bba690bf2.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[13]//div[@class="p-img"]//img/@src'}
下载成功:https://img11.360buyimg.com/n7/jfs/t1/153729/27/29837/134020/62ff5a5dEf45dc25d/c65e351bba690bf2.jpg
{'name': '京东国际_宝格丽(Bvlgari)紫晶纯香女士淡_香水_40ml意大利原装进口送女朋友生日礼物节日礼物花果香调', 'price': '349.00', 'url': '//img13.360buyimg.com/n7/jfs/t1/130394/39/30720/82826/6334f9b1Ec4d8b041/b41df2a448e92348.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[14]//div[@class="p-img"]//img/@src'}
下载成功:https://img13.360buyimg.com/n7/jfs/t1/130394/39/30720/82826/6334f9b1Ec4d8b041/b41df2a448e92348.jpg
{'name': '迪奥Dior真我_花漾女士_香水_(非卖品_不单独售卖)1ml_3女士_香水_经典香氛体验装试用装香型随机发', 'price': '86.00', 'url': '//img14.360buyimg.com/n7/jfs/t1/128015/7/21946/75260/6278b3b2E406fd1e7/91801491bf180298.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[15]//div[@class="p-img"]//img/@src'}
下载成功:https://img14.360buyimg.com/n7/jfs/t1/128015/7/21946/75260/6278b3b2E406fd1e7/91801491bf180298.jpg
{'name': '京东国际_古驰(GUCCI)bloom花悦绽放女士_香水_50ml经典茉莉香调清新持久送女友送老婆生日礼物', 'price': '499.00', 'url': '//img11.360buyimg.com/n7/jfs/t1/31502/20/17898/99941/63352b09Eb6e58db2/830a724f2de3d6e8.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[16]//div[@class="p-img"]//img/@src'}
下载成功:https://img11.360buyimg.com/n7/jfs/t1/31502/20/17898/99941/63352b09Eb6e58db2/830a724f2de3d6e8.jpg
{'name': '香奈儿(Chanel)邂逅柔情系列淡_香水_EDT女士香氛持久花香送女友老婆生日粉色邂逅50ml', 'price': '568.00', 'url': '//img10.360buyimg.com/n7/jfs/t1/63664/26/22546/76327/63325cffEd14d720d/b42f27e03e922297.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[17]//div[@class="p-img"]//img/@src'}
下载成功:https://img10.360buyimg.com/n7/jfs/t1/63664/26/22546/76327/63325cffEd14d720d/b42f27e03e922297.jpg
{'name': '范思哲(VERSACE)晶钻女用_香水_30ml情人节生日礼物送女友范思哲经典女友香淡_香水', 'price': '369.00', 'url': '//img11.360buyimg.com/n7/jfs/t1/118245/20/29753/97739/63133ec6Ee9a255b3/2ed49628c2e8663c.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[18]//div[@class="p-img"]//img/@src'}
下载成功:https://img11.360buyimg.com/n7/jfs/t1/118245/20/29753/97739/63133ec6Ee9a255b3/2ed49628c2e8663c.jpg
{'name': 'TOMFORD口红_香水_礼盒细黑管52玫瑰茶棕色3.3g+中国药感玫瑰_香水_50ML套装送女友生日礼物', 'price': '2730.00', 'url': '//img12.360buyimg.com/n7/jfs/t1/97982/20/32155/182187/632eae6fE69d5f86d/43ebea73c930653b.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[19]//div[@class="p-img"]//img/@src'}
下载成功:https://img12.360buyimg.com/n7/jfs/t1/97982/20/32155/182187/632eae6fE69d5f86d/43ebea73c930653b.jpg
{'name': '香奈儿(Chanel)邂逅柔情淡_香水_35ml(礼盒装)送女生老婆礼物', 'price': '700.00', 'url': '//img11.360buyimg.com/n7/jfs/t1/85696/13/23694/294803/6229b251E63bc337d/1cdbb4fc652e1262.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[20]//div[@class="p-img"]//img/@src'}
下载成功:https://img11.360buyimg.com/n7/jfs/t1/85696/13/23694/294803/6229b251E63bc337d/1cdbb4fc652e1262.jpg
{'name': '京东国际_香奈儿(Chanel)_香水_邂逅机遇柔情淡_香水_粉邂逅绿邂逅清新花香礼盒包装生日礼物送女友老婆七夕礼物【店长推荐】粉色邂逅淡香50mlEDT', 'price': '278.00', 'url': '//img11.360buyimg.com/n7/jfs/t1/69774/25/22107/112788/63298d26E549b6fb2/a8bcdac86046be6c.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[21]//div[@class="p-img"]//img/@src'}
下载成功:https://img11.360buyimg.com/n7/jfs/t1/69774/25/22107/112788/63298d26E549b6fb2/a8bcdac86046be6c.jpg
{'name': '冰希黎(Boitown)女士_香水_幻彩流沙金_香水_女淡香持久少女_香水_礼盒生日礼物送女友送老婆', 'price': '178.00', 'url': '//img12.360buyimg.com/n7/jfs/t1/137403/30/24693/74674/632f0a2bE1d327865/cc477d26c09fd153.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[22]//div[@class="p-img"]//img/@src'}
下载成功:https://img12.360buyimg.com/n7/jfs/t1/137403/30/24693/74674/632f0a2bE1d327865/cc477d26c09fd153.jpg
{'name': '香奈儿(Chanel)邂逅柔情淡_香水_50ml(礼盒装)粉邂逅送女生老婆礼物', 'price': '980.00', 'url': '//img13.360buyimg.com/n7/jfs/t1/48048/14/22414/69017/632c14e3Eb939a64b/52d27424897cb931.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[23]//div[@class="p-img"]//img/@src'}
下载成功:https://img13.360buyimg.com/n7/jfs/t1/48048/14/22414/69017/632c14e3Eb939a64b/52d27424897cb931.jpg
{'name': '古驰(GUCCI)_香水_礼盒口红女士_香水_套装栀子花花悦送女友女生女朋友老婆生日礼物结婚纪念日新婚礼物【断货王】花悦绽放_香水_50ml', 'price': '518.00', 'url': '//img12.360buyimg.com/n7/jfs/t1/50456/6/20949/148340/62fb53bcE61bbf20e/763e20e5e02b46ca.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[24]//div[@class="p-img"]//img/@src'}
下载成功:https://img12.360buyimg.com/n7/jfs/t1/50456/6/20949/148340/62fb53bcE61bbf20e/763e20e5e02b46ca.jpg
{'name': 'MAISONMARGIELA梅森马吉拉慵懒周末白床单淡_香水_花香调香氛持久生日礼物情人节礼物30ml', 'price': '610.00', 'url': '//img12.360buyimg.com/n7/jfs/t1/22659/38/18469/264070/62eb35f7E54787e07/872e3039c5c29a9d.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[25]//div[@class="p-img"]//img/@src'}
下载成功:https://img12.360buyimg.com/n7/jfs/t1/22659/38/18469/264070/62eb35f7E54787e07/872e3039c5c29a9d.jpg
{'name': '京东国际_范思哲VERSACE晶钻香恋水晶女士淡_香水_30ml送女朋友生日礼物节日礼物持久清新花果香', 'price': '249.00', 'url': '//img14.360buyimg.com/n7/jfs/t1/214393/21/21723/92019/6334fa59E172d1848/7ce93653fdb163bd.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[26]//div[@class="p-img"]//img/@src'}
下载成功:https://img14.360buyimg.com/n7/jfs/t1/214393/21/21723/92019/6334fa59E172d1848/7ce93653fdb163bd.jpg
{'name': '京东国际_古驰(GUCCI)bloom花悦绽放女士_香水_100ml经典茉莉香调清新持久送女友送老婆生日礼物', 'price': '699.00', 'url': '//img13.360buyimg.com/n7/jfs/t1/165088/14/27594/77639/6335315bE7bf33e71/990cfd833b78b9fd.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[27]//div[@class="p-img"]//img/@src'}
下载成功:https://img13.360buyimg.com/n7/jfs/t1/165088/14/27594/77639/6335315bE7bf33e71/990cfd833b78b9fd.jpg
{'name': 'YSL圣罗兰LIBRE_香水_自由之水30ml女士_香水_送女友生日礼物', 'price': '860.00', 'url': '//img12.360buyimg.com/n7/jfs/t1/222308/9/19584/96264/632300c5E0ffa82b5/2ec774f51a5152f1.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[28]//div[@class="p-img"]//img/@src'}
下载成功:https://img12.360buyimg.com/n7/jfs/t1/222308/9/19584/96264/632300c5E0ffa82b5/2ec774f51a5152f1.jpg
{'name': '京东国际_缪缪(MIUMIU)粉漾女士淡_香水_香氛50ml生日礼物送女朋友花果香调持久清新自然节日礼物', 'price': '459.00', 'url': '//img11.360buyimg.com/n7/jfs/t1/178775/25/28759/86091/6334fadaEa0ba4783/185f9b722a8ea147.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[29]//div[@class="p-img"]//img/@src'}
下载成功:https://img11.360buyimg.com/n7/jfs/t1/178775/25/28759/86091/6334fadaEa0ba4783/185f9b722a8ea147.jpg
{'name': '京东国际_宝格丽BVLGARI紫晶女士淡_香水_65ml送女朋友生日礼物节日礼物花香调持久优雅清新温和', 'price': '439.00', 'url': '//img14.360buyimg.com/n7/jfs/t1/205858/34/27138/85116/6334f9cbE1d1fd55f/39aa4eec03a20f97.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[30]//div[@class="p-img"]//img/@src'}
下载成功:https://img14.360buyimg.com/n7/jfs/t1/205858/34/27138/85116/6334f9cbE1d1fd55f/39aa4eec03a20f97.jpg
{'name': '香奈儿(Chanel)五号之水淡香氛女士淡_香水_持久花香可可小姐浓_香水_女友老婆生日礼物5号之水35ml', 'price': '428.00', 'url': '//img10.360buyimg.com/n7/jfs/t1/99308/1/32155/72391/6333ded0Ee38069b8/453801d7ec416cb6.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[31]//div[@class="p-img"]//img/@src'}
下载成功:https://img10.360buyimg.com/n7/jfs/t1/99308/1/32155/72391/6333ded0Ee38069b8/453801d7ec416cb6.jpg
{'name': '迪奥Dior真我淡香氛50ml高定礼盒款(女士_香水_清新花香持久香氛生日礼物送女友送朋友)', 'price': '920.00', 'url': '//img10.360buyimg.com/n7/jfs/t1/33153/3/16643/81522/63317da1Ecda220ce/13e374f15b81ed69.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[32]//div[@class="p-img"]//img/@src'}
下载成功:https://img10.360buyimg.com/n7/jfs/t1/33153/3/16643/81522/63317da1Ecda220ce/13e374f15b81ed69.jpg
{'name': '京东国际_缪缪(MIUMIU)粉漾女士淡_香水_香氛50ml生日礼物送女朋友花果香调持久清新自然节日礼物', 'price': '459.00', 'url': '//img11.360buyimg.com/n7/jfs/t1/178775/25/28759/86091/6334fadaEa0ba4783/185f9b722a8ea147.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[33]//div[@class="p-img"]//img/@src'}
下载成功:https://img11.360buyimg.com/n7/jfs/t1/178775/25/28759/86091/6334fadaEa0ba4783/185f9b722a8ea147.jpg
{'name': '迪奥(Dior)_香水_花漾甜心淡香氛持久花香EDT女士淡_香水_礼盒装老婆生日礼物女友花漾甜心50ml', 'price': '528.00', 'url': '//img14.360buyimg.com/n7/jfs/t1/199039/29/26579/95567/632ddeeeE39d5c2df/2c19514f9e5feb6d.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[34]//div[@class="p-img"]//img/@src'}
下载成功:https://img14.360buyimg.com/n7/jfs/t1/199039/29/26579/95567/632ddeeeE39d5c2df/2c19514f9e5feb6d.jpg
{'name': '迪奥Dior真我香氛__香水_50ml女士_香水_浓香持久花香生日礼物送女友女生送朋友(新旧款式随机发货)', 'price': '1090.00', 'url': '//img11.360buyimg.com/n7/jfs/t1/11082/21/19429/76709/63317e06Ebf282141/7b27ad027e37a0a7.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[35]//div[@class="p-img"]//img/@src'}
下载成功:https://img11.360buyimg.com/n7/jfs/t1/11082/21/19429/76709/63317e06Ebf282141/7b27ad027e37a0a7.jpg
{'name': '京东国际_GUCCI古驰_香水_女士_香水_自然清香栀子花淡_香水_栀子花50ml', 'price': '228.00', 'url': '//img14.360buyimg.com/n7/jfs/t1/143259/3/29631/107185/63341f84E93204613/36d433e86412c087.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[36]//div[@class="p-img"]//img/@src'}
下载成功:https://img14.360buyimg.com/n7/jfs/t1/143259/3/29631/107185/63341f84E93204613/36d433e86412c087.jpg
{'name': '纪梵希(Givenchy)心无禁忌_香水_礼盒35ml黑白香调女士赫本香女士_香水__香水_女生日礼物', 'price': '735.00', 'url': '//img10.360buyimg.com/n7/jfs/t1/14493/17/19935/88392/6333b040E411842a6/612ea2261361dd0a.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[37]//div[@class="p-img"]//img/@src'}
下载成功:https://img10.360buyimg.com/n7/jfs/t1/14493/17/19935/88392/6333b040E411842a6/612ea2261361dd0a.jpg
{'name': '迪奥Dior花漾淡香氛50ml高定礼盒款(女士_香水_清新花香持久香氛生日礼物送女友送朋友)', 'price': '890.00', 'url': '//img13.360buyimg.com/n7/jfs/t1/147593/2/31281/94708/63317dc4Ee52cf6ed/dec10724a0ffa722.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[38]//div[@class="p-img"]//img/@src'}
下载成功:https://img13.360buyimg.com/n7/jfs/t1/147593/2/31281/94708/63317dc4Ee52cf6ed/dec10724a0ffa722.jpg
{'name': '京东国际_范思哲VERSACE晶钻香恋水晶女士淡_香水_30ml送女朋友生日礼物节日礼物持久清新花果香', 'price': '249.00', 'url': '//img14.360buyimg.com/n7/jfs/t1/214393/21/21723/92019/6334fa59E172d1848/7ce93653fdb163bd.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[39]//div[@class="p-img"]//img/@src'}
下载成功:https://img14.360buyimg.com/n7/jfs/t1/214393/21/21723/92019/6334fa59E172d1848/7ce93653fdb163bd.jpg
{'name': '祖玛珑幻夜系列薰衣草与月光花枕香喷雾50ml_香水_卧室家用生日礼物女友送男友礼盒JoMaloneLondon', 'price': '360.00', 'url': '//img12.360buyimg.com/n7/jfs/t1/204802/28/26754/97478/6323dd88E3c0635a1/fe83f1ac71acb8d1.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[40]//div[@class="p-img"]//img/@src'}
下载成功:https://img12.360buyimg.com/n7/jfs/t1/204802/28/26754/97478/6323dd88E3c0635a1/fe83f1ac71acb8d1.jpg
{'name': '香奈儿(Chanel)五号之水50ml(礼盒装)_香水_送女生老婆礼物', 'price': '1220.00', 'url': '//img11.360buyimg.com/n7/jfs/t1/174682/40/29928/67844/632c14c2E1cc5b051/acb921737f8aaf93.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[41]//div[@class="p-img"]//img/@src'}
下载成功:https://img11.360buyimg.com/n7/jfs/t1/174682/40/29928/67844/632c14c2E1cc5b051/acb921737f8aaf93.jpg
{'name': '古驰(GUCCI)_香水_礼盒口红女士_香水_套装栀子花花悦送女友女生女朋友老婆生日礼物结婚纪念日新婚礼物【人气王】栀子花_香水_50ml', 'price': '518.00', 'url': '//img10.360buyimg.com/n7/jfs/t1/95272/17/30584/183142/62fb540cE70a365c7/1c782fa70b54b780.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[42]//div[@class="p-img"]//img/@src'}
下载成功:https://img10.360buyimg.com/n7/jfs/t1/95272/17/30584/183142/62fb540cE70a365c7/1c782fa70b54b780.jpg
{'name': '理然男士淡_香水_衣物除味香氛喷雾持久清新_香水_男生日礼物馥奇香250ml送礼物送男友', 'price': '129.90', 'url': '//img13.360buyimg.com/n7/jfs/t1/168159/28/31417/49098/633290f0E46507d0b/8fe11af47adf747b.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[43]//div[@class="p-img"]//img/@src'}
下载成功:https://img13.360buyimg.com/n7/jfs/t1/168159/28/31417/49098/633290f0E46507d0b/8fe11af47adf747b.jpg
{'name': 'YSL圣罗兰LIBRE_香水_自由之水50ml女士_香水_生日礼物送女友', 'price': '1150.00', 'url': '//img13.360buyimg.com/n7/jfs/t1/2410/1/19982/105017/63281b92Efb6c6006/2532bf33641e1ca2.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[44]//div[@class="p-img"]//img/@src'}
下载成功:https://img13.360buyimg.com/n7/jfs/t1/2410/1/19982/105017/63281b92Efb6c6006/2532bf33641e1ca2.jpg
{'name': '京东国际_范思哲VERSACE晶钻香恋水晶女士淡_香水_90ml生日礼物送女朋友节日礼物持久清新花果香', 'price': '419.00', 'url': '//img12.360buyimg.com/n7/jfs/t1/43995/20/20186/106786/6334fa7dE1742a3a7/c3393ab843be9e2f.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[45]//div[@class="p-img"]//img/@src'}
下载成功:https://img12.360buyimg.com/n7/jfs/t1/43995/20/20186/106786/6334fa7dE1742a3a7/c3393ab843be9e2f.jpg
{'name': '古驰(GUCCI)罪爱女士淡_香水_礼盒(淡_香水_30ml+试管1.5ml_2+摆件+精美礼盒)节日礼物生日礼物送女友女生', 'price': '589.00', 'url': '//img12.360buyimg.com/n7/jfs/t1/50130/19/22675/67691/6326714aEcf302b0d/7b13afe8bd5bc014.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[46]//div[@class="p-img"]//img/@src'}
下载成功:https://img12.360buyimg.com/n7/jfs/t1/50130/19/22675/67691/6326714aEcf302b0d/7b13afe8bd5bc014.jpg
{'name': '迪奥(Dior)_香水_花漾甜心淡香氛持久花香EDT女士淡_香水_礼盒装老婆生日礼物女友花漾甜心30ml', 'price': '378.00', 'url': '//img13.360buyimg.com/n7/jfs/t1/210478/33/24318/95795/632ddef0E78356b7d/92945d58c3e82719.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[47]//div[@class="p-img"]//img/@src'}
下载成功:https://img13.360buyimg.com/n7/jfs/t1/210478/33/24318/95795/632ddef0E78356b7d/92945d58c3e82719.jpg
{'name': '迪奥Dior真我香氛_女士_香水_100ml(浓香持久花香调生日礼物送女友女生送朋友)新老版本随机', 'price': '1589.00', 'url': '//img13.360buyimg.com/n7/jfs/t1/108465/35/32226/79451/63317defEb573100a/cd0a75df5b3f0214.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[48]//div[@class="p-img"]//img/@src'}
下载成功:https://img13.360buyimg.com/n7/jfs/t1/108465/35/32226/79451/63317defEb573100a/cd0a75df5b3f0214.jpg
{'name': 'TOMFORD珍华乌木沉香TF_香水_50ML男士女士_香水_礼盒套装_香水_礼盒送男友送女友表白礼物', 'price': '2250.00', 'url': '//img12.360buyimg.com/n7/jfs/t1/9452/7/19778/52465/632ead68Ed634186d/741404dde8d0c39b.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[49]//div[@class="p-img"]//img/@src'}
下载成功:https://img12.360buyimg.com/n7/jfs/t1/9452/7/19778/52465/632ead68Ed634186d/741404dde8d0c39b.jpg
{'name': '京东国际_范思哲VERSACE星夜水晶女士淡_香水_90ml生日礼物送女朋友节日礼物', 'price': '429.00', 'url': '//img10.360buyimg.com/n7/jfs/t1/212170/23/21755/94282/6334fd67Eaeb027f7/9c95d2b4a3dbee79.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[50]//div[@class="p-img"]//img/@src'}
下载成功:https://img10.360buyimg.com/n7/jfs/t1/212170/23/21755/94282/6334fd67Eaeb027f7/9c95d2b4a3dbee79.jpg
{'name': '香奈儿(Chanel)可可小姐清新之水50ml(礼盒装)_香水_送女生老婆礼物', 'price': '930.00', 'url': '//img11.360buyimg.com/n7/jfs/t1/99831/6/31382/68187/632c147fE772dfe8b/4388b101fcf4c9db.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[51]//div[@class="p-img"]//img/@src'}
下载成功:https://img11.360buyimg.com/n7/jfs/t1/99831/6/31382/68187/632c147fE772dfe8b/4388b101fcf4c9db.jpg
{'name': '兰蔻是我_香水_25ml化妆品套装礼盒生日礼物女士_香水_生日礼物送女友清新持久香氛花果木质香调', 'price': '520.00', 'url': '//img13.360buyimg.com/n7/jfs/t1/104489/31/31790/79588/63287f4fEf6e8b840/d897a1d985f0d4d8.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[52]//div[@class="p-img"]//img/@src'}
下载成功:https://img13.360buyimg.com/n7/jfs/t1/104489/31/31790/79588/63287f4fEf6e8b840/d897a1d985f0d4d8.jpg
{'name': '迪奥Dior花漾淡香氛_淡_香水_50ml女士_香水_清新花香生日礼物送女友送朋友(新旧款式随机发货)', 'price': '890.00', 'url': '//img14.360buyimg.com/n7/jfs/t1/46131/11/18040/87790/63317d9fE4e5db3bf/a224e832b6295619.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[53]//div[@class="p-img"]//img/@src'}
下载成功:https://img14.360buyimg.com/n7/jfs/t1/46131/11/18040/87790/63317d9fE4e5db3bf/a224e832b6295619.jpg
{'name': '京东国际_古驰(GUCCI)bloom花悦绽放女士_香水_100ml经典茉莉香调清新持久送女友送老婆生日礼物', 'price': '699.00', 'url': '//img13.360buyimg.com/n7/jfs/t1/165088/14/27594/77639/6335315bE7bf33e71/990cfd833b78b9fd.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[54]//div[@class="p-img"]//img/@src'}
下载成功:https://img13.360buyimg.com/n7/jfs/t1/165088/14/27594/77639/6335315bE7bf33e71/990cfd833b78b9fd.jpg
{'name': 'TTOUCHME005皇家乌木_香水_男士专用持久淡香生日礼物礼盒留香小众_香水_品牌旗舰店【_新品_】005皇家乌木', 'price': '199.00', 'url': '//img14.360buyimg.com/n7/jfs/t1/185218/29/26320/19860/62c2a9d2E98ff3833/3506c2f16258549f.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[55]//div[@class="p-img"]//img/@src'}
下载成功:https://img14.360buyimg.com/n7/jfs/t1/185218/29/26320/19860/62c2a9d2E98ff3833/3506c2f16258549f.jpg
{'name': '线下同款_冰希黎(Boitown)幻彩鎏金_香水_女流沙金淡香少女网红法国_香水_情人节生日节日礼物送女友', 'price': '178.00', 'url': '//img10.360buyimg.com/n7/jfs/t1/216903/37/21146/105638/63310f00E003b80b1/00a054eed2c96826.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[56]//div[@class="p-img"]//img/@src'}
下载成功:https://img10.360buyimg.com/n7/jfs/t1/216903/37/21146/105638/63310f00E003b80b1/00a054eed2c96826.jpg
{'name': '京东国际_爱马仕(HERMES)泻湖花园淡_香水_30mlEDT送送老婆生日礼物', 'price': '319.00', 'url': '//img13.360buyimg.com/n7/jfs/t1/107091/10/32055/79480/63350470E31b81c5f/b3899754db9affa0.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[57]//div[@class="p-img"]//img/@src'}
下载成功:https://img13.360buyimg.com/n7/jfs/t1/107091/10/32055/79480/63350470E31b81c5f/b3899754db9affa0.jpg
{'name': '蔻驰(COACH)纽约女士淡_香水_30ml__香水_礼盒送女友老婆闺蜜生日礼物香氛套装花果香调', 'price': '279.00', 'url': '//img11.360buyimg.com/n7/jfs/t1/191818/24/28772/80734/63316535E8b14ca9d/62ae78105d771a80.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[58]//div[@class="p-img"]//img/@src'}
下载成功:https://img11.360buyimg.com/n7/jfs/t1/191818/24/28772/80734/63316535E8b14ca9d/62ae78105d771a80.jpg
{'name': '京东国际_蔻驰(COACH)经典同名男士女士淡_香水_花馥蕊经典女浓花馥嫣韵淡_香水_礼盒节生日送女友挚爱礼盒(淡香30ml+毛巾熊+丝巾+礼盒)', 'price': '259.00', 'url': '//img12.360buyimg.com/n7/jfs/t1/105253/29/32294/97257/63350206Ee3259c5a/a92d2c5e9910a4d8.jpg', 'xpath': '//*[@id="J_goodsList"]/ul/li[59]//div[@class="p-img"]//img/@src'}
下载成功:https://img12.360buyimg.com/n7/jfs/t1/105253/29/32294/97257/63350206Ee3259c5a/a92d2c5e9910a4d8.jpg

Process finished with exit code 0
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值