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 as wh
# Generate a list of revisions for a specified page
>>> golden_swallow = wh.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
>>> wh.build_df(golden_swallow)
# Generate a JSON with text and metadata from the list of versions
>>> wh.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.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 328ba1cd1b1523862aed948c859ec0376da376b54871c3c8611dd32f62dc1db9 |
|
MD5 | 919079d10d2edb88ccc0ed786c1dc00f |
|
BLAKE2b-256 | 1baeab035c2a4e7e897a00c6d30fb381748525f64dc996d80396c167688dcdf5 |
Close
Hashes for wikipedia_histories-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53cfb9a8c9888d76bce003bc21832d73f41155ed812e5f1e867a99583b6025ea |
|
MD5 | 952a54d349aa2606846d5f57e5ace6a6 |
|
BLAKE2b-256 | 7933f8d55574ae102b19cf22d21e2b96c6391de35283d60b66c77dc93ac4e6c9 |