样例网址如下:
http://www.angenechemical.com/productshow/AGN-PC-0JCLT7.html
用Python请求这个网站,并且让logger 记录请求到的body
def parse(self, response):
try:
result = {}
for tr in response.xpath("//table[@class='pInforstyle']/tr"):
name = "$".join(tr.xpath("td[1]/span/text()").extract())
value = "$".join(tr.xpath("td[2]/text()").extract())
result[name] = value
result.update({
"img_url": "http://www.angenechemical.com%s" % "".join(response.xpath("//div[@class='pd_contact']/table/tr[1]/td[1]/img[1]/