• 搜索
官方微信群 扫码添加,拉你进群
订阅号
服务号
跨境资讯

为你推送和解读最前沿、最有料的跨境电商资讯

90% 亚马逊卖家都在关注的微信公众号

精选今日跨境电商头条资讯

简单普及一下跨境企业出口退税的办理资质

网商动力
跨境电商,致力于提供一手资讯、干货知识。
2022-05-25 19:35:25
9

首先你要保证自己的浏览器已经安装了WebScraper插件。


接下来,直接上各种案例代码。


01
抓取产品QA信息

有两种方式:抓取所有页面,抓取指定页

a.Web scraper点击翻页,抓取所有页数。缺点是有的竞品可能几百页QA,没必要抓那么多。
代码:
{"_id":"amz-qa","startUrl":["https://www.amazon.com/ask/questions/asin/B09FT58QQP"],"selectors":[{"id":"contents","parentSelectors":["_root","nextpage"],"type":"SelectorElement","selector":".a-section > div.a-spacing-base > div > div.a-col-right","multiple":true,"delay":null},{"id":"question","parentSelectors":["contents"],"type":"SelectorText","selector":".a-spacing-small div.a-col-right","multiple":false,"delay":0,"regex":""},{"id":"answer","parentSelectors":["contents"],"type":"SelectorText","selector":".a-col-right > span:nth-of-type(1)","multiple":false,"delay":0,"regex":""},{"id":"buyer","parentSelectors":["contents"],"type":"SelectorText","selector":"span.a-profile-name","multiple":false,"delay":0,"regex":""},{"id":"date","parentSelectors":["contents"],"type":"SelectorText","selector":"span.a-color-tertiary","multiple":false,"delay":0,"regex":""},{"id":"nextpage","parentSelectors":["_root","nextpage"],"type":"SelectorLink","selector":".a-last a","multiple":true,"delay":0}]} 
按图示,导入代码

抓取不同竞品,最好更换ASIN。可以在这里编辑,后面的ASIN换成其他ASIN

 
b.抓取指定页面代码:

导入代码以后,如果想指定页数,就打开编辑,更改网址后面的数字。

如果爬取8页,就改成[1-8],依此类推。
代码:
{"_id":"amz-qa2","startUrl":["https://www.amazon.com/ask/questions/asin/B09FT58QQP/[1-2]"],"selectors":[{"delay":null,"id":"contents","multiple":true,"parentSelectors":["_root"],"selector":".a-section > div.a-spacing-base > div > div.a-col-right","type":"SelectorElement"},{"delay":0,"id":"question","multiple":false,"parentSelectors":["contents"],"regex":"","selector":".a-spacing-small div.a-col-right","type":"SelectorText"},{"delay":0,"id":"answer","multiple":false,"parentSelectors":["contents"],"regex":"","selector":".a-col-right > span:nth-of-type(1)","type":"SelectorText"},{"delay":0,"id":"buyer","multiple":false,"parentSelectors":["contents"],"regex":"","selector":"span.a-profile-name","type":"SelectorText"},{"delay":0,"id":"date","multiple":false,"parentSelectors":["contents"],"regex":"","selector":"span.a-color-tertiary","type":"SelectorText"}]}

抓取其他数据依旧是同样的方式,导入代码即可。


02
抓取竞品review

代码:
{"_id":"review","startUrl":["https://www.amazon.com/Insulated-Lunch-Bag-Women-Men/dp/B07WVWSVL3/ref=cm_cr_arp_d_viewopt_sr?ie=UTF8&reviewerType=all_reviews&pageNumber=1&filterByStar=all_stars"],"selectors":[{"clickElementSelector":".a-last a","clickElementUniquenessType":"uniqueCSSSelector","clickType":"clickMore","delay":3000,"discardInitialElements":"do-not-discard","id":"info","multiple":true,"parentSelectors":["_root"],"selector":".a-row div.celwidget","type":"SelectorElementClick"},{"delay":0,"id":"name","multiple":false,"parentSelectors":["info"],"regex":"","selector":"span.a-profile-name","type":"SelectorText"},{"delay":0,"id":"score","multiple":false,"parentSelectors":["info"],"regex":"","selector":"> div:nth-of-type(2)","type":"SelectorText"},{"delay":0,"id":"status","multiple":false,"parentSelectors":["info"],"regex":"","selector":"div.a-spacing-mini.review-data","type":"SelectorText"},{"delay":0,"id":"time","multiple":false,"parentSelectors":["info"],"regex":"","selector":"span.a-color-secondary","type":"SelectorText"},{"delay":0,"id":"content","multiple":false,"parentSelectors":["info"],"regex":"","selector":"div.a-spacing-small","type":"SelectorText"}]} 

03
抓取搜索页关键词前几页产品


无限翻页代码
{"_id":"wxsearch","startUrl":["https://www.amazon.com/s?k=lunch+box&ref=nb_sb_noss"],"selectors":[{"delay":0,"id":"info","multiple":true,"parentSelectors":["_root","panination"],"selector":"div.s-expand-height","type":"SelectorElement"},{"delay":0,"id":"title","multiple":false,"parentSelectors":["info"],"selector":".a-size-mini a","type":"SelectorLink"},{"delay":0,"id":"score","multiple":false,"parentSelectors":["info"],"regex":"","selector":"i.a-icon-star-small","type":"SelectorText"},{"delay":0,"id":"reviews","multiple":false,"parentSelectors":["info"],"regex":"","selector":"span.a-size-base","type":"SelectorText"},{"delay":0,"id":"panination","multiple":true,"parentSelectors":["_root","panination"],"selector":".a-last a","type":"SelectorLink"},{"delay":0,"id":"price","multiple":false,"parentSelectors":["info"],"regex":"","selector":"[data-a-size='l'] span[aria-hidden]","type":"SelectorText"}]} 

