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.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d444a0bd2bfb96b856193cf923b0c4444e46aeee4ea141ab06cd95531fe9c7a5 |
|
MD5 | 275778a9bb9f0d0c1c3d159c0a779fba |
|
BLAKE2b-256 | 77a407f11f32c9833c15f81c1b26ab6bae20fd2ed4a03f1779c51fa23182d448 |
Close
Hashes for wikipedia_histories-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e51f9819a3edf3e96dd9ac0d7c8d837d72133f464372b02a0ecb6d10cbfbdaa |
|
MD5 | 54b2b6e4f30511b2774850ab4796c4be |
|
BLAKE2b-256 | 42a57b3950a1291d6a49f9c1f462abb64b044e51ec3da4494f84b56ad7bf1ead |