Skip to content

ietz/spiegel-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spiegel-api Docker Hub

REST API for DER SPIEGEL written in python. Wrapper for the spiegel-scraper module.

Usage

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

Example requests

  • 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

Build the docker image locally

docker build -t ietz/spiegel-api:latest .

About

REST API for DER SPIEGEL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published