-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.js
50 lines (47 loc) · 2.07 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const axios = require('axios')
const colors = require('colors')
let tiboData = {}
module.exports = (token, blacklist) => {
console.log(colors.magenta('Tibo 1.0'))
console.log(colors.magenta('Desenvolvido por Hélio Kröger'))
console.log(colors.magenta('https://heliojuniorkroger.com'))
tiboData.headers = {
headers: {
'x-auth-token': token
}
}
tiboData.blacklist = blacklist
start()
}
const start = () => {
axios.get('https://api.gotinder.com/recs/core', tiboData.headers)
.then(res => {
res.data.results.map((person, i) => {
person.bio.split(' ').map(word => {
tiboData.blacklist.map(blacklistWord => {
if (word.toLowerCase() === blacklistWord) {
axios.options(`https://api.gotinder.com/pass/{person._id}`, tiboData.headers)
.then(() => {
console.log(colors.red(`Recusou ${person.name}, ${new Date().getFullYear() - new Date(person.birth_date).getFullYear()} (motivo: "${blacklistWord}" na bio)`))
})
.catch(err => {
throw err
})
return false
}
})
})
axios.options(`https://api.gotinder.com/like/{person._id}`, tiboData.headers)
.then(() => {
console.log(colors.green(`Curtiu ${person.name}, ${new Date().getFullYear() - new Date(person.birth_date).getFullYear()}`))
})
.catch(err => {
throw err
})
if (i === (res.data.results.length - 1)) start()
})
})
.catch(err => {
throw err
})
}