view master/src/wecu/mapper.py @ 65:e1f61f94b196

switch to curl->file, enable retries
author Henry S. Thompson <ht@markup.co.uk>
date Thu, 04 Jun 2020 12:08:29 +0000
parents a3edba8dab11
children
line wrap: on
line source

#!/usr/bin/python

import sys

response_counter = 0
request_counter = 0

for line in sys.stdin:
    if line.startswith('WARC-Type: response'):
        response_counter += 1
    if line.startswith('WARC-Type: request'):
        request_counter += 1
    
print('request_counter\t{}'.format(request_counter))
print('response_counter\t{}'.format(response_counter))