# -*- coding: utf-8 -*- import json import requests # url="http://127.0.0.1:4050/v1/once" url="http://doris.paas.test/v1/once" # 如果在生产环境doris 01上执行,把url改成"http://127.0.0.1:4050/v1/once" header_dict={'Content-Type': 'application/x-www-form-urlencoded'} param_dict={} # param_dict["method"]="doris/search/doctor_officer" # param_detail = {"device_id": 'xx',"size": 10,"offset":0, "query": "双眼皮","user_city_tag_id": 328, # "is_officer":False,"filters":{}} param_dict["method"]="doris/search/bangdan" param_detail = {"device_id": '2',"size": 10,"offset":0, "user_city_tag_id": -1,"is_officer":False,"unit_ids":[]} # a = [105, 2941, 780, 102, 873, 2060, 187, 2935, 2108, 912, 928, 2059, 4437, 822, 2866, 2778, 824, 821, 2938] # b = [775, 2939, 789, 98, 872, 3042, 1890, 5074, 118, 811, 117, 92, 897, 152, 127, 126, 125, 123, 88, 115, 806] # c = [796, 234, 233, 232, 797, 116, 236, 986, 1370, 87, 2923, 86, 85, 89, 253, 798, 810, 153, 864, 863, 151, 777, 2056] # # x = [list(range(3000)),list(range(3000,6000)),list(range(6000,10000))] a = [list(range(1000)),list(range(1000,2000)),list(range(2000,3000))] b = [list(range(3000,4000)),list(range(4000,5000)),list(range(5000,6000))] # b = [[],[],[]] c = [list(range(6000,7000)),list(range(7000,8000)),list(range(8000,10000))] x = [a,b,c] y = [list(range(0,7000)),list(range(7000,8000)),list(range(8000,10000))] # param_detail = {"has_order": True,"tag_list":y, "in_whitelist": True,"user_city_tag_id": 328,"device_id": '861916048000595'} # param_detail = {"device_id":"xx","user_city_tag_id":328,"offset":0,"is_officer":True} param_dict["params"]=json.dumps(param_detail) a = requests.post(url=url,data=param_dict,headers=header_dict) print(a.content)