GithubHelp home page GithubHelp logo

detaineddeveloper / pokemon-data-scraper Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 117 KB

I wanted to make different Pokemon projects, so I scraped the data. Have fun!

License: GNU General Public License v3.0

Python 100.00%
pokemon pokemons pokemon-scraper scraper python python3 python-scraper

pokemon-data-scraper's Introduction

Pokemon Data Scraper

I wanted to make different Pokemon projects, so I scraped the data. Here it is, have fun!

  • pokedex_raw.json and pokedex.json have same data
  • Just that pokedex_raw.json is all in one line
  • Whilst I've properly formatted pokedex.json

Brief Explanation

  • First of all, requests and json already come with python, so there is no need for requirements.txt
  • I've added comments and that cover everything in detail

How code works

  1. A request is sent to Pokemon API followed by pokemon's id

  2. Then convert the response to json

  3. poke{} dictionary/map holds data for current pokemon

    • id
    • name
    • height
    • weight
    • xp
    • image_url Pokeres
  4. abilities[], stats[] and types[] hold data of abilities, stats and types of current pokemon and then, assigned to current pokemon

    • poke['abilities'] = abilities
    • poke['stats'] = stats
    • poke['types'] = types
  5. Then, the current poke{} is assigned to pokemons{} with the key of pokemon's name

    • pokemons[poke['name']] = poke
  6. Finally, pokemons{} is converted to json and stored in a .json file

pokemon-data-scraper's People

Contributors

detaineddeveloper avatar

Stargazers

 avatar

Watchers

 avatar  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.