Skip to content

Commit

Permalink
Add what we are trying to login to (PokemonGoF#692)
Browse files Browse the repository at this point in the history
  • Loading branch information
DustinChaloupka authored and 6iz committed Jul 21, 2016
1 parent 8bda86f commit 365a61f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pogom/pgoapi/auth_ptc.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def __init__(self):

def login(self, username, password):

self.log.info('Login for: %s', username)
self.log.info('PTC login for: %s', username)

head = {'User-Agent': 'niantic'}
r = self._session.get(self.PTC_LOGIN_URL, headers=head)

Expand Down
8 changes: 4 additions & 4 deletions pogom/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ def generate_location_steps(initial_location, num_steps):


def login(args, position):
log.info('Attempting login.')
log.info('Attempting login to Pokemon Go.')

api.set_position(*position)

while not api.login(args.auth_service, args.username, args.password):
log.info('Login failed. Trying again.')
log.info('Failed to login to Pokemon Go. Trying again.')
time.sleep(REQ_SLEEP)

log.info('Login successful.')
log.info('Login to Pokemon Go successful.')


def search(args):
Expand All @@ -68,7 +68,7 @@ def search(args):
remaining_time = api._auth_provider._ticket_expire/1000 - time.time()

if remaining_time > 60:
log.info("Skipping login process since already logged in for another {:.2f} seconds".format(remaining_time))
log.info("Skipping Pokemon Go login process since already logged in for another {:.2f} seconds".format(remaining_time))
else:
login(args, position)
else:
Expand Down

0 comments on commit 365a61f

Please sign in to comment.