A simple package designed to collect the edit histories of Wikipedia pages
Project description
Wikipedia Histories
A simple tool to pull the complete edit history of a Wikipedia page in a variety of formats, including JSON, DataFrame, or directly as an object.
>>> import wikipedia_histories
# Generate a list of revisions for a specified page
>>> golden_swallow = get_history('Golden swallow')
# Show the revision IDs for every edit
>>> golden_swallow
# [130805848, 162259515, 167233740, 195388442, ...
# Show the user who made a specific edit
>>> golden_swallow[16].user
# u'Snowmanradio'
# Show the text of at the time of a specific edit
>>> golden_swallow[16].text
# u'The Golden Swallow (Tachycineta euchrysea) is a swallow. The Golden Swallow formerly'...
>>> golden_swallow[200].text
# u'The golden swallow (Tachycineta euchrysea) is a passerine in the swallow family'...
# Generate a dataframe with text and metadata from a the list of revisions
>>> build_df(golden_swallow)
# Generate a JSON with text and metadata from the list of versions
>>> build_json(golden_swallow)
Installation
To install Wikipedia Histories, simply run:
$ pip install wikipedia-histories
Wikipedia Histories is compatible with Python 3.6+.
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
Built Distribution
Close
Hashes for wikipedia_histories-0.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5827d4ca73d23ca3ad43ac4fecd9fe3e06d9a970c5dcfee8a50c703626afe8d8 |
|
MD5 | c1af722169eace80c291b9b0f33411bd |
|
BLAKE2b-256 | 3f984e46e4da4dfb44cf33592556bd0eda51428d0a340a101e7b820d3528dbe6 |
Close
Hashes for wikipedia_histories-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f57b338aee87ca144e63d8ce891754299760ce3bbcc66ba25ac650fccaacbfcf |
|
MD5 | c17e5d6d85c9ae56c08af77b9f0e0904 |
|
BLAKE2b-256 | 9386a6fddb05a901595dab2f1f3283f5f8be25e146fed2ebc7ba143f899354e6 |