What does a POST request look like? There are many options, such as simple query parameters ( ?a=1&b=2), a formal payload (the body contains a=1&b=2), or any other kind of payload (the body contains a string in some format, for example json or xml).
In scrapy, it's pretty easy to make POST requests, see http://doc.scrapy.org/en/latest/topics/request-response.html#request-usage-examples
For example, you might need something like this:
def start_requests(self):
payload = {"a": 1, "b": 2}
yield Request(url, self.parse_data, method="POST", body=urllib.urlencode(payload))
def parse_data(self, response):
data = json.loads(response.body)
source
share