指定页数代码:(前5页)
{"_id":"search","startUrl":["https://www.amazon.com/s?k=lunch+box&page=[1-5]"],"selectors":[{"delay":0,"id":"info","multiple":true,"parentSelectors":["_root"],"selector":"div.s-expand-height","type":"SelectorElement"},{"delay":0,"id":"title","multiple":false,"parentSelectors":["info"],"selector":".a-size-mini a","type":"SelectorLink"},{"delay":0,"id":"score","multiple":false,"parentSelectors":["info"],"regex":"","selector":"i.a-icon-star-small","type":"SelectorText"},{"delay":0,"id":"reviews","multiple":false,"parentSelectors":["info"],"regex":"","selector":"span.a-size-base","type":"SelectorText"},{"delay":0,"id":"price","multiple":false,"parentSelectors":["info"],"regex":"","selector":"[data-a-size='l'] span[aria-hidden]","type":"SelectorText"}]} 

04
抓取榜单

代码:

{"_id":"amazon-com-best-sellers","startUrl":["https://www.amazon.com/Best-Sellers-Kitchen-Dining-Reusable-Lunch-Bags/zgbs/kitchen/2287321011/ref=zg_bs_pg_2?_encoding=UTF8&pg=[1-8]"],"selectors":[{"id":"info","parentSelectors":["_root"],"type":"SelectorElement","selector":"div.zg-grid-general-faceout","multiple":true,"delay":null},{"id":"name","parentSelectors":["info"],"type":"SelectorText","selector":"div._cDEzb_p13n-sc-css-line-clamp-3_g3dy1","multiple":false,"delay":0,"regex":""},{"id":"score","parentSelectors":["info"],"type":"SelectorText","selector":"div.a-icon-row","multiple":false,"delay":0,"regex":""},{"id":"price","parentSelectors":["info"],"type":"SelectorText","selector":"div:nth-of-type(2)","multiple":false,"delay":0,"regex":""}]} 



如果数据为空,有两种情况:

1.需要更改网址

2.类目结构不一样,需要重新选择爬虫结构


这种情况,可按照下面的图示指引,重新选择数据。

 

 


相信耐心看完的同学,也能熟练掌握webscraper爬虫了。

二维码
我们建了一个亚马逊卖家交流群,里面不乏很多大卖家。
现在扫码回复“ 加群 ”,拉你进群。
目前30万+人已关注加入我们
声明:此文章来源于网络,不代表网商动力立场。如有侵权,请联系我们。
快给朋友分享吧!
0 赞
最新
【卖方通跨境早报】亚马逊占据德国电商市场56%份额;亚马逊销售额大多来自于第三方卖家;eBay发布有害物质刊登新规
【卖方通跨境早报】亚马逊占据德国电商市场56%份额;亚马逊销售额大多来自于第三方卖家;eBay发布有害物质刊登新规
5月29日 周一《卖方通》>>>跨境早报60秒 知晓跨境电商大小事情!【05.31】-【舞动八闽 品耀全球】亚马逊全球开店卖家峰会报名链接:http://mtw.so/68757h 1.根据HDE...
冲上亚马逊热销榜!TikTok又带火一波家居产品!
冲上亚马逊热销榜!TikTok又带火一波家居产品!
卖方通获悉,在TikTok病毒式短视频的传播下,亚马逊上的一些创意家居产品持续爆火。以下这几款产品,销量呈持续上升趋势。 一、Shave Well防雾浴室镜 这款产品凭借其优...
Tokopedia美容和个人护理类目销量翻倍!热卖产品公布!
Tokopedia美容和个人护理类目销量翻倍!热卖产品公布!
卖方通获悉,近日,Tokopedia报告说,由于防疫措施解除,人们恢复户外活动,彩妆和护肤品的需求大增。 虽然疫情已经结束,但印尼人仍然依赖网上购物。一项调查显示,2023年,印尼...
Asos达成再融资协议!融资7500万英镑!
Asos达成再融资协议!融资7500万英镑!
卖方通获悉,Asos已从股东那里筹集了7500万英镑,并达成了一项基于资产的贷款再融资协议,以加强其资产负债表。这家零售商目前正处于巨额亏损的扭亏为盈计划中,已与专业...
全是商标维权案!GBC新代理CHRYSLER 克莱斯勒汽车超多商标维权和化妆品商标COLOURPOP立案维权!
全是商标维权案!GBC新代理CHRYSLER 克莱斯勒汽车超多商标维权和化妆品商标COLOURPOP立案维权!
CHRYSLER 克莱斯勒汽车23-cv-3304/3308 CHRYSLER 克莱斯勒汽车FCA US LLCGBC品牌介绍原告FCA US LLC是一家跨国汽车制造公司,是世界上最大的汽车制造商之一,在美国...
干货|活动期间网站如何配合烘托促销气氛
干货|活动期间网站如何配合烘托促销气氛
旺季来临,大多独立站都在为产品提供优惠,这是提高网站转化率以及培养客户忠诚度的有效途径。不过我们发现,尽管有些独立站折扣力度高达60%,但是进入网站后并没有凸显...
Copyright ? 2016-2022 ? ? 亚马逊卖家导航? ? 晋ICP备20005961号-2 声明:网站上的服务均为第三方提供,与网商动力无关。请用户注意甄别服务质量,避免上当受骗。