Git Product home page Git Product logo

pokemongo-api-demo's Introduction

Pokemon Go API Demo with OpenStreetMap Folium Leaflet

  • USE AT YOUR OWN RISK !
  • includes protobuf file
  • ugly code
  • andylicious code enhancement

This code is a fork from https://github.com/tejado/pgoapi, and all I've done here is utilize the folium library to add markers to the location of each pokemon. It saves the map to an .html file and immediately runs a web browser to that file for easy viewing.

You need a pokemon trainer account, located here: https://sso.pokemon.com/sso/login?locale=en&service=https://www.pokemon.com/us/pokemon-trainer-club/caslogin

Suggested to use dummy test dev account for this.

Sign up should be fairly simple, and you utilize the user/pass as CLI arguments

Pre-installation

sudo su 
pip install protobuf geopy requests s2sphere folium

Demo

$ python main.py -u username -p mypassword -l "204 2nd Ave, San Mateo"
[!] Your given location: 204 2nd Ave, San Mateo, CA 94403, USA
[!] lat/long/alt: 37.5513481 -122.291137 0.0
[!] login for: tejado
[+] RPC Session Token: TGT-899360-gFKDueEjBcKX4G ...
[+] Received API endpoint: https://pgorelease.nianticlabs.com/plfe/401/rpc
[+] Login successful
[+] Username: username 
[+] You are playing Pokemon Go since: 2016-07-13 08:10:20
[+] Poke Storage: 250
[+] Item Storage: 350
[+] POKECOIN: 0
[+] STARDUST: 600
Within one step of LatLng: 37.7861784887,-122.408499387 (222m SW from you):
	(92) Gastly
Within one step of LatLng: 37.7885606156,-122.408499387 (112m NW from you):
	(21) Spearow
	(41) Zubat
	(32) Nidoran ♂

(21) Spearow is visible at (37.7886329623, -122.407658647) for 169 seconds (73m NW from you)
(41) Zubat is visible at (37.7887988683, -122.409782609) for 70 seconds (224m NW from you)
(32) Nidoran ♂ is visible at (37.7885226453, -122.408986128) for 805 seconds (148m NW from you)
(41) Zubat is visible at (37.7890195112, -122.40712765) for 84 seconds (117m NE from you)
(23) Ekans is visible at (37.7900544956, -122.407393149) for 227 seconds (229m N from you)
(92) Gastly is visible at (37.7869393568, -122.408809132) for 356 seconds (168m SW from you)

Pressing "y" will continually add markers for each pokemon found. Pressing "n" will output the map in a new browser. Tested only on a mac so far

alt tag

Credits

Thanks a lot to Mila432 !
C# Port by BclEx Addendum: Thanks to leegao for the concept and proof of code/example!

pokemongo-api-demo's People

Contributors

altech-stack avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.