简单爬取京东商品名称、价格(仅供学习)

以下内容是原创,仅供初学者学习用,京东能够开放给我们学习实在不容易,请模拟人类的行为学习爬取。

一 爬取的Python源码

#爬取的代码
import requests
import re
import time
goods='书包'  #搜索关键字
depth = 1  #搜索深度为2,即爬取第1页,第2页
start_url = 'https://search.jd.com/Search?keyword='+ goods+'&enc=utf-8&wq='+goods
infoList=[]
hd = {'user-agent':'Mozilla/5.0'}
for j in range(depth):  #对每一个页面进行处理,使用for循环
    try:
        url = start_url + '&page=' + str(j) # 组合成带翻页功能的url https://search.jd.com/Search?keyword=书包=utf-8&wq=书包&page=1
        try:
            r = requests.get(url,headers=hd,timeout=30)
            r.raise_for_status()
            r.encoding=r.apparent_encoding  #把获取到的页面信息 替换成utf-8信息,这样就不会乱码
            print(r.status_code)
            html = r.text
            print(r.url)
            print(r.text)
        except:
            print("抓取异常")
        try:
            plt = re.findall(r'.*?\.\d\d',html) #获取商品价格,搜索以开头,以.数字数字结尾的字符串            
            tlt = re.findall(r'[^()].*?[\u4e00-\u9fa5].*?',html)  #获取商品名称,搜索以开始,以遇到的第一个结尾的字符串,且 第一个字符是()]除外        
            for i in range(len(plt)):
                price = plt[i].split('')[1]
                title = tlt[i]
                infoList.append([price,title]) # append() 方法用于在列表末尾添加新的对象。
        except: #让程序不会因为异常执行而溢出
            print("分析异常")
    except:
        continue  #如果某一个页面解析出了entity,那么继续解析下一个页面。
    time.sleep(2) #注意,为了长久学习,要模拟人类的输入,停留2秒
    
tplt = "{:^10}\t{:^10}\t{:^20}" #设定一个print模板,用大括号{}来定义槽函数
print(tplt.format("序号","价格","商品名称"))# Python2.6 开始,新增了一种格式化字符串的函数 str.format(),它增强了字符串格式化的功能。format用法举例:print("网站名:{name}, 地址 {url}".format(name="菜鸟教程", url="www.runoob.com"))
count=0
for g in infoList:
     count = count +1
     print(tplt.format(count,g[0],g[1])) #打印商品价格、名称,字符串没做处理

