""" @author: luojunhui """ import json import time import requests import argparse from concurrent.futures import ThreadPoolExecutor def request_data(url): # index = _url.split("#")[0] # url = _url.split("#")[1] body = { "accountName": "魔法美学馆", "content": "8月20日,最高人民法院举行新闻发布会,发布新修订的《最高人民法院关于审理民间借贷案件适用法律若干问题的规定》(以下简称《规定》)并回答记者提问。", "title": "🔴日本收到俄罗斯令人惊慌的消息😱", "search_keys": ["日本核污水排海"], "ghId": "gh_efaf7da157f5" } t = time.time() res = requests.post(url, json=body) e = time.time() # print(index) print(e - t) print(json.dumps(res.json(), ensure_ascii=False, indent=4)) # print(res.json()) if __name__ == "__main__": # parser = argparse.ArgumentParser() # 新建参数解释器对象 # parser.add_argument("--thread") # args = parser.parse_args() # thread = int(args.thread) dt = ["http://61.48.133.26:8111/title_to_video"] # total_s = time.time() request_data(dt[0]) # with ThreadPoolExecutor(max_workers=thread) as pool: # pool.map(request_data, dt) # total_e = time.time() # print(total_e - total_s) import uuid import urllib.parse