Skip to content Skip to sidebar Skip to footer

Python3 Request - Post Request With Form Data

I'm trying to send a POST Request with form data to some form. I'm using requests package. #!/bin/python3.6 import requests FFF_search = 'https://www.fff.fr/la-vie-des-clubs/resu

Solution 1:

You should consider several issues:

  • Your's headers dict is not valid. There is no 'User-Agnet' that called test. You should use only valid headers headers. Try to send all the headers you see in the network tab.

  • Your's data us clearly wrong. You should send the described Form Data ad a dictionary and pass it with data=data, as you do (but you do it with a wrong data). Maybe the data you are passing now is the params?

Try to send the exact request like your's browser sending (with the same params and headers), and see the results you are receiving, with paying attention to the issues above.

Post a Comment for "Python3 Request - Post Request With Form Data"