Send POST to server via python-requests

Posted by in Software

The other day I’ve had a question asked:

How do you send a form data to a server and get the reply?

My solution involves python-requests:

r.text contains the reply HTML page, which then needs to be processed via e.g. python’s DOM processing module or BeautifulSoup (if you’re looking for something more tolerant).

HTH,


A little experiment: If you find this post and ad below useful, please check the ad out :-)