scrapy中发起post请求

    def start_requests(self):
        for i1 in self.start_urls:
            data = {
                'page': '1',
                'rows': '20',
                'annNum': '1678',
                'annType': '',
                'tmType': '',
                'coowner': '',
                'recUserName': '',
                'allowUserName': '',
                'byAllowUserName': '',
                'appId': '',
                'appIdZhiquan': '',
                'bfchangedAgengedName': '',
                'changeLastName': '',
                'transferUserName': '',
                'acceptUserName': '',
                'regName': '',
                'tmName': '',
                'intCls': '',
                'fileType': '',
                'totalYOrN': 'false',
                'appDateBegin': '',
                'appDateEnd': '',
                'agentName': '',
            }
            for i2 in range(1, 13540):
                data['page'] = str(i2)
                yield scrapy.FormRequest(i1, formdata=data, callback=self.parse)
原文地址:https://www.cnblogs.com/tulintao/p/12186041.html