123456789101112131415161718192021 |
- let answer = [];
- fetch('https://searx.space/data/instances.json')
- .then(response => response.json())
- .then(response => {
- searx_data = response.instances;
- for (var key in searx_data)
- if (searx_data[key]['http']['grade']=='A+')
- if ('tls' in searx_data[key])
- if (searx_data[key]['tls']['grade']=='A+')
- if ('html' in searx_data[key]) {
- temp = searx_data[key]['html']['grade'];
- if (temp=='V' || temp=='C')
- answer.push(key);
- }
- const randomInstance = answer[Math.floor(Math.random() * answer.length)];
- // to see selected instance
- // console.log(randomInstance)
- })
|