Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/esaum10/place_scrapper
Scrapping package to retrieve data from Google Places.
https://github.com/esaum10/place_scrapper
google-maps places-api scrapping selenium
Last synced: about 1 month ago
JSON representation
Scrapping package to retrieve data from Google Places.
- Host: GitHub
- URL: https://github.com/esaum10/place_scrapper
- Owner: EsauM10
- Created: 2023-03-23T18:51:59.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-16T00:26:43.000Z (about 1 year ago)
- Last Synced: 2023-11-16T01:28:27.655Z (about 1 year ago)
- Topics: google-maps, places-api, scrapping, selenium
- Language: Python
- Homepage:
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![](https://img.shields.io/badge/python-3.9+-blue.svg)
![](https://img.shields.io/badge/selenium-4.8+-silver.svg)
![Tests](https://github.com/EsauM10/place_scrapper/actions/workflows/tests.yml/badge.svg)
# Google Places Scrapper## Installation
```
pip install git+https://github.com/EsauM10/place_scrapper.git
```## Usage
```python
from place_scrapper import GooglePlacesplaces = GooglePlaces.get_places(query='Restaurants in São Paulo', limit=10)
for place in places:
print(place)
```
### Saving to a file:
```python
import json
from place_scrapper import GooglePlacesplaces = GooglePlaces.get_places(query='Restaurants in São Paulo')
data = [place.to_dict for place in places]
with open('places.json', mode='w', encoding='utf-8') as file:
file.write(json.dumps(data))
```