Check that user agent exists

main
Bob Mottram 2021-10-24 12:49:01 +01:00
parent b6479903cf
commit 611a6da196
1 changed files with 3 additions and 0 deletions

View File

@ -396,6 +396,9 @@ class PubServer(BaseHTTPRequestHandler):
"""Updates a dictionary of known crawlers accessing nodeinfo
or the masto API
"""
if not uaStr:
return
currTime = int(time.time())
if self.server.knownCrawlers.get(uaStr):
self.server.knownCrawlers[uaStr]['hits'] += 1