二 爬取到的信息:
序号 价格 商品名称
1 49.00 多功能学生挂书袋可调课桌挂袋书本收纳袋 学生挂书袋 书挂袋书桌收纳袋文件文具挂书袋课桌神器挂架 蓝色
2 99.00 稻草人双肩包男女14/15.6英寸大容量笔记本电脑包多功能旅行出差背包防泼水商务休闲学生书包50470黑色
3 69.00 双肩包男士背包大容量时尚休闲商务旅行笔记本电脑包高中大学生书包男潮流USb充电包包65199 黑色
4 159.00 七匹狼双肩包 背包男15.6英寸电脑包商务休闲通勤防泼水牛津布书包 黑色B0301872-201
5 168.00 瑞士SWICKY瑞驰双肩包男士背包新款大容量休闲商务旅行笔记本电脑包学生书包出差包USb充电包 黑色 大号带usb送多功能刀+锁
6 169.00 七匹狼背包男 牛津布双肩包休闲简约15.6寸电脑包时尚潮流旅行包大容量学生书包男 黑色B0301062-201
7 69.80 书包男士夜光双肩背包中小学生男韩版休闲电脑包大学usb旅行包 USB大号音乐小子+笔袋+防盗锁
8 159.00 第九城V.NINE 小学生书包男女孩儿童护脊书包1-3-6年级减负双肩背包初中学生休闲书包 VD9BV33972J 蓝配粉
9 79.00 京东超市第九城V.NINE 双肩包男女卡通印花书包六件套帆布休闲背包校园中小学生书包 VB7BV32884J 粉色套装
10 59.90 2020新款书包男背包女初中生开学包休闲简约时尚潮流帆布包百搭高中学生 黑色
11 149.00 波斯丹顿双肩包男士商务休闲潮流帆布学生校园运动书包大容量旅行背包15.6英寸笔记本电脑包 男 深灰色
12 88.00 梵者 新款双肩包男潮牌休闲帆布旅行包韩版男士背包商务电脑包高中初中大学生书包ins运动潮流 黑色
13 149.00 爱登堡 双肩包背包男士商务14寸电脑包休闲旅行包韩版多功能时尚潮流学生15.6寸笔记本包 黑色爆款 收藏加购 优先发货
14 159.00 第九城V.NINE 双肩包女士防泼水旅行背包大容量15.6英寸电脑包校园情侣款大中学生书包男 VD7BV32881J 粉配灰
15 229.00 七匹狼双肩包 男士背包电脑包15.6英寸笔记本休闲商务旅行学生书包黑色B248211-01IH1
16 79.00 耐拓 小学生书包男孩轻便减压1-3-6年级儿童书包 N897宝蓝大号3-6年级 均
17 69.00 双肩包男士背包新款大容量休闲商务旅行笔记本电脑包学生书包出差包 黑色大号
18 159.00 第九城V.NINE 双肩包男士大容量15.6英寸电脑包多功能旅行背包情侣款学生书包女 VD7BV33886J 米灰
19 355.00 七匹狼包商务双肩包男韩版潮 大中学生书包背包 男包旅行包电脑包 黑色【五层款】
20 89.90 迪士尼(Disney)小学生书包男米奇中学生双肩背包男女3-4-6年级儿童书包 DB96251深蓝
21 69.00 丛林鸟(JUNGLE BIRD)书包女韩版初高中小学生简约森系百搭尼龙双肩包大容量背包 黑色
22 69.00 丛林鸟 书包男韩版原宿ulzzang初高中大学生时尚潮流双肩包女大容量黑背包 黑色【送鸭子挂件】
23 99.00 京东超市十字勋章 瑞士双肩包男15.6英寸笔记本电脑包商务多功能大容量出差背包旅行包防泼水休闲学生书包CR-9001黑色
24 229.00 Dickies 潮流休闲双肩包男女学生书包大容量帆布包学院风防水14/15.6英寸电脑包C028 黑色经典款
25 188.00 李宁官方男子双肩包背包书包训练系列ABSP388 黑-1(300180520mm)) 000
26 79.00 双肩包潮牌书包男百搭时尚潮流背包青年韩版简约文艺初中大学生书包 黑色 (433017高宽厚)送挂饰香包
27 28.00 小米(MI)炫彩小背包男女情侣双肩包简约便携休闲旅游包旅行包学生小书包 小米炫彩小背包 黑色
28 59.00 格比森双肩包 男士背包15.6英寸笔记本电脑包初高中大学生小学生书包男女新款 帆布防波水 深灰色
29 55.00 蒂梵森2020款双肩男士商务休闲旅行背包大容量15.6寸笔记本电脑包潮流高中大学生书包男女外置USb 灰色
30 59.00 2020新款书包男女韩版 学院风初高中学生书包潮流男款背包双肩包个性时尚休闲电脑包 1810黑色

三 附上爬取的页面源码的一部分,这样可以对照着输出学习用

<div id="J_main" class="g-main2">
	<div class="m-list">
		<div class="ml-wrap">			<div id="J_filter" class="filter">
				<div class="f-line top">
					<div class="f-sort">
<a class="curr" href="javascript:;"><span class="fs-tit">综合</span><em class="fs-down"><i class="arrow"></i></em></a>
						<a class="" href="javascript:;"><span class="fs-tit">销量</span><em class="fs-down"><i class="arrow"></i></em></a>
						<a class="" href="javascript:;"><span class="fs-tit">评论数</span><em class="fs-down"><i class="arrow"></i></em></a>
						<a class="" href="javascript:;"><span class="fs-tit">新品</span><em class="fs-down"><i class="arrow"></i></em></a>
						<a class="" href="javascript:;"><span class="fs-tit">价格</span><em class="fs-up"><i class="arrow-top"></i><i class="arrow-bottom"></i></em></a>
					</div>
