Карьера в IT
2
Вклад в тег
path = 'D:\\For_Denis\\Projects\\nginx_log_parser\\big_log.txt'
path_1 = 'D:\\For_Denis\\Projects\\nginx_log_parser\\big_log_1.txt'
log = open(path, 'r')
logs = open(path_1, 'r')
lines = 0
for line in log:
lines = lines + 1
a = 0 #количество POST
b = 0 #количество пройденных строк
while b < lines:
check = str(logs.readline())
if 'GET' in check:
if '200' in check:
a += 1
b += 1
else:
b += 1
else:
b += 1
print(a)