简单python日志抓取脚本

#!/usr/bin/python
#coding:utf-8
import re
x=open('access1.log')
abc={}
for i in x:
m=re.search('firefox',i)
if m:
key=m.group()
abc[key]=abc.get(key,0)+1
print abc
原文地址:https://www.cnblogs.com/yunsshcy/p/8632966.html