assessment_spider.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:assessor-scraper 作者: codefornola 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号