<div class="f-datagrid"><a href="javascript:;" class="fdg-item" data-range="0-55" data-tips="10%的用户喜欢的价位"><span class="def-bar" style="height:21%"></span></a><a href="javascript:;" class="fdg-item" data-range="55-107" data-tips="30%的用户喜欢的价位"><span class="def-bar" style="height:62%"></span></a><a href="javascript:;" class="fdg-item" data-range="107-198" data-tips="41%的用户喜欢的价位"><span class="def-bar" style="height:85%"></span></a><a href="javascript:;" class="fdg-item" data-range="198-321" data-tips="13%的用户喜欢的价位"><span class="def-bar" style="height:27%"></span></a><a href="javascript:;" class="fdg-item" data-range="321-¥" data-tips="6%的用户喜欢的价位"><span class="def-bar" style="height:12%"></span></a></div>					<div id="J_selectorPrice" class="f-price">
						<div class="f-price-set">
							<div class="fl"><input type="text" class="input-txt" autocomplete="off" style="color:#ccc" value="¥"></div>
							<em>-</em>
							<div class="fl"><input type="text" class="input-txt" autocomplete="off" style="color:#ccc" value="¥"></div>
						</div>
						<div class="f-price-edit">
							<a href="javascript:;" class="item1 J-price-cancle">清空</a>
							<a href="javascript:;" class="item2 J-price-confirm" data-url="search?keyword=%E4%B9%A6%E5%8C%85&enc=utf-8&qrst=1&rt=1&stop=1&vt=2&wq=%E4%B9%A6%E5%8C%85&stock=1&ev=exprice_%7Bmin%7D-%7Bmax%7D%5E&uc=0#J_searchWrap">确定</a>
						</div>
					</div>
					<div id="J_topPage" class="f-pager">
						<span class="fp-text">
							<b>1</b><em>/</em><i>100</i>
						</span>
						<a class="fp-prev disabled" href="javascript:;">&lt;</a>
						<a class="fp-next" href="javascript:;">&gt;</a>
					</div>
					<div class="f-result-sum"><span id="J_resCount" class="num">79+</span>件商品</div>
					
					<span class="clr"></span>
				</div>
				<div class="f-line">
					<div class="f-store">
						<div class="fs-cell delivery-location">配送至</div>
						<div id="J_store_selector" class="ui-area-wrap" style="float:left;margin-right:10px">
							<div class="ui-area-text-wrap">
								<div class="ui-area-text">北京朝阳区</div>
								<b></b>
							</div>
							<div class="ui-area-content-wrap">
								<div class="ui-area-tab"></div>
								<div class="ui-area-content"></div>
							</div>
						</div>
					</div>
					<div id="J_feature" class="f-feature">
						<ul>
							<li><a data-field="wtype" data-val="1" class="" href="javascript:;" onclick="searchlog(1,0,0,43)"><i></i>京东物流</a></li>
							<li><a data-field="cod" data-val="1" class="" href="javascript:;" onclick="searchlog(1,0,0,34)"><i></i>货到付款</a></li>
							<li><a data-field="stock" data-val="1" class="selected" href="javascript:;" onclick="searchlog(1,0,0,41)"><i></i>仅显示有货</a></li>
							<li><a data-field="gp" data-val="1" class="" href="javascript:;" onclick="searchlog(1,0,0,39)"><i></i>京东国际</a></li>
							<li><a data-field="gp" data-val="2" class="" href="javascript:;" onclick="searchlog(1,0,0,87)"><i></i>可配送全球</a></li>
							<li><a data-field="zx" data-val="2" class="" href="javascript:;" onclick="searchlog(1,0,0,85)"><i></i>新品</a></li>
							<li><a data-field="plus" data-val="1" class="" href="javascript:;" onclick=""><i></i>PLUS专享</a></li>
							<li><a data-field="sh" data-val="1" class="" href="javascript:;" ><i></i>拍拍二手</a></li>
							<li><a data-field="icon" data-val="424501" class="" href="javascript:;" onclick="searchlog(1,0,0,429)"><i></i><span class="act-wrap" style="width:75px"><em class="act-text">宝贝趴</em></span></a></li>
							<li><a data-field="icon" data-val="424503" class="" href="javascript:;" onclick="searchlog(1,0,0,430)"><i></i><span class="act-wrap" style="width:75px"><em class="act-text">家装节</em></span></a></li>
						</ul>
					</div>
					<div class="f-search">
						<input type="text" value="在结果中搜索" class="input-txt">
						<a class="btn btn-default" href="javascript:;">确定</a>
					</div>
					<span class="clr"></span>
				</div>
			</div>
