Python3
Flask
PostGreSQL
SQLAlchemy
Redis
$ virtualenv env
$ source env/bin/activate
$ pip install -r requirements.txt
$ createdb sites
$ python server.py init
Re-run server after first init:
$ python server.py
Servers runs on: http://localhost:8080/
curl -X POST http://localhost:8080/new/URL
replace URL
with the site you wish to scrape
Example:
curl -X POST http://localhost:8080/new/www.google.com
Please only enter sites in the 'www.domain.tld'
format.
curl -X GET http://localhost:8080/status/id
replace ID
with task ID returned from /new
.
Example:
curl -X GET http://localhost:8080/status/1
.
├── server.py # Flask RESTful web API
├── model.py # Database model
└── helpers.py # Worker functions