REST API for DER SPIEGEL written in python. Wrapper for the spiegel-scraper module.
Run the ietz/spiegel-api Docker image:
docker run -it --rm -p 8080:8080 ietz/spiegel-api
The REST API is now running at http://localhost:8080/
.
-
List all articles published on a given date
GET /archive/2020/01/20
add an
include-html
query parameter if you want the service to return the HTML which the results are scraped from -
Scrape an article given its url
GET /articles?url=https%3A%2F%2Fwww.spiegel.de%2Fkultur%2Ftv%2Fanne-will-zu-libyen-mit-heiko-maas-schluessel-ins-schloss-a-67fe47b7-fdbf-4533-a7ea-7b58f95b0b7b
add an
include-html
query parameter if you want the service to return the HTML which the results are scraped from -
Retrieve comments for an article by its id (which is provided by the article-by-url method)
GET /articles/67fe47b7-fdbf-4533-a7ea-7b58f95b0b7b/comments
docker build -t ietz/spiegel-api:latest .