stats.html (2307B)
1 $def with (visitors, total, unique, logfilter) 2 $var visitors = visitors 3 $var total = total 4 $var unique = unique 5 $ show = False 6 $ count = 0 7 <link rel="stylesheet" href="/static/splash.css?v=115" type="text/css" rel="stylesheet"/> 8 <meta name="viewport" content="width=device-width, initial-scale=1"> 9 <meta http-equiv="cache-control" content="no-cache"> 10 <html> 11 <head> 12 <title>THE STATS</title> 13 14 <a href="/">go back</a> | 15 <a href="?">no filter</a> | 16 <a href="?logfilter=bots">filter bots</a> | 17 <a href="?logfilter=botsandme">filter bots and me</a> 18 <br> 19 total visits: $total <br> 20 unique visits: $unique <br> 21 <br> 22 $ 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'] 23 $ 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'] 24 <div id="visitors"> 25 $for i in visitors: 26 $if logfilter == 'bots': 27 $for f in filters: 28 $if f in i['environ']: 29 $ show = False 30 $ break 31 $else: 32 $ show = True 33 $if show == True: 34 <img src="/static/flags/${i['countrycode']}.png"> | $i['country'] | $i['ip'] | $i['referer'] | $i['environ'] | $i['time'] <br> 35 $ count = count + 1 36 $ show = False 37 $elif logfilter == 'botsandme': 38 $for f in filters: 39 $if f in i['environ']: 40 $ show = False 41 $ break 42 $else: 43 $ show = True 44 $for ip in ip_filters: 45 $if ip in i['ip']: 46 $ show = False 47 $ break 48 $else: 49 $ show = True 50 $if show == True: 51 <img src="/static/flags/${i['countrycode']}.png"> | $i['country'] | $i['ip'] | $i['referer'] | $i['environ'] | $i['time'] <br> 52 $ count = count + 1 53 $ show = False 54 $else: 55 <img src="/static/flags/${i['countrycode']}.png"> | $i['country'] | $i['ip'] | $i['referer'] | $i['environ'] | $i['time'] <br> 56 $ count = count + 1 57 58 <br> 59 total potential real visitors 60 $count 61 </div> 62 </head> 63 </html>