<div id="J_goodsList" class="goods-list-v2 gl-type-3 J-goods-list"><ul class="gl-warp clearfix" data-tpl="3"><li class="gl-item" data-sku="64923971966" data-spu="64923971965" data-pid="64923971965">
	<div class="gl-i-wrap">
		<div class="p-img">
			<a target="_blank" title="多功能学生挂书袋可调课桌挂袋书本收纳袋 学生挂书袋 书挂袋书桌收纳袋文件文具挂书袋课桌神器挂架 蓝色" href="https://item.jd.com/64923971966.html" onclick="searchlog(1,64923971966,0,2,'','adwClk=1');searchAdvPointReport('https://ccc-x.jd.com/dsp/nc?ext=aHR0cHM6Ly9pdGVtLmpkLmNvbS82NDkyMzk3MTk2Ni5odG1s&log=4o6yQPJy6XmVSDUPaAlnilzQoTl0WfQq_iFkBg-nAELRr_jWgST6F3gHkDceKGeLFNVwe-soMnCpciBNs23mQ-Ilfi01tO75IDlJJX-6zhuGhAHxgFmEvKNeQT_qOIh8ZDU-NBcY8BsO9QLaz0X57aPu3e23a54_KScadwVylpD691LvcQa8ZbIjXHcQ17QOvtke4mexTr2lONtxOUaqrutZv5jV-h-7aOPjf_pruYgj_evBk7UICQoYrHVO0KZ_lui2p5hOalWxF3oKDmIkyo4ZwP8laIw9XFGI5tSiiOm1NqThyDWIwpRknK91PjiHNrlTIzMDemk-v03a2rjIi-Q9nHrG7vrq_SP0hc3z8aqUgN5VvW8WeChuIzSBJSGEoENy3HEx0XnARSKCiUbYBcrU--XghhLCocnp0a8x_sX7vMd1idTT4W7eeYfs-2v1u2ftQZz3UWxuI3bljxX0ZQ7obwL7Nyw9KbZS9wasMO5UY9kv5KyTRUc3-SQCTeEhUnCFou_VllDAaoHd90ols2Ca3lLUcCgcWEqv8HL7xiQ17MN8mm9-HFMIyYlZWwGZ1E9NuCW9M2PZ2IqYDTqGY5aVRFkJez8V3wQrqn61VwU9KCrU8GT2WOUmahNglOKLTvkdAzsKbg5Un2kUV3D2mssvsf76pw5itFaS5nSyxg3QPpBBd_gWrWCMrbuQ858X&v=404&clicktype=1&&clicktype=1');">
				<img width="220" height="220" class="err-product" data-img="1" source-data-lazy-img="//img11.360buyimg.com/n7/jfs/t1/89937/11/18011/133904/5e8e7872E5d238ffa/e2752ecd1eb188cc.jpg" />
</a>			<div data-lease="" data-catid="1449" data-venid="800106" data-presale=""></div>
		</div>
		<div class="p-scroll">
			<span class="ps-prev">&lt;</span>
			<span class="ps-next">&gt;</span>
			<div class="ps-wrap">
				<ul class="ps-main">
					<li class="ps-item"><a href="javascript:;" class="curr" title="蓝色"><img data-url="https://item.jd.com/64923971966.html"  data-presale="" data-sku="64923971966" data-img="1" data-lazy-img="//img11.360buyimg.com/n9/jfs/t1/89937/11/18011/133904/5e8e7872E5d238ffa/e2752ecd1eb188cc.jpg" class="err-product" width="25" height="25" /></a></li>
									</ul>
			</div>
		</div>
		<div class="p-price">
