首页 > 其他 > 详细

scrapy发送post请求

时间:2020-10-28 19:45:00      阅读:28      评论:0      收藏:0      [点我收藏+]
    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
            )

scrapy发送post请求

原文:https://www.cnblogs.com/c-x-a/p/13891839.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!