scrapy发送post请求

    def next_requests(self):
            body ={"count":24,"ff":"share","need":False,"sourceFrom":1,"request":1,"fontId":153}

            headers = {
                'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Mobile Safari/537.36',
                'Content-Type': 'application/json; charset=UTF-8',
            }
            yield Request(
                url=self.seed_url, headers=headers, body=json.dumps(body), method='POST', callback=self.parse,
                dont_filter=True
            )
原文地址:https://www.cnblogs.com/c-x-a/p/13891839.html