<strong class="J_64923971966" data-done="1"><em></em><i>49.00</i></strong>		</div>
		<div class="p-name p-name-type-2">
			<a target="_blank" title="多功能学生挂书袋可调课桌挂袋书本收纳袋 学生挂书袋 书挂袋书桌收纳袋文件文具挂书袋课桌神器挂架 蓝色" href="https://item.jd.com/64923971966.html" onclick="searchlog(1,64923971966,0,1,'','adwClk=1');searchAdvPointReport('https://ccc-x.jd.com/dsp/nc?ext=aHR0cHM6Ly9pdGVtLmpkLmNvbS82NDkyMzk3MTk2Ni5odG1s&log=4o6yQPJy6XmVSDUPaAlnilzQoTl0WfQq_iFkBg-nAELRr_jWgST6F3gHkDceKGeLFNVwe-soMnCpciBNs23mQ-Ilfi01tO75IDlJJX-6zhuGhAHxgFmEvKNeQT_qOIh8ZDU-NBcY8BsO9QLaz0X57aPu3e23a54_KScadwVylpD691LvcQa8ZbIjXHcQ17QOvtke4mexTr2lONtxOUaqrutZv5jV-h-7aOPjf_pruYgj_evBk7UICQoYrHVO0KZ_lui2p5hOalWxF3oKDmIkyo4ZwP8laIw9XFGI5tSiiOm1NqThyDWIwpRknK91PjiHNrlTIzMDemk-v03a2rjIi-Q9nHrG7vrq_SP0hc3z8aqUgN5VvW8WeChuIzSBJSGEoENy3HEx0XnARSKCiUbYBcrU--XghhLCocnp0a8x_sX7vMd1idTT4W7eeYfs-2v1u2ftQZz3UWxuI3bljxX0ZQ7obwL7Nyw9KbZS9wasMO5UY9kv5KyTRUc3-SQCTeEhUnCFou_VllDAaoHd90ols2Ca3lLUcCgcWEqv8HL7xiQ17MN8mm9-HFMIyYlZWwGZ1E9NuCW9M2PZ2IqYDTqGY5aVRFkJez8V3wQrqn61VwU9KCrU8GT2WOUmahNglOKLTvkdAzsKbg5Un2kUV3D2mssvsf76pw5itFaS5nSyxg3QPpBBd_gWrWCMrbuQ858X&v=404&clicktype=1&&clicktype=1');">
				<em>多功能学生挂书袋可调课桌挂袋书本收纳袋 学生挂书袋 书挂袋书桌收纳袋文件文具挂书袋课桌神器挂架 蓝色</em>
				<i class="promo-words" id="J_AD_64923971966"></i>
			</a>
		</div>
		<div class="p-commit">
			<strong><a id="J_comment_64923971966" target="_blank" href="https://item.jd.com/64923971966.html" onclick="searchlog(1,64923971966,0,3,'','adwClk=1')"></a></strong>
		</div>
		<div class="p-focus"><a class="J_focus" data-sku="64923971966" href="javascript:;" title="点击关注" onclick="searchlog(1,64923971966,0,5,'','adwClk=1')"><i></i>关注</a></div>
		<div class="p-shop" data-dongdong="" data-selfware="0" data-score="0" data-reputation="20" data-verderId="800106" data-shopid="795794">
		</div>	
		
		<div class="p-icons" id="J_pro_64923971966">
		</div>
		<span class="p-promo-flag">广告</span>
		
		<img source-data-lazy-advertisement="https://im-x.jd.com/dsp/np?log=4o6yQPJy6XmVSDUPaAlnilzQoTl0WfQq_iFkBg-nAELRr_jWgST6F3gHkDceKGeLFNVwe-soMnCpciBNs23mQ-Ilfi01tO75IDlJJX-6zhuGhAHxgFmEvKNeQT_qOIh8ZDU-NBcY8BsO9QLaz0X57aPu3e23a54_KScadwVylpARyavUgVRRZoP_thQ20x2cxcX9K-q692C4F-Ae3UlBOJQTPbwpeA47iOpQzp8MW-tnzhG4QcrgoNATCpmXhtOptt3X3m7MguGIYN2oKkU75SMlgTYm8masby6PnX7SeBx1yBcShcgL6IjCCrM_6RK9vJw8wVwmwW7VFgwAA5Ns0XspwYX1RIa8NoHIg6fzhJpq6wv56y7ePNvsosaGVfQoHjghgzr7XUaKnRhD-mRppyp0YHaLEuKPRIbqKvGO0ZTX4_iqFQyyOA24W8owSLkyKcUNiuRzv87NVKxkWEczyI_NvmrKLVtAy2pSNQKG1Q1tR84c1U_94w39kgMmZf9F0cNk-vsR2zq1DzwzJXILKv6BEWLANsPlDiKA9LkBsErwzHkoPKETW5cxZxubDxCnB9UpJcJ4GaGOrPu--5kmV2gsn1Cnj7OmpvttAZ9oRynB68bXmO5NQY3kaE2WOLOhXGG50Zx7KB1gRCCyB4zZMTr93pHBKNRK0LZCK3f4cbAOFs4uV5yL_vME_7tl_bFJmfgiBSlZZcHouiD99UcLmQ&v=404&rt=3" >
	</div>
</li>
<li class="gl-item" data-sku="5181576" data-spu="5181576" data-pid="5181576">
	<div class="gl-i-wrap">
		<div class="p-img">
			<a target="_blank" title="【稻草人爆款双肩包,15.6英寸超大容量,三大隔层,出行轻松搞掂】8-12日,每满119减20元,稻草人品质保证。快来抢购吧!" href="//item.jd.com/5181576.html" onclick="searchlog(1,5181576,1,2,'','flagsClk=1077940872')">
				<img width="220" height="220" class="err-product" data-img="1" source-data-lazy-img="//img11.360buyimg.com/n7/jfs/t1/96664/15/14541/395640/5e675971E689c5511/5b03b94f7fa247d1.jpg" />
