def parse_location(self,response):
loc_hxs = scrapy.Selector(response)
loc_xs = loc_hxs.xpath('//div[@id="aside"]/script[1]').extract()[0]
coord_text = re.findall(r'lng:\w+.\w+,lat:\w+.\w+',loc_xs)[0]
item = response.meta['item']
item['location'] = coord_text.encode('gbk')
return item
#print coord_text
评论列表
文章目录