Skip to content

2.0.0

Latest

Choose a tag to compare

@tn3w tn3w released this 21 Nov 16:53
· 13 commits to main since this release
6df833a

Breaking: identify now describes every user agent and returns a dict for browsers too, with bot telling the two apart. Keys without a value are left out.

  • Browser identification from browsers.json: browser, engine, os with versions, device, brand, model, cpu and languages, checked against a 644 user agent gold set.
  • verify(user_agent, ip) checks crawler IPs offline against the bundled networks of every rdns suffix (forward-confirmed from the iplore rDNS database) and every ranges URL. lookup=True adds a live forward-confirmed reverse DNS check for addresses the data does not know yet. networks(ip) lists the crawler networks containing an address.
  • Unknown bots get a name and version too, plus urls, emails and signals explaining why they count as bots.
  • agents(*tags) and robots_txt(*tags, path="/") generate robots.txt rules.
  • python -m uaid reads user agents, or IP<TAB>user agent lines, and prints JSON.
  • Results are cached, rules are looked up through trigram indexes, and import takes about 19 ms.
  • rDNS suffixes and official IP range URLs added for about 150 more crawlers.
  • Builds work offline: crawler-ips.json now lives in the repository and is refreshed daily.