</a>			<div data-lease="" data-catid="12071" data-venid="1000001048" data-presale=""></div>
		</div>
		<div class="p-scroll">
			<span class="ps-prev">&lt;</span>
			<span class="ps-next">&gt;</span>
			<div class="ps-wrap">
				<ul class="ps-main">
					<li class="ps-item"><a href="javascript:;" class="curr" title="主图款15.6英寸黑色款"><img  data-presale="" data-sku="5181576" data-img="1" data-lazy-img="//img11.360buyimg.com/n9/jfs/t1/96664/15/14541/395640/5e675971E689c5511/5b03b94f7fa247d1.jpg" class="err-product" width="25" height="25" /></a></li>
										<li class="ps-item"><a href="javascript:;" title="黑色17.3英寸"><img  data-presale="" data-sku="100003909565" data-img="1" width="25" height="25" data-lazy-img="//img10.360buyimg.com/n9/jfs/t1/108779/28/8424/281341/5e675356E20f0c196/12e26e33f67909a0.jpg" class="err-product" /></a></li>
										<li class="ps-item"><a href="javascript:;" title="主图款15.6英寸灰色"><img  data-presale="" data-sku="4242121" data-img="1" width="25" height="25" data-lazy-img="//img11.360buyimg.com/n9/jfs/t1/97571/6/14547/438010/5e675538Ee03aedd1/3f6a133e5ee04207.jpg" class="err-product" /></a></li>
										<li class="ps-item"><a href="javascript:;" title="黑色款"><img  data-presale="" data-sku="100002467473" data-img="1" width="25" height="25" data-lazy-img="//img13.360buyimg.com/n9/jfs/t1/85679/31/14640/129467/5e675a9aE87526b01/f41bf024388f7456.jpg" class="err-product" /></a></li>
										<li class="ps-item"><a href="javascript:;" title="主图款15.6英寸蓝色"><img  data-presale="" data-sku="4242123" data-img="1" width="25" height="25" data-lazy-img="//img13.360buyimg.com/n9/jfs/t1/105047/20/14381/391870/5e675500E822f2475/8a835c1bce455204.jpg" class="err-product" /></a></li>
										<li class="ps-item"><a href="javascript:;" title="灰色款"><img  data-presale="" data-sku="100002467469" data-img="1" width="25" height="25" data-lazy-img="//img14.360buyimg.com/n9/jfs/t1/86089/15/14660/208728/5e675b0fEbda83d7c/ab11a079415adc5f.jpg" class="err-product" /></a></li>
										<li class="ps-item"><a href="javascript:;" title="深灰色款"><img  data-presale="" data-sku="100003060945" data-img="1" width="25" height="25" data-lazy-img-slave="//img10.360buyimg.com/n9/jfs/t1/108751/29/8393/194375/5e675317Ed80a440f/69f564da9cf0c212.jpg" class="err-product" /></a></li>
										<li class="ps-item"><a href="javascript:;" title="黑色A款"><img  data-presale="" data-sku="100005730491" data-img="1" width="25" height="25" data-lazy-img-slave="//img11.360buyimg.com/n9/jfs/t1/104931/2/14580/631645/5e675cf5E81bae1c9/5c3346eabfbe5b30.jpg" class="err-product" /></a></li>
										<li class="ps-item"><a href="javascript:;" title="黑色B款"><img  data-presale="" data-sku="100010262064" data-img="1" width="25" height="25" data-lazy-img-slave="//img14.360buyimg.com/n9/jfs/t1/89293/5/14530/560061/5e675c7fEe5c723c8/2ca305d297ae82c3.jpg" class="err-product" /></a></li>
										<li class="ps-item"><a href="javascript:;" title="黑色C款"><img  data-presale="" data-sku="100010262050" data-img="1" width="25" height="25" data-lazy-img-slave="//img10.360buyimg.com/n9/jfs/t1/98662/13/14678/545819/5e675cc2Ee6f433a2/076556df49cd2936.jpg" class="err-product" /></a></li>
									</ul>
			</div>
		</div>
		<div class="p-price">
