forked from RocketMap/RocketMap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccept-tos.py
More file actions
28 lines (23 loc) · 892 Bytes
/
accept-tos.py
File metadata and controls
28 lines (23 loc) · 892 Bytes
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
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""accept-tos.py: Example script to accept in-game Terms of Service"""
import sys
from pgoapi import PGoApi
from pgoapi.utilities import f2i
from pgoapi import utilities as util
from pgoapi.exceptions import AuthException
import pprint
import time
import threading
def accept_tos(username, password):
api = PGoApi()
api.set_position(40.7127837, -74.005941, 0.0)
api.login('google', username, password)
time.sleep(2)
req = api.create_request()
req.mark_tutorial_complete(tutorials_completed = 0, send_marketing_emails = False, send_push_notifications = False)
response = req.call()
print('Accepted Terms of Service for {}'.format(username))
#print('Response dictionary: \r\n{}'.format(pprint.PrettyPrinter(indent=4).pformat(response)))
if __name__ == '__main__':
accept_tos("plopkoekgo{}@gmail.com".format(sys.argv[1]), 'plopkoek2')