question
When I want to use POST to submit data, I find that the form data submitted by the website is the same key with different values, as shown in the figure below:
requests.post(url, data={
'experiment_id[]':'data1','experiment_id[]':'data2', ...})
It is definitely wrong to use this method, because the key in the dictionary is unique.
Solution
Use a list of tuples
import requests
r = requests.post(url, data=[('experiment_id[]', 'data1'), ('experiment_id[]', 'data2'), ...])
solve!