Commit c67e6c1d authored by litaolemo's avatar litaolemo

update

parent 1db93e93
# -*- coding:UTF-8 -*-
# @Time : 2020/12/11 14:56
# @File : temp_hospitol_to_redis.py
# @email : litao@igengmei.com
# @author : litao
# -*- coding:UTF-8 -*-
# @Time : 2020/12/4 13:24
# @File : temp_doris_to_redis.py
# @email : litao@igengmei.com
# @author : litao
import time
city_list = {
"aba":298,
"akesu":299,
"alashan":300,
"aletai":301,
"ali":302,
"anding":303,
"ankang":304,
"anning":305,
"anqing":306,
"anshan":307,
"anshun":308,
"anyang":309,
"aomen":310,
"baicheng":311,
"baise":312,
"baisha":313,
"baishan":314,
"baiyin":315,
"baodi":316,
"baoding":317,
"baoji":318,
"baoshan":319,
"baoting":320,
"baotou":321,
"bayannaoer":322,
"bayinguoleng":323,
"bazhong":324,
"beibei":325,
"beichen":326,
"beihai":327,
"beijing":328,
"bengbu":329,
"benxi":330,
"bijie":331,
"binzhou":332,
"bishan":333,
"boertala":334,
"bozhou":335,
"cangzhou":336,
"changchun":337,
"changde":338,
"changdu":339,
"changji":340,
"changjiang":341,
"changping":342,
"changsha":343,
"changshou":344,
"changshu":345,
"changzhi":346,
"changzhou":347,
"chaohu":348,
"chaoyang":349,
"chaozhou":350,
"chengde":351,
"chengdu":352,
"chengkou":353,
"chengmai":354,
"chenzhou":355,
"chifeng":356,
"chizhou":357,
"chongming":358,
"chongqing":359,
"chongzuo":360,
"chuxiong":361,
"chuzhou":362,
"dagang":363,
"dali":364,
"dalian":365,
"dandong":366,
"dangzaidao":367,
"danzhou":368,
"daqing":369,
"datong":370,
"daxing":371,
"daxinganling":372,
"dazhou":373,
"dazu":374,
"dehong":375,
"deyang":376,
"dezhou":377,
"dianjiang":378,
"dingxi":379,
"diqing":380,
"dongfang":381,
"dongguan":382,
"dongjing":2669,
"dongli":383,
"dongyang":384,
"dongying":385,
"eerduosi":386,
"enshi":387,
"ezhou":388,
"fangchenggang":389,
"fangshan":390,
"fengduxian":391,
"fengjie":392,
"fengtai":393,
"fengxian":394,
"foshan":395,
"fulingqu":396,
"fushun":397,
"fuxin":398,
"fuyang":399,
"fuzhou":400,
"fuzhou1":401,
"gannan":402,
"ganzhou":403,
"ganzi":404,
"gaoxiong":405,
"geermu":406,
"guangan":407,
"guangyuan":408,
"guangzhou":409,
"guigang":410,
"guilin":411,
"guiyang":412,
"guoluo":413,
"guyuan":414,
"haerbin":415,
"haibei":416,
"haidian":417,
"haidong":418,
"haikou":419,
"hainanzangzuzizhizhou":420,
"haixi":421,
"hami":422,
"handan":423,
"hangu":424,
"hangzhou":425,
"hanzhong":426,
"haozhou":430,
"hebi":427,
"hechi":428,
"hechuanshi":429,
"hefei":430,
"hegang":431,
"heihe":432,
"hejin":433,
"hengshui":434,
"hengyang":435,
"hetian":436,
"heyuan":437,
"heze":438,
"hezhou":439,
"honghe":440,
"huaian":441,
"huaibei":442,
"huaihua":443,
"huainan":444,
"huairou":445,
"hualian":446,
"huanggang":447,
"huangnan":448,
"huangshan":449,
"huangshi":450,
"huhehaote":451,
"huizhou":452,
"huludao":453,
"hulunbeier":454,
"huzhou":455,
"jiading":456,
"jiamusi":457,
"jian":458,
"jiangjinshi":459,
"jiangmen":460,
"jiangyou":461,
"jiaozuo":462,
"jiaxing":463,
"jiayi":464,
"jiayuguan":465,
"jieyang":466,
"jilin1":467,
"jinan":468,
"jinchang":469,
"jincheng":470,
"jingdezhen":471,
"jinghai":472,
"jingjiang":1681,
"jingmen":473,
"jingzhou":474,
"jinhua":475,
"jining":476,
"jinnan":477,
"jinshan":478,
"jinzhong":479,
"jinzhou":480,
"jiujiang":481,
"jiulong":482,
"jiuquan":483,
"jixi":484,
"jixian":485,
"jiyuan":486,
"jizhoushi":2536,
"kaifeng":487,
"kaixian":488,
"kashi":489,
"kelamayi":490,
"kezile":491,
"kuerle":492,
"kunming":493,
"kunshan":494,
"laibin":495,
"laiwu":496,
"langfang":497,
"lanzhou":498,
"lasa":499,
"ledong":500,
"leshan":501,
"liangpingxian":502,
"liangshan":503,
"lianyungang":504,
"liaocheng":505,
"liaoyang":506,
"liaoyuan":507,
"lijiang":508,
"lincang":509,
"linfen":510,
"lingao":511,
"lingshui":512,
"linxia":513,
"linyi":514,
"linzhi":515,
"lishui":516,
"liuan":517,
"liupanshui":518,
"liuzhou":519,
"longnan":520,
"longyan":521,
"loudi":522,
"luhuandao":523,
"luohe":524,
"luoyang":525,
"luzhou":526,
"lvliang":527,
"maanshan":528,
"mangu":3936,
"maoming":529,
"meishan":530,
"meizhou":531,
"mentougou":532,
"mianyang":533,
"miaoli":534,
"minhang":535,
"miyun":536,
"mocheng":284,
"mudanjiang":537,
"nanchang":538,
"nanchong":539,
"nanchuan":540,
"nanhui":541,
"nanjing":542,
"nanning":543,
"nanping":544,
"nantong":545,
"nantou":546,
"nanyang":547,
"naqu":548,
"neijiang":549,
"ningbo":550,
"ningde":551,
"ninghe":552,
"nujiang":553,
"panjin":554,
"panzhihua":555,
"pengshui":556,
"pingdingshan":557,
"pingdong":558,
"pinggu":559,
"pingliang":560,
"pingxiang":561,
"pudong":562,
"puer":563,
"putian":564,
"puyang":565,
"qiandongnan":566,
"qianjiang":567,
"qianjiangtujia":568,
"qiannan":569,
"qianxinan":570,
"qijiang":571,
"qingdao":572,
"qingpu":573,
"qingyang":574,
"qingyuan":575,
"qinhuangdao":576,
"qinzhou":577,
"qionghai":578,
"qiongzhong":579,
"qiqihaer":580,
"qitaihe":581,
"quanzhou":582,
"qujing":583,
"quzhou":584,
"rikaze":585,
"rizhao":586,
"rongchang":587,
"rongcheng":588,
"sanmenxia":589,
"sanming":590,
"sanya":591,
"shanghai":592,
"shangluo":593,
"shangqiu":594,
"shangrao":595,
"shannan":596,
"shantou":597,
"shanwei":598,
"shaoguan":599,
"shaoxing":600,
"shaoyang":601,
"shengzhou":7401,
"shennongjia":602,
"shenyang":603,
"shenzhen":604,
"shihezi":605,
"shijiazhuang":606,
"shijingshan":607,
"shiyan":608,
"shizhongxin":609,
"shizhu":610,
"shizuishan":611,
"shouer":612,
"shuangyashan":613,
"shunde":1033,
"shunyi":614,
"shuozhou":615,
"siping":616,
"songjiang":617,
"songyuan":618,
"suihua":619,
"suining":620,
"suizhou":621,
"suqian":622,
"suzhou":623,
"suzhou1":624,
"tacheng":625,
"taian":626,
"taibei":627,
"taicang":628,
"taidong":629,
"tainan":630,
"taiyuan":631,
"taizhong":632,
"taizhou":633,
"taizhou1":634,
"tanggu":635,
"tangshan":636,
"taoyuan":637,
"tianjin":638,
"tianmen":639,
"tianshui":640,
"tieling":641,
"tongchuan":642,
"tonghua":643,
"tongliang":644,
"tongliao":645,
"tongling":646,
"tongnan":647,
"tongren":648,
"tongzhou":649,
"tulufan":650,
"tunchang":651,
"wanning":652,
"wansheng":653,
"wanzhou":654,
"weifang":655,
"weihai":656,
"weinan":657,
"wenchang":658,
"wenshan":659,
"wenzhou":660,
"wuhai":661,
"wuhan":662,
"wuhu":663,
"wulanchabu":664,
"wulong":665,
"wulumuqi":666,
"wuqing":667,
"wushanxian":668,
"wuwei":669,
"wuxi":670,
"wuzhishan":671,
"wuzhong":672,
"wuzhou":673,
"xiamen":674,
"xian":675,
"xianggangdao":677,
"xiangtan":678,
"xiangxi":679,
"xiangyang":676,
"xianning":680,
"xiantao":681,
"xianyang":682,
"xiaogan":683,
"xilinguole":684,
"xingan":685,
"xingtai":686,
"xini":7382,
"xining":687,
"xinjiapo":5188,
"xinjie":688,
"xinxiang":689,
"xinyang":690,
"xinyu":691,
"xinzhou":692,
"xinzhu":693,
"xiqing":694,
"xishuangbanna":695,
"xiushan":696,
"xuancheng":697,
"xuchang":698,
"xuzhou":699,
"yaan":700,
"yan an":701,
"yanbian":702,
"yancheng":703,
"yangjiang":704,
"yangquan":705,
"yangzhou":706,
"yanji":707,
"yanqing":708,
"yantai":709,
"yibin":710,
"yichang":711,
"yichun":712,
"yichun1":713,
"yilan":714,
"yili":715,
"yinchuan":716,
"yingkou":717,
"yingtan":718,
"yiwu":297,
"yiyang":719,
"yongchuanshi":720,
"yongzhou":721,
"youyang":722,
"yubei":723,
"yueyang":724,
"yulin":725,
"yulin1":726,
"yuncheng":727,
"yunfu":728,
"yunlin":729,
"yunyangxian":730,
"yushu":731,
"yuxi":732,
"zaozhuang":733,
"zhanghua":734,
"zhangjiagang":735,
"zhangjiajie":736,
"zhangjiakou":737,
"zhangshu":738,
"zhangye":739,
"zhangzhou":740,
"zhanjiang":741,
"zhaoqing":742,
"zhaotong":743,
"zhengzhou":744,
"zhenjiang":745,
"zhongshan":746,
"zhongwei":747,
"zhongxian":748,
"zhoukou":749,
"zhoushan":750,
"zhuhai":751,
"zhumadian":752,
"zhuzhou":753,
"zibo":754,
"zigong":755,
"ziyang":756,
"zunyi":757,
}
query_list = {"鼻综合":22,
"激光脱面部其他毛发":36,
"切开双眼皮":85,
"埋线双眼皮":86,
"定点双眼皮":87,
"开内眼角":88,
"开外眼角":89,
"内切祛眼袋":90,
"外切祛眼袋":91,
"激光祛眼袋":92,
"吸脂祛眼袋":93,
"上眼睑下垂矫正":95,
"玻尿酸填充卧蚕":97,
"自体脂肪填充泪沟":98,
"玻尿酸填充泪沟":99,
"切眉":100,
"激光祛黑眼圈":101,
"自体脂肪填充黑眼圈":102,
"鼻部膨体假体取出":106,
"驼峰鼻矫正":107,
"鹰钩鼻矫正":108,
"歪鼻矫正":109,
"朝天鼻矫正":110,
"缩鼻背":111,
"手术缩鼻头":112,
"自体脂肪隆鼻":114,
"玻尿酸隆鼻":115,
"自体软骨垫鼻尖":116,
"注射瘦脸":117,
"吸脂瘦脸":118,
"自体脂肪丰苹果肌":120,
"玻尿酸填充丰苹果肌":121,
"颧骨内推":122,
"玻尿酸丰下巴":123,
"下巴前推":124,
"自体脂肪丰下巴":125,
"硅胶垫下巴":126,
"膨体垫下巴":127,
"缩下巴":129,
"宽下巴矫正":130,
"激光溶脂祛双下巴":131,
"酒窝成形术":134,
"自体脂肪丰面颊":135,
"自体脂肪丰太阳穴":136,
"玻尿酸丰太阳穴":137,
"硅胶丰太阳穴":138,
"膨体丰太阳穴":139,
"自体脂肪丰额头":140,
"玻尿酸丰额头":141,
"硅胶丰额头":142,
"膨体丰额头":143,
"招风耳矫正":144,
"大耳缩小术":145,
"杯状耳矫正":146,
"唇腭裂修复":150,
"厚唇改薄术":151,
"玻尿酸丰唇":152,
"自体脂肪丰唇":153,
"处女膜修复":161,
"包皮手术":164,
"填充阴唇":165,
"阴唇整形":167,
"注射祛腋臭":168,
"激光祛腋臭":169,
"激光脱发际线":171,
"植眉":172,
"种鬓角":174,
"植睫毛":175,
"黑脸娃娃":180,
"激光脱唇毛":181,
"激光祛红血丝":186,
"光子嫩肤":187,
"激光祛纹身":192,
"玻尿酸除颈纹":197,
"自体脂肪除颈纹":198,
"玻尿酸除法令纹":200,
"自体脂肪除法令纹":201,
"玻尿酸除眉间纹":203,
"胸部失败修复":210,
"乳房再造":211,
"假体隆胸":212,
"吸脂祛副乳":213,
"手术祛副乳":214,
"乳头内陷矫正":215,
"乳头缩小":216,
"乳晕缩小":217,
"乳晕漂染":218,
"乳房缩小":219,
"胸部下垂矫正":220,
"中医减肥其他项目":222,
"吸脂瘦背部":224,
"自体脂肪丰臀":225,
"产后塑形":226,
"腹壁成形术":228,
"膨体隆鼻":232,
"硅胶隆鼻":233,
"自体肋软骨隆鼻":234,
"激光溶脂瘦脸":236,
"注射瘦腿":237,
"吸脂瘦大腿":238,
"吸脂瘦小腿":239,
"吸脂瘦手臂":240,
"自体脂肪隆胸":241,
"玻尿酸除面部细纹":243,
"自体脂肪除面部细纹":244,
"植发际线":251,
"吸脂祛双下巴":252,
"鼻翼缩小":253,
"全瓷牙":255,
"手术祛腋臭":257,
"像素激光":258,
"植胡须":770,
"吸脂塑臀":774,
"点阵激光":775,
"玻尿酸丰面颊":776,
"玻尿酸祛黑眼圈":777,
"胶原蛋白填充丰唇":778,
"胶原蛋白填充祛黑眼圈":780,
"胶原蛋白注射隆鼻":782,
"胶原蛋白丰太阳穴":783,
"胶原蛋白填充丰下巴":784,
"胶原蛋白填充隆胸":785,
"胶原蛋白填充丰臀":786,
"胶原蛋白填充除法令纹":787,
"胶原蛋白填充丰面颊":788,
"胶原蛋白填充泪沟":789,
"下眼睑下至":790,
"泪腺脱垂整形":792,
"自体脂肪填充卧蚕":793,
"真皮填充卧蚕":795,
"埋线隆鼻":796,
"鼻中隔软骨垫鼻头":797,
"注射缩鼻头":798,
"假体垫鼻基底":803,
"玻尿酸垫鼻基底":804,
"自体脂肪垫鼻基底":805,
"鼻中隔软骨隆鼻":806,
"鼻孔矫正":810,
"溶脂针瘦脸":811,
"颧骨提高":813,
"凸嘴矫正":816,
"面部不对称改善":817,
"人工骨垫下巴":819,
"胶原蛋白填充苹果肌":820,
"白瓷娃娃":821,
"热玛吉":822,
"PRP自体血清美肤":824,
"美白针":825,
"手术祛疤":828,
"综合祛疤":832,
"注射祛疤":834,
"激光点痣":835,
"射频溶脂瘦手臂":836,
"小腿神经阻断术":838,
"假体丰臀":839,
"吸脂瘦肩":841,
"注射瘦肩":842,
"点穴减肥":843,
"针灸减肥":844,
"埋线减肥":845,
"错颌锁颌":850,
"隐形矫正":851,
"根管治疗":853,
"M唇成形术":864,
"阴茎延长":866,
"阴茎增粗":867,
"玻尿酸丰耳垂":868,
"轮廓修复术":869,
"胸部假体取出":870,
"超声提升":872,
"线雕":873,
"双眼皮修复":878,
"眶隔脂肪释放":881,
"玻尿酸垫眉弓":885,
"自体脂肪垫眉弓":886,
"硅胶垫眉弓":887,
"膨体垫眉弓":888,
"上眼睑祛脂":890,
"鼻小柱延长":897,
"额头缩小":899,
"人中缩短":901,
"射频溶脂塑臀":909,
"漂唇":910,
"红蓝光祛痘":912,
"化学剥脱祛斑":915,
"冷光美白":917,
"激光祛疤":919,
"拉皮":926,
"黄金微针":928,
"激光除皱":930,
"埋线除皱":931,
"放射状角膜切开术":942,
"准分子激光切削术":943,
"准分子激光原位角膜磨镶术":944,
"透明晶体摘除术":945,
"远视镜片矫正":946,
"激光屈光性角膜切削术":947,
"圆柱镜矫正":948,
"角膜接触镜矫正":949,
"角膜屈光手术":950,
"斜视镜片矫正":951,
"斜视矫正手术":952,
"眼科检查":953,
"玻尿酸填充隆胸":954,
"激光紧缩阴道":960,
"眼袋修复":964,
"鼻形态修复":965,
"鼻部硅胶假体取出":966,
"激光除妊娠纹":973,
"黄金微针除妊娠纹":974,
"冷冻祛腋臭":980,
"半永久纹眉":1370,
"水氧活肤":1703,
"自体脂肪全面部填充":1890,
"镭射净肤":1966,
"半永久纹眼线":2057,
"水光针":2059,
"无针水光":2060,
"射频提升":2063,
"激光脱腋毛":2065,
"激光脱比基尼部位":2066,
"激光脱臂毛":2067,
"激光脱大腿/小腿毛":2068,
"彩光嫩肤":2072,
"耳软骨隆鼻":2073,
"果酸焕肤":2108,
"身体检查":2213,
"玻尿酸溶解酶":2412,
"眼综合":2417,
"开眼角修复":2429,
"合金烤瓷牙":2453,
"二氧化锆烤瓷牙":2454,
"超声波洗牙":2455,
"树脂补牙":2456,
"拔龋齿":2459,
"拔智齿":2460,
"嘴角上扬术":2466,
"口腔检查":2467,
"孕睫术":2723,
"玻尿酸精华导入":2778,
"双颚手术":2818,
"热拉提":2866,
"人工骨隆鼻":2924,
"自体真皮隆鼻":2925,
"鼻小柱缩短":2926,
"长鼻矫正":2929,
"颧弓降低":2932,
"微针祛痘坑":2935,
"激光祛斑":2936,
"皮秒激光":2938,
"小气泡美肤":2939,
"微针水光":2941,
"玻尿酸丰乳头":2944,
"乳头再造":2945,
"胶原蛋白注射丰乳晕":2946,
"提眉修复":2950,
"卧蚕手术修复":2951,
"半永久纹发际线":2954,
"颧骨填充术":3001,
"微晶瓷隆鼻":3038,
"激光祛脂肪粒":3041,
"少女针注射":3043,
"童颜针注射":3045,
"假体填充苹果肌":3048,
"抗敏修复":3049,
"洗眼线":3050,
"肤质检测":3052,
"阴蒂整形":4282,
"菲洛嘉":4437,
"HPV检查":4870,
"全脸整形套餐":5058,
"V脸套餐":5059,
"祛斑套餐":5064,
"美白套餐":5065,
"补水套餐":5066,
"皮肤综合管理套餐":5067,
"洗牙套餐":5070,
"唇部综合":5071,
"除皱套餐":5073,
"玻尿酸注射套餐":5074,
"乳腺检查":5510,
"全飞秒":5871,
"半飞秒":5872,
"ICL晶体植入":5873,
"异物取出":5874,
"美胸套餐":6145,
"激光脱全身毛发":6160,
"射频祛眼袋":6163,
"O型腿矫正":6455,
"X型腿矫正":6456,
"G点注射":7091,
"牙齿瓷贴面":7129,
"自体软骨垫鼻基底":7151,
"女性私密检查":7175,
"阴唇漂红":7176,
"手术紧缩阴道":7177,
"性腺激活":7179,
"种植牙齿":7809,
"下颌角切除术":7823,
"玻尿酸丰眼窝":14198,
"注射去鼻背纹":14209,
"注射去口周纹":14210,
"注射去动态纹":14211,
"注射治疗多汗":14215,
"注射颏肌放松":14220,
"美白导入":14225,
"埋线祛眼袋":14590,
"光纤溶脂祛眼袋":14591,
"微针祛黑眼圈":14593,
"射频祛黑眼圈":14594,
"眼综合修复":14595,
"宽鼻矫正":14596,
"颧骨颧弓整形术":14597,
"下巴截骨":14598,
"下巴硅胶假体取出":14599,
"下巴膨体假体取出":14600,
"下颚前突/地包天":14601,
"上颚前突/天包地":14602,
"下颌角整形":14603,
"取颊脂垫瘦脸":14605,
"射频溶脂瘦脸":14606,
"光纤溶脂瘦脸":14607,
"冷冻溶脂瘦腹部":14608,
"冷冻溶脂瘦腰部":14609,
"冷冻溶脂瘦手臂":14610,
"冷冻溶脂瘦大腿":14611,
"冷冻溶脂瘦小腿":14612,
"冷冻溶脂瘦肩膀":14613,
"冷冻溶脂瘦背部":14614,
"冷冻溶脂瘦臀部":14615,
"射频溶脂瘦大腿":14616,
"射频溶脂瘦小腿":14617,
"射频溶脂瘦肩膀":14618,
"射频溶脂瘦背部":14619,
"射频溶脂瘦腰部":14620,
"射频溶脂瘦腹部":14621,
"超声溶脂瘦手臂":14622,
"超声溶脂瘦腰部":14623,
"超声溶脂瘦腹部":14624,
"超声溶脂瘦大腿":14625,
"超声溶脂瘦小腿":14626,
"超声溶脂瘦臀部":14627,
"超声溶脂瘦背部":14628,
"超声溶脂瘦肩部":14629,
"光纤溶脂瘦手臂":14630,
"光纤溶脂瘦腰部":14631,
"光纤溶脂瘦腹部":14632,
"光纤溶脂瘦大腿":14633,
"光纤溶脂瘦小腿":14634,
"光纤溶脂瘦背部":14635,
"光纤溶脂瘦臀部":14636,
"光纤溶脂瘦肩部":14637,
"吸脂瘦腰部":14639,
"吸脂瘦腹部":14640,
"吸脂瘦全身":14641,
"吸脂失败修复术":14643,
"杏仁酸焕肤":14644,
"水杨酸焕肤":14645,
"清痘针":14646,
"冷冻祛痣":14647,
"手术祛胎记":14648,
"激光祛胎记":14649,
"洗眉":14650,
"小棕瓶美白":14651,
"水光娃娃":14652,
"种植面膜":14653,
"SMAS除皱手术":14654,
"内窥镜手术提升":14655,
"小切口手术提升":14656,
"干细胞疗法":14657,
"复合隆胸":14658,
"男性乳房肥大矫正":14659,
"头顶加密种植":14660,
"美人尖种植":14661,
"种植胸毛":14662,
"种植私密毛发":14663,
"疤痕种植毛发":14665,
"防脱理疗":14667,
"乌发理疗":14668,
"深层清洁":14669,
"养发护理":14670,
}
import requests
import redis
import json
headers = {'X-GAIA-HELIOS-VERSION': '0.7.4','X-GM-Request-Id': '123','x-gm-path': '/6261582/','X-GM-Rpc-Method': 'doris/search/query_sku',}
# 测试
# rds = redis.StrictRedis.from_url("redis://172.18.51.17:6379/21", decode_responses=True)
# 正式
rds = redis.StrictRedis.from_url("redis://:XfkMCCdWDIU%ls$h3@172.16.50.159:6379", decode_responses=True)
bool_type_list = ('true','false')
for city in city_list:
for query in query_list:
for bool_type in bool_type_list:
redis_key = "v6_doctor_officer_doctor_{}_{}".format(bool_type, city_list[city])
try:
# if True:
# if rds.hexists(city,query):
# continue
data = {'requests':'[{\"request_id\": null, \"method\": \"doris/search/v6_doctor_officer\", \"params\": {\"sort_type\": \"0\", \"filters\": {}, \"offset\": 0, \"query\": \"%s\", \"device_id\": \"androidid_ba0799595f555c98\", \"user_city_tag_id\": %s, \"is_officer\": %s, \"size\": 50}, \"environment\": {\"trace_context\": {\"debug\": false, \"sampled\": true, \"trace_id\": \"4be057831300483a9f45fccb4931a2e2\", \"span_id\": \"0.4\"}, \"l5d_path\": null, \"passport\": {\"person_id\": \"22c1e597c69a11ea8211cab0ac1814b4\", \"nick_name\": \"LEMO搬砖中\", \"last_name\": \"LEMO搬砖中\", \"user_id\": 33525538, \"portrait\": \"http://pic.igengmei.com/img/user_portrait.png\"}, \"client_info\": {\"cl_os_ver\": \"10\", \"log_id\": \"backend.z1l7jrw626c3ea31f4b4cd9a12e8639d\", \"cl_id\": \"androidid_ba0799595f555c98\", \"cl_latitude\": \"40.001869\", \"session_id\": \"rha62d8u2gg1qwfjb4cz46pn73lkudng\", \"cl_type\": \"android\", \"user_ip\": \"111.196.163.68\", \"cl_ver\": \"7.37.0\", \"req_source\": \"gengmei\", \"gm_request_id\": \"a5514daa36e8a0b17417e08e3bb09b32\", \"cl_city_id\": \"beijing\", \"cl_longitude\": \"116.487285\", \"channel\": \"xiaomi\", \"span_id\": \"z1l7jrwce81da71e802451a9e6b9fb94\"}, \"session_id\": \"rha62d8u2gg1qwfjb4cz46pn73lkudng\"}}]' % (
query,city_list[city],bool_type) }
# print(data)
response = requests.post('http://172.16.50.10:8050/v1/batch', headers=headers, data=data)
# response = requests.post('http://doris.paas-develop.env/v1/batch', headers=headers, data=data)
data = json.dumps(response.json()[0]['data'])
# print(data)
# time.sleep(0.1)
# dict[query] = data
rds.hset(redis_key,query, data)
print(redis_key,query)
except Exception as e:
print(e)
continue
# break
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment