1、re
import re
reg_add_req_details = re.compile(".*?smcdid:(?P<smcdid>.+?),.*?groupid:(?P<groupid>.+?),.*?dst_uin:(?P<dst_uin>.+?),.*?transform_type:(?P<transform_type>.+?),.*?codec:(?P<codec>.+?),.*?height:(?P<height>.+?),.*?width:(?P<width>.+?),.*?min_bitrate:(?P<min_bitrate>.+?),.*?tgr_bitrate:(?P<tgr_bitrate>.+?),.*?max_bitrate:(?P<max_bitrate>.+?),.*?min_fps:(?P<min_fps>.+?),.*?max_fps:(?P<max_fps>.+?),.*?min_qp:(?P<min_qp>.+?),.*?max_qp:(?P<max_qp>.+?),.*?gop_type:(?P<gop_type>.+?),.*?gop:(?P<gop>.+?),.*?enc_mode:(?P<enc_mode>.+?),.*?svc_layer:(?P<svc_layer>.+?),.*?cmd_seq:(?P<cmd_seq>.+?),.*?access_ip:(?P<access_ip>.+?),.*?access_port:(?P<access_port>.+?),.*?acc_changed:(?P<acc_changed>.+?),.*?codec_changed:(?P<codec_changed>.+?).*?")
match_add_req_details = reg_add_req_details.match(detail)
if match_add_req_details is None:
logging.error("match_gcc None")
return task_msg_dict
gcc_union_dict = match_add_req_details.groupdict()
str_list = str.split("|",2) # 先按照“|”分割成固定三份
3、[0:-2]
4、int map
num_dist = list(map(int, num_dist)) # string -> int
No comments yet.