Skip to content

Commit

Permalink
I swear if you guys, I am this close to quitting this repo
Browse files Browse the repository at this point in the history
  • Loading branch information
deedeeh committed Oct 3, 2023
1 parent 1768aec commit 7b4d205
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ isbot('Mozilla/5.0 (X11) Firefox/111.0') // true
### Exclude: Remove matches of known crawlers
Remove rules to user agent match RegExp (see existing rules in `src/list.json` file)

> This function requires konwnledge of the internal structure of the list - which may change at any time. It is recommended to use the `clear` function instead
```js
isbot('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4590.2 Safari/537.36 Chrome-Lighthouse') // true
isbot.exclude(['chrome-lighthouse']) // pattern is case insensitive
Expand Down
1 change: 1 addition & 0 deletions fixtures/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,7 @@ ZZZ Glitches and Misidentified Browsers - These browsers are legit user agent ev
- Android 11) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.185 Mobile DuckDuckGo/5 Safari/537.36
- Android 13) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/114.0.5735.196 Mobile DuckDuckGo/5 Safari/537.36
- daumoa,damoa,daum,daumos,duamoa,duam,duamos
- GoogleApp/14.35.18.28.arm64
- Hello, world
- LWPrCa2l') OR 941=(SELECT 941 FROM PG_SLEEP(15))--
- Mozilla / 5.0 (Linux; Android 7.0; GHIA_ZEUS_3G) AppleWebKit / 537.36 (KHTML, como Gecko) Chrome / 87.0.4280.101 Mobile Safari / 537.36
Expand Down
3 changes: 3 additions & 0 deletions fixtures/crawlers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ Apple:
Apple PubSub:
- Apple-PubSub/65.28
Applebot:
- Mozilla/5.0 (iPhone; CPU iPhone OS 13_4_1 like Mac OS X) AppleWebKit/605.1.15Z (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1 (Applebot/0.1)
- Mozilla/5.0 (iPhone; CPU iPhone OS 8_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12B410 Safari/600.1.4 (Applebot/0.1; +http://www.apple.com/go/applebot)
- Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/600.2.5 (KHTML, like Gecko) Version/8.0.2 Safari/600.2.5 (Applebot/0.1)
- Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15 (Applebot/0.1)
Application Health Service:
- ApplicationHealthService/1.0
- ELB-HealthChecker/2.0
Expand Down
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ declare namespace isbot {

/**
* Removes a set of user agent from the built-in list
* This function requires konwnledge of the internal structure of the list - which may change at any time. It is recommended to use the `clear` function instead
* @param {string[]} filters An array of regular expression patterns
* @returns {void}
*/
Expand Down

0 comments on commit 7b4d205

Please sign in to comment.