<strong class="J_5181576" data-done="1"><em></em><i>99.00</i></strong>		</div>
		<div class="p-name p-name-type-2">
			<a target="_blank" title="【稻草人爆款双肩包,15.6英寸超大容量,三大隔层,出行轻松搞掂】8-12日,每满119减20元,稻草人品质保证。快来抢购吧!" href="//item.jd.com/5181576.html" onclick="searchlog(1,5181576,1,1,'','flagsClk=1077940872')">
				<em>稻草人双肩包男女14/15.6英寸大容量笔记本电脑包多功能旅行出差背包防泼水商务休闲学生<font class="skcolor_ljg">书包</font>50470黑色</em>
				<i class="promo-words" id="J_AD_5181576">【稻草人爆款双肩包,15.6英寸超大容量,三大隔层,出行轻松搞掂】8-12,每满11920,稻草人品质保证。快来抢购吧!</i>
			</a>
		</div>
		<div class="p-commit">
			<strong><a id="J_comment_5181576" target="_blank" href="//item.jd.com/5181576.html#comment" onclick="searchlog(1,5181576,1,3,'','flagsClk=1077940872')"></a></strong>
		</div>
		<div class="p-focus"><a class="J_focus" data-sku="5181576" href="javascript:;" title="点击关注" onclick="searchlog(1,5181576,1,5,'','flagsClk=1077940872')"><i></i>关注</a></div>
		<div class="p-shop" data-dongdong="" data-selfware="1" data-score="5" data-reputation="98">
<span class="J_im_icon"><a target="_blank" class="curr-shop hd-shopname" onclick="searchlog(1,1000001048,0,58)" href="//mall.jd.com/index-1000001048.html" title="稻草人京东自营旗舰店">稻草人京东自营旗舰店</a></span>		</div>	
		
		<div class="p-icons" id="J_pro_5181576" data-done="1">
			<i class="goods-icons J-picon-tips J-picon-fix" data-idx="1" data-tips="京东自营,品质保障">自营</i>
    		<i class="goods-icons4 J-picon-tips" style="border-color:#4d88ff;color:#4d88ff;" data-idx="1" data-tips="品质服务,放心购物" >放心购</i>
<i class="goods-icons4 J-picon-tips" data-tips="本商品参与满减促销">每满119-20</i>		</div>
	</div>
</li>
<li class="gl-item" data-sku="59975470952" data-spu="13810867851" data-pid="59975470952">
	<div class="gl-i-wrap">
		<div class="p-img">
			<a target="_blank" title="【好店认证】【买一送“一”送钥匙包】【支持7天无理由退换货,赠送运费险,售后无忧】【支持货到付款】" href="//item.jd.com/59975470952.html" onclick="searchlog(1,59975470952,2,2,'','flagsClk=1094713996')">
				<img width="220" height="220" class="err-product" data-img="1" source-data-lazy-img="//img12.360buyimg.com/n7/jfs/t1/100706/25/17185/130140/5e8459f0Efbd3fdcf/379d9e03eea2a5d7.jpg" />
</a>			<div data-lease="" data-catid="12071" data-venid="84618" data-presale=""></div>
		</div>
		<div class="p-scroll">
			<span class="ps-prev">&lt;</span>
			<span class="ps-next">&gt;</span>
			<div class="ps-wrap">
				<ul class="ps-main">
					<li class="ps-item"><a href="javascript:;" class="curr" title="黑色"><img  data-presale="" data-sku="59975470952" data-img="1" data-lazy-img="//img12.360buyimg.com/n9/jfs/t1/100706/25/17185/130140/5e8459f0Efbd3fdcf/379d9e03eea2a5d7.jpg" class="err-product" width="25" height="25" /></a></li>
									</ul>
			</div>
		</div>
		<div class="p-price">
<strong class="J_59975470952" data-done="1"><em></em><i>69.00</i></strong>		</div>
		<div class="p-name p-name-type-2">
			<a target="_blank" title="【好店认证】【买一送“一”送钥匙包】【支持7天无理由退换货,赠送运费险,售后无忧】【支持货到付款】" href="//item.jd.com/59975470952.html" onclick="searchlog(1,59975470952,2,1,'','flagsClk=1094713996')">
				<em>双肩包男士背包大容量时尚休闲商务旅行笔记本电脑包高中大学生<font class="skcolor_ljg">书包</font>男潮流USb充电包包65199 黑色</em>
				<i class="promo-words" id="J_AD_59975470952">【好店认证】【买一送“一”送钥匙包】【支持7天无理由退换货,赠送运费险,售后无忧】【支持货到付款】</i>
			</a>
		</div>
		<div class="p-commit">
			<strong><a id="J_comment_59975470952" target="_blank" href="//item.jd.com/59975470952.html#comment" onclick="searchlog(1,59975470952,2,3,'','flagsClk=1094713996')"></a></strong>
		</div>
		<div class="p-focus"><a class="J_focus" data-sku="59975470952" href="javascript:;" title="点击关注" onclick="searchlog(1,59975470952,2,5,'','flagsClk=1094713996')"><i></i>关注</a></div>
		<div class="p-shop" data-dongdong="" data-selfware="0" data-score="5" data-reputation="97">
