0

I need to reproduce the following POST form structure: enter image description here

from what I found, I can represent multiple values of sites key this way: how to post multiple value with same key in python requests?

but how to combine this multi-valued key with regular keys action and extype? I can't use a regular dict for parameters anymore.

Community
  • 1
  • 1
kurtgn
  • 8,140
  • 13
  • 55
  • 91

1 Answers1

1

I don't understand why you can't use a "regular dict". On the contrary:

params = {'sites[]': [951, 1007, ...], 'action': 'set', 'extype': 'exclude'}
requests.post('url', data=params)
Daniel Roseman
  • 588,541
  • 66
  • 880
  • 895