网站日志 导出ua
2020-03-12 python 1023
# 网站日志 导出ua import re with open("域名.com.log","r",encoding="utf-8") as f: uas = [] for line in f.read().split("\n"): m = re.search("Android\s+\d|iPhone;",line) if m is not None: ua_txt = line.split('" "') uas.append(ua_txt[-1][:-1]) #print(ua_txt[-1][:-1]) uas_set = set(uas) with open("ua_lst.txt","w",encoding="utf-8") as fw: fw.write("\n".join(uas_set))
很赞哦! (0)
相关文章
文章评论
-
-
-
0条评论