https://github.com/veerendra2/metacritic-flask-api
Simple flask API scraps metacritic website
https://github.com/veerendra2/metacritic-flask-api
beautifulsoup4 docker-compose flask-api pip3 scraper waitress
Last synced: 24 days ago
JSON representation
Simple flask API scraps metacritic website
- Host: GitHub
- URL: https://github.com/veerendra2/metacritic-flask-api
- Owner: veerendra2
- Created: 2022-04-06T11:14:28.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-06T15:14:20.000Z (about 4 years ago)
- Last Synced: 2025-01-22T05:17:46.449Z (over 1 year ago)
- Topics: beautifulsoup4, docker-compose, flask-api, pip3, scraper, waitress
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Metacritic API
Fetchs game detail from [http://www.metacritic.com](http://www.metacritic.com/game/playstation-4). More details in [tests](./tests/README.md)
## Run
* With `docker-compose`
```
## Review docker-compose.yml and start the deployment
$ docker-compose up -d --build
$ cd tests
$ python3 test.py
```
* With `cli`
```
$ pip3 install -e .
$ export PORT=8081
$ export URL=http://www.metacritic.com/game/playstation-4
$ metacritic_api
INFO:Serving on http://0.0.0.0:8081
```
## More Details
* This application is written in Python Flask packed in pypi style, fetch game details and exposes 2 GET HTTP methods(More details in [tests](./tests/README.md))
* The application internally uses `waitress` server to serve requests.
* In `docker-compose` deployment, the nginx container acts as proxy which configuration can be seen[here](/nginx-proxy.conf) for metacritic-api container
## Tests
Please refer [tests](./tests/README.md) directory
## Tear Down
* `docker-compose`
```
$ docker-compose down
```
* `cli`
```
$ pip3 uninstall metacritic_api
```