stats.html (2250B)
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 15 <a href="/dude">go back</a> | 16 <a href="?">no filter</a> | 17 <a href="?logfilter=bots">filter bots</a> | 18 <a href="?logfilter=botsandme">filter bots and me</a> 19 <br> 20 total visits: $total <br> 21 unique visits: $unique <br> 22 <br> 23 $ 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'] 24 $ 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'] 25 <div id="visitors"> 26 $for i in visitors: 27 $if logfilter == 'bots': 28 $for f in filters: 29 $if f in i.environ: 30 $ show = False 31 $ break 32 $else: 33 $ show = True 34 $if show == True: 35 <img src="/static/flags/${i.countrycode}.png"> | $i.country | $i.ip | $i.referer | $i.environ | $i.time <br> 36 $ count = count + 1 37 $ show = False 38 $elif logfilter == 'botsandme': 39 $for f in filters: 40 $if f in i.environ: 41 $ show = False 42 $ break 43 $else: 44 $ show = True 45 $for ip in ip_filters: 46 $if ip in i.ip: 47 $ show = False 48 $ break 49 $else: 50 $ show = True 51 $if show == True: 52 <img src="/static/flags/${i.countrycode}.png"> | $i.country | $i.ip | $i.referer | $i.environ | $i.time <br> 53 $ count = count + 1 54 $ show = False 55 $else: 56 <img src="/static/flags/${i.countrycode}.png"> | $i.country | $i.ip | $i.referer | $i.environ | $i.time <br> 57 $ count = count + 1 58 59 <br> 60 total potential real visitors: 61 $count 62 </div> 63 </head> 64 </html>