Scrape article metadata and comments from DER SPIEGEL
Project description
spiegel-scraper
Scrape articles and comments from DER SPIEGEL
Setup
pip install spiegel-scraper
Usage
from datetime import date
import spiegel_scraper as spon
# list all articles from 2020-01-31
archive_entries = spon.archive.by_date(date(2020, 1, 31))
# or, for later replication, retrieve and scrape the html instead
archive_html = spon.archive.html_by_date(date(2020, 1, 31))
archive_entries_from_html = spon.archive.scrape_html(archive_html)
# fetch one article by url
article_url = archive_entries[0]['url']
article = spon.article.by_url(article_url)
# or alternatively using the html
article_html = spon.article.html_by_url(article_url)
article_from_html = spon.article.scrape_html(article_html)
# retrieve all comments for an article
comments = spon.comments.by_article_id(article['id'])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spiegel-scraper-1.1.1.tar.gz
(4.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spiegel-scraper-1.1.1.tar.gz.
File metadata
- Download URL: spiegel-scraper-1.1.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0.post20200119 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1ed5d41f5c4cdd61ff2f2c512392f2fcc82255546b4d18177165f0ca2d2e3b7
|
|
| MD5 |
1aab8ebc2a250dd3650a2659d1b734cc
|
|
| BLAKE2b-256 |
4d89fa1ef8c5e656d0036a6b7e7e9e994324a6b8ef0178db6ee79b9d6b09879d
|
File details
Details for the file spiegel_scraper-1.1.1-py3-none-any.whl.
File metadata
- Download URL: spiegel_scraper-1.1.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0.post20200119 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9239f0f9f10472182c7b40d3c1f87e970ee9e05f050d66ccf9d485d12eff21b0
|
|
| MD5 |
848d67afafcd65470abe506090da3c86
|
|
| BLAKE2b-256 |
1ebf08312e038cdc6b699123acebedee3ec0f307653578fc28abbdea25f69fc4
|