Last active
April 4, 2022 00:54
-
-
Save prr21/f3f72641414f8656b8b230ac8ff8e164 to your computer and use it in GitHub Desktop.
auto_like_tinder_recs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function silance(){ | |
const recs = await getRecs() | |
const userRecs = recs.results.map(a => a.user) | |
const res = await Promise.allSettled(userRecs.map(goSilance)) | |
return res.map(a => a.value) | |
} | |
async function getRecs(){ | |
return await s("https://api.gotinder.com/user/recs?locale=en", getBody()) | |
} | |
async function goSilance(user) { | |
return [await s(`https://api.gotinder.com/like/${user._id}?locale=ru`, getBody()), user] | |
} | |
async function s(url){ | |
const promise = fetch(url) | |
return await promise.then(a => a.json()) | |
} | |
function getBody() { | |
return { | |
"headers": { | |
"accept": "application/json", | |
"accept-language": "en,en-US,ru,ru-RU,no", | |
"app-session-id": "c8704d0b-8079-4607-9db6-dd0e9015775b", | |
"app-session-time-elapsed": "1319064", | |
"app-version": "1032200", | |
"content-type": "application/json", | |
"persistent-device-id": "df8433a6-f666-45ba-9f01-61e5aa411672", | |
"platform": "web", | |
"sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"100\", \"Google Chrome\";v=\"100\"", | |
"sec-ch-ua-mobile": "?0", | |
"sec-ch-ua-platform": "\"Windows\"", | |
"sec-fetch-dest": "empty", | |
"sec-fetch-mode": "cors", | |
"sec-fetch-site": "cross-site", | |
"tinder-version": "3.22.0", | |
"user-session-id": "ac7a6103-d023-4556-be58-01f595976c46", | |
"user-session-time-elapsed": "34946", | |
"x-auth-token": localStorage.getItem('TinderWeb/APIToken'), | |
"x-supported-image-formats": "jpeg" | |
}, | |
"referrer": "https://tinder.com/", | |
"referrerPolicy": "origin", | |
"body": "{\"nudge\":true,\"last_activity_date\":\"2022-04-03T13:03:40.501Z\"}", | |
"method": "POST", | |
"mode": "cors", | |
"credentials": "omit" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment