Skip to content

Commit

Permalink
Update bots and crawlers fixtures (#180)
Browse files Browse the repository at this point in the history
* Bump standard from 16.0.4 to 17.0.0

Bumps [standard](https://github.com/standard/standard) from 16.0.4 to 17.0.0.
- [Release notes](https://github.com/standard/standard/releases)
- [Changelog](https://github.com/standard/standard/blob/master/CHANGELOG.md)
- [Commits](standard/standard@v16.0.4...v17.0.0)

---
updated-dependencies:
- dependency-name: standard
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update bots and crawlers fixtures

* Reticulating splines...

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
omrilotan and dependabot[bot] committed Apr 25, 2022
1 parent be43474 commit 0bb39fb
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 19 deletions.
2 changes: 2 additions & 0 deletions fixtures/browsers.yml
Expand Up @@ -346,6 +346,8 @@ Motorola Internet:
- MOT-VE240/00.72 UP.Browser/7.2.7.5.548 (GUI) MMP/2.0 Novarra-Vision/8.0
Mozilla Android Components:
- MozacFetch/49.0.20200702190156
Naver Whale:
- Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.57 Whale/3.14.133.23 Safari/537.36
NCSA Mosaic:
- NCSA_Mosaic/2.7b5 (X11;Linux 2.6.7 i686) libwww/2.12 modified
NetFront:
Expand Down
13 changes: 8 additions & 5 deletions fixtures/crawlers.yml
Expand Up @@ -126,6 +126,10 @@ Censys:
- Mozilla/5.0 (compatible; CensysInspect/1.1; +https://about.censys.io/)
CF-UC:
- CF-UC User Agent v.1d.374049
Chrome Headless:
- Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/100.0.4896.88 Safari/537.36
- Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/83.0.4103.61 Safari/537.36
- Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/92.0.4512.0 Safari/537.36
ClamAV Website Scanner:
- ClamAV 0.95.3
- "ClamAV/0.101.5 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)"
Expand Down Expand Up @@ -440,10 +444,9 @@ Nagios check_http:
- check_http/v1.5 (nagios-plugins 1.5)
NalezenCzBot:
- NalezenCzBot/1.0 (http://www.nalezen.cz/about-crawler)
Naver:
- Mozilla/5.0 (compatible; Yeti/1.1; +http://naver.me/spd)
Naver Search:
- Mozilla/5.0 (Linux; Android 12; SM-G975N Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/90.0.4430.232 Whale/1.0.0.0 Crosswalk/26.90.3.21 Mobile Safari/537.36 NAVER(inapp; search; 1010; 11.11.3)
- Mozilla/5.0 (Linux; Android 8.0.0; SM-N950N Build/R16NW; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.88 Mobile Safari/537.36 NAVER(inapp; search; 1000; 11.8.4; 11)
- Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.0 Safari/537.36 (compatible; Yeti/1.1; +http://naver.me/spd)
nbertaupete95:
- Mozilla/5.0/Firefox/42.0 - nbertaupete95(at)gmail.com
Netcraft Survey Bot:
Expand Down Expand Up @@ -800,9 +803,9 @@ Yandex:
- Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)
Yandex Bot:
- Mozilla/5.0 (compatible; YandexVerticals/1.0; http://yandex.com/bots)
Yeti:
Yeti (Naver):
- Mozilla/5.0 (compatible; yeti/1.1; +http://naver.me/spd)
Yeti/Naverbot:
- Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.0 Safari/537.36 (compatible; Yeti/1.1; +http://naver.me/spd)
- Yeti/1.1 (Naver Corp.; http://help.naver.com/robots/)
Youdao Bot:
- Mozilla/5.0 (compatible; YoudaoBot/1.0; http://www.youdao.com/help/webmaster/spider/; )
Expand Down
2 changes: 1 addition & 1 deletion fixtures/downloads
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -86,7 +86,7 @@
"remark-cli": "^10.0.0",
"remark-preset-lint-recommended": "^6.0.0",
"rollup": "^2.70.2",
"standard": "^16.0.3",
"standard": "^17.0.0",
"stdline": "^1.0.0",
"typescript": "^4.6.3",
"user-agents": "^1.0.990",
Expand Down
27 changes: 17 additions & 10 deletions page/script.js
Expand Up @@ -28,17 +28,24 @@ import list from '../src/list.json'
timer = setTimeout(check, 200, value)
}

function append (parent, tag, string) {
if (tag) {
const ele = document.createElement('kbd')
ele.appendChild(document.createTextNode(string))
parent.appendChild(ele)
} else {
parent.appendChild(document.createTextNode(string))
}
}

function showMatch (output, ua) {
const pattern = document.createElement('kbd')
pattern.appendChild(
document.createTextNode(isbot.matches(ua)?.pop())
)
output.appendChild(
document.createTextNode(
'I think so, yes\nThe pattern that was matched is: '
)
)
output.appendChild(pattern)
const fragment = document.createDocumentFragment()
append(fragment, null, 'I think so, yes\n')
append(fragment, null, 'The substring ')
append(fragment, 'kbd', isbot.find(ua))
append(fragment, null, ' matches the pattern ')
append(fragment, 'kbd', isbot.matches(ua)?.pop())
output.appendChild(fragment)
}
function noMatch (output) {
output.appendChild(
Expand Down
4 changes: 2 additions & 2 deletions src/isbot/index.js
Expand Up @@ -12,12 +12,12 @@ export class Isbot {
/**
* @type {string[]}
*/
#list;
#list

/**
* @type {RegExp}
*/
#pattern;
#pattern

constructor (patterns) {
this.#list = patterns || list.slice()
Expand Down

0 comments on commit 0bb39fb

Please sign in to comment.