Python Requests - Is it possible to receive a partial response after an HTTP POST?
问题 I am using the Python Requests Module to datamine a website. As part of the datamining, I have to HTTP POST a form and check if it succeeded by checking the resulting URL. My question is, after the POST, is it possible to request the server to not send the entire page? I only need to check the URL, yet my program downloads the entire page and consumes unnecessary bandwidth. The code is very simple import requests r = requests.post(URL, payload) if 'keyword' in r.url: success fail 回答1: An easy