<img src="//img12.360buyimg.com/schoolbt/jfs/t1/80828/19/2993/908/5d14277aEbb134d76/889d5265315e11ed.png" class="shop-tag" width="73" height="16"><span class="J_im_icon"><a target="_blank" class="curr-shop hd-shopname" onclick="searchlog(1,81485,0,58)" href="//mall.jd.com/index-81485.html" title="朗斐优昂专卖店">朗斐优昂专卖店</a></span>		</div>	
		
		<div class="p-icons" id="J_pro_59975470952" data-done="1">
			<i class="goods-icons4 J-picon-tips J-picon-fix"data-idx="1" data-tips="京东物流仓配,商家提供售后服务" >京东物流</i>
    		<i class="goods-icons4 J-picon-tips" style="border-color:#4d88ff;color:#4d88ff;" data-idx="1" data-tips="品质服务,放心购物" >放心购</i>
			<i class="goods-icons4 J-picon-tips" data-tips="当前收货地址,本商品免邮费">免邮</i>
<i class="goods-icons4 J-picon-tips" data-tips="购买本商品送赠品"></i>		</div>
	</div>
</li>
<li class="gl-item" data-sku="6511832" data-spu="6511832" data-pid="6511832">
	<div class="gl-i-wrap">
		<div class="p-img">
			<a target="_blank" title="【七匹狼春雨行动,品质盛典】4月7日-4月12日,每满99减10元,满99减10元,经典源于用心,七匹狼品质保证点击选购!" href="//item.jd.com/6511832.html" onclick="searchlog(1,6511832,3,2,'','flagsClk=1077940872')">
				<img width="220" height="220" class="err-product" data-img="1" source-data-lazy-img="//img12.360buyimg.com/n7/jfs/t1/111290/4/514/238523/5e8d3f62Eb2472c77/2bbdf53f323eb778.jpg" />
</a>			<div data-lease="" data-catid="12071" data-venid="1000001212" data-presale=""></div>
		</div>
		<div class="p-scroll">
			<span class="ps-prev">&lt;</span>
			<span class="ps-next">&gt;</span>
			<div class="ps-wrap">
				<ul class="ps-main">
					<li class="ps-item"><a href="javascript:;" class="curr" title="黑色|15.6英寸 休闲商务"><img  data-presale="" data-sku="6511832" data-img="1" data-lazy-img="//img12.360buyimg.com/n9/jfs/t1/111290/4/514/238523/5e8d3f62Eb2472c77/2bbdf53f323eb778.jpg" class="err-product" width="25" height="25" /></a></li>
										<li class="ps-item"><a href="javascript:;" title="黑色|17.3英寸 容量升级"><img  data-presale="" data-sku="100000540328" data-img="1" width="25" height="25" data-lazy-img="//img13.360buyimg.com/n9/jfs/t1/116012/34/344/220215/5e8af398E5ff3ff1c/520529d39bc26fa5.jpg" class="err-product" /></a></li>
										<li class="ps-item"><a href="javascript:;" title="黑色|三仓加厚 容量升级"><img  data-presale="" data-sku="7785841" data-img="1" width="25" height="25" data-lazy-img="//img11.360buyimg.com/n9/jfs/t1/111974/38/328/217556/5e8af36fE904f0699/4603afbe846a40dd.jpg" class="err-product" /></a></li>
									</ul>
			</div>
		</div>
		<div class="p-price">
<strong class="J_6511832" data-done="1"><em></em><i>159.00</i></strong>		</div>
		<div class="p-name p-name-type-2">
			<a target="_blank" title="【七匹狼春雨行动,品质盛典】4月7日-4月12日,每满99减10元,满99减10元,经典源于用心,七匹狼品质保证点击选购!" href="//item.jd.com/6511832.html" onclick="searchlog(1,6511832,3,1,'','flagsClk=1077940872')">
				<em>七匹狼双肩包 背包男15.6英寸电脑包商务休闲通勤防泼水牛津布<font class="skcolor_ljg">书包</font> 黑色B0301872-201</em>
				<i class="promo-words" id="J_AD_6511832">【七匹狼春雨行动,品质盛典】47-412,每满9910,9910,经典源于用心,七匹狼品质保证点击选购!</i>
			</a>
		</div>

你可能感兴趣的:(Python)