Commit 17266b8f authored by litaolemo's avatar litaolemo

update

parent 2b3197c1
...@@ -122,8 +122,8 @@ pid_list = rds.hkeys("weibo") ...@@ -122,8 +122,8 @@ pid_list = rds.hkeys("weibo")
# for line in f: # for line in f:
for pid in pid_list: for pid in pid_list:
res = rds.hget("weibo", pid) res = rds.hget("weibo", pid)
# if rds.hexists("xiaohongshu_with_img", pid): if rds.hexists("xiaohongshu_with_img", pid):
# continue continue
res_json = json.loads(res) res_json = json.loads(res)
video_dic = {} video_dic = {}
qiniu_img_list = [] qiniu_img_list = []
......
...@@ -42,6 +42,8 @@ dic_type = { ...@@ -42,6 +42,8 @@ dic_type = {
"cims/reply/batch_create":"replies" "cims/reply/batch_create":"replies"
} }
invoker = create_default_invoker(debug=True).with_config(dump_curl=True)
def post_muilty_data(data_list:typing.List,rpc_type:str) -> typing.Dict: def post_muilty_data(data_list:typing.List,rpc_type:str) -> typing.Dict:
headers = { headers = {
'X-GAIA-HELIOS-VERSION': '0.7.5', 'X-GAIA-HELIOS-VERSION': '0.7.5',
...@@ -54,8 +56,6 @@ def post_muilty_data(data_list:typing.List,rpc_type:str) -> typing.Dict: ...@@ -54,8 +56,6 @@ def post_muilty_data(data_list:typing.List,rpc_type:str) -> typing.Dict:
# data_dict_copy.pop(key) # data_dict_copy.pop(key)
# data_list_new.append(data_dict_copy) # data_list_new.append(data_dict_copy)
dic = {dic_type[rpc_type]: data_list} dic = {dic_type[rpc_type]: data_list}
invoker = create_default_invoker(debug=True).with_config(dump_curl=True)
res = invoker[rpc_type](**dic) res = invoker[rpc_type](**dic)
# print(res.) # print(res.)
...@@ -73,7 +73,6 @@ def post_single_data(data_dict:typing.Dict,rpc_type:str) -> typing.Dict: ...@@ -73,7 +73,6 @@ def post_single_data(data_dict:typing.Dict,rpc_type:str) -> typing.Dict:
data_dict_copy.pop(key) data_dict_copy.pop(key)
print(data_dict_copy) print(data_dict_copy)
dic = {dic_type[rpc_type]: [data_dict_copy]} dic = {dic_type[rpc_type]: [data_dict_copy]}
invoker = create_default_invoker(debug=True).with_config(dump_curl=True)
res = invoker[rpc_type](**dic) res = invoker[rpc_type](**dic)
# print(res.) # print(res.)
......
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