amazon爬取亚马逊页面信息


代码:# -*- coding: cp936 -*-import requestsfrom lxml import etree

ASIN = ‘B00X4WHP5E’#ASIN = ‘B017R1YFEG’url = ‘https://www.amazon.com/dp/’+ASINr = requests.get(url)html = r.text
tree = etree.HTML(html)
#获取产品单价span = tree.xpath(“//span[@id=’priceblock_ourprice’]/text()”)print “ASIN码:”,ASINprint “单价:”,span

#获取产品customer re免费云主机域名viewscus_reviewList = tree.xpath(“//div[@id=’averageCustomerReviews’]/span/a/span[@id=’acrCustomerReviewText’]/text()”)print “Customer Reviews:”,cus_reviewList[0]
#获取产品kc

相关推荐: ATS通过header头重写解决HIT/502故障

某局点的ats经常出现HIT/502的故障,客户一旦发飙,这是个扯不清的问题,如果是MISS/502那可以说是源站错误,但HIT/502就与ats业务系统有关系了。 经过手动测试,同一个url直接回源连续访问,偶尔就有502,问题很明显了,源站是不稳定的。分析…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

Like (0)
Donate 微信扫一扫 微信扫一扫
Previous 01/31 08:58
Next 01/31 08:58