summaryrefslogtreecommitdiff
path: root/tinder_bio.py
blob: 768771140e2d3ac323af1a3adda147f8ca8ccfa6 (plain) (blame)
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
import json
import datetime
import time
import requests
import os
import pytz

headers = {
    "app_version": "6.9.4",
    "platform": "ios",
    "content-type": "application/json",
    "User-agent": "Tinder/7.5.3 (iPhone; iOS 10.3.2; Scale/2.00)",
    "X-Auth-Token": os.environ["TINDER_TOKEN"],
}


if __name__ == "__main__":
    host = "https://api.gotinder.com"
    tinder_token = os.environ["TINDER_TOKEN"]

    while True:
        try:
            print(
                requests.post(
                    host + "/profile",
                    headers=headers,
                    data=json.dumps(
                        {
                            "bio": f"It's {datetime.datetime.utcnow().replace(tzinfo=pytz.UTC).astimezone(pytz.timezone('America/Los_Angeles')).strftime('%I:%M')} and you're on Tinder instead of watching Neon Genesis Evangelion with me."
                        }
                    ),
                ).json()
            )
        except requests.exceptions.RequestException as e:
            print(e)

        time.sleep(60)