使用requests提交多个相同键不同值的方法,若直接使用字典的方式是不行的,因为字典的key名要唯一,

url = 'https://%s/times/add_time'%self.return_dut_ip()
data = ('name', 'all-time'), ('starttime', '00:00:00'), ('endtime', '23:59:59'), ('timetype', '0'), ('desc', ''), ('startdate', ''), ('enddate', ''), ('set', '提交'), ('weekdays[]', '1'), ('weekdays[]', '2'), ('weekdays[]', '3'), ('weekdays[]', '4'), ('weekdays[]', '5')
requests.post(url=url,headers=headers,data=data,verify=False)