Skip to content

Instantly share code, notes, and snippets.

@noahbroyles
Last active September 28, 2021 13:38
Show Gist options
  • Save noahbroyles/efbf467643fd581d27a2625e05a71757 to your computer and use it in GitHub Desktop.
Save noahbroyles/efbf467643fd581d27a2625e05a71757 to your computer and use it in GitHub Desktop.
Some criteria for determining if your site visitor is a bot or not
{
"blackListed": {
"IP": [],
"userAgent": [
"Mozilla/5.0+(X11;+Linux+x86_64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/56.0.2924.87+Safari/537.36+Google+(+https://developers.google.com/+/web/snippet/)"
],
"regexRules": {
"IP": [
"(66.249.\\d{1,3}.\\d{1,3})"
],
"userAgent": [
".*bing.*",
".*bot.*"
],
"comment": "Elements in these lists must be valid string Python regex expressions"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment