Skip to main content
 首页 » 编程设计

python之访问正文以响应回调

2024年11月24日9zhoujg

我有一个关于 body 的 scrapy 请求。我想通过响应在我的回调方法中访问这个主体

body = '{"requests":[{"indexName":"prod_products","params":"query=&tagFilters=' + tag_filter \ 
               + '&page=' + page_number + '&getRankingInfo=true&ruleContexts=' + rule_contexts \ 
               + '&facets=' + self.facets + '"}]}' 
 
    yield Request(self.pagination_url_t, method='POST', 
                      body=body) 

请您参考如下方法: