def parse(self, response):
"""
Default callback function with response for the crawled url
https://doc.scrapy.org/en/latest/topics/spiders.html#scrapy.spiders.Spider.parse
"""
response = response.replace(body=re.sub(r"<br\s*[\/]?>", "\n", response.body.decode('utf=8')))
property_key = response.url.split('=')[1].replace('&', '')
# logging.debug("Parsing property_key: %s", property_key)
property_info = self.parse_property_info(response)
property_values = self.parse_property_values(response)
property_sales = self.parse_property_sales(response)
property_info['property_key'] = property_key
property_info['sales'] = property_sales
property_info['values'] = property_values
yield Property(property_info)
评论列表
文章目录