Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian aa1bba84aa 1.142.1 2020-11-23 00:30:28 +01:00
DebaucheryLibrarian ca7c8f0afd Updated place resolve module to use new HTTP module. 2020-11-23 00:30:20 +01:00
3 changed files with 8 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.142.0",
"version": "1.142.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.142.0",
"version": "1.142.1",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {

View File

@ -11,8 +11,12 @@ async function resolvePlace(query) {
try {
// https://operations.osmfoundation.org/policies/nominatim/
const res = await http.get(`https://nominatim.openstreetmap.org/search/${encodeURI(query)}?format=json&accept-language=en&addressdetails=1`, {
'User-Agent': 'contact at moonloop.adult@protonmail.com',
}, { queueMethod: '1s' });
headers: {
'User-Agent': 'contact at moonloop.adult@protonmail.com',
},
interval: 1000,
concurrency: 1,
});
const [item] = res.body;