Giter Site home page Giter Site logo

teonite / google-places-scraper Goto Github PK

View Code? Open in Web Editor NEW
14.0 7.0 5.0 10 KB

Scraper for Google Places website

Home Page: https://teonite.com/

License: MIT License

Dockerfile 0.35% Makefile 1.23% Python 98.42%
google places scraper googleplaces scrapy

google-places-scraper's Introduction

Google places scraper

Introduction

This project was created by intern during his learning period. Main assumptions for this project was to create a tool that will allow to grab information about surrounding places of a certain point and store it in a structure from which we can easily take conclusion. It can be used for data science.

Using this tool it is possible to enter a radius variable in which places should be checked and get information such as addresses, level of prices, ratings of restaurants and other interesting information.

How to use it?

There are three methods to run this application:

1) Running service with app image and database image with default configuration using docker-compose command

NOTE: You must have Docker and docker-compose installed.

  1. Build images from docker-compose file from project folder
  2. Run app with cords, radius and api_key arguments
docker-compose build
docker-compose run --rm scrapy scrapy crawl GooglePlacesSpider -a cords='53.4284953,14.5494097' -a radius=100 -a api_key="your api key"

2) Running app on host machine

NOTE: To use this correctly you must have your own PostgreSQL database and modify settings file to use that database. Also you must have python and pip installed.

  1. Install all packages from requirements file
  2. Start app locally (use the same parameters like before)
pip install -r requirements.txt
python -m scrapy crawl GooglePlacesSpider -a cords='53.4284953,14.5494097' -a radius=100 -a api_key="your api key"

3) Running docker container with existing database

NOTE: You must have Docker installed.

  1. Build image with specific name
  2. Run container with database parameters that will set up connection to PostgreSQL (All connection params - host/port/user/pass - are supported)
docker build -t google-places-scraper .
docker run -e DB_NAME=db --rm google-places-scraper scrapy crawl GooglePlacesSpider -a cords='53.4284953,14.5494097' -a radius=100 -a api_key="your api key"

Above methods will result in scraped data into PostgreSQL database which is connected with geo-scrapper by default or by yourself.

google-places-scraper's People

Contributors

dbc-app avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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