$def with (visitors, total, unique, logfilter) $var visitors = visitors $var total = total $var unique = unique $ show = False $ count = 0 THE STATS go back | no filter | filter bots | filter bots and me
total visits: $total
unique visits: $unique

$ ip_filters = ['85.76.43.33', '85.76.65.220', '85.76.65.227','84.253.216.59', '83.245.233.58', '85.76.142.151'] $ filters = ['SemrushBot', 'Windows NT', 'Applebot', 'Amazonbot', 'bingbot', 'ClaudeBot', 'MJ12bot', 'AhrefsBot', 'YisouSpider' 'spider','Twitterbot','Scanning-activity', 'web index', 'spider', 'Bot', 'Spider', 'Crawler', 'Odin', 'crawler', 'Go-http-client', 'robot']
$for i in visitors: $if logfilter == 'bots': $for f in filters: $if f in i['environ']: $ show = False $ break $else: $ show = True $if show == True: | $i['country'] | $i['ip'] | $i['referer'] | $i['environ'] | $i['time']
$ count = count + 1 $ show = False $elif logfilter == 'botsandme': $for f in filters: $if f in i['environ']: $ show = False $ break $else: $ show = True $for ip in ip_filters: $if ip in i['ip']: $ show = False $ break $else: $ show = True $if show == True: | $i['country'] | $i['ip'] | $i['referer'] | $i['environ'] | $i['time']
$ count = count + 1 $ show = False $else: | $i['country'] | $i['ip'] | $i['referer'] | $i['environ'] | $i['time']
$ count = count + 1
total potential real visitors $count