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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aca495e6fc08aa1d80bb9f5fd0d9a2cae3ec76af49c01e5f2d8040350cf07c7 |
|
MD5 | df78c421fccb3d974e1b73c89e1c7bdb |
|
BLAKE2b-256 | 0278037b76a7daf7090fa0c0e7ad09f2b501f352ed52999b2df7fc6f17409c29 |
Close
Hashes for wikipedia_histories-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9402db511c8a334003e6f04c9f81231acb17d9f74519ed59d6ac399f7699d5b0 |
|
MD5 | 9b671ffbe8d09d062f292589c867cfc8 |
|
BLAKE2b-256 | 64434dfa7bd8380a56cde04d8d70a1b980cfd45304c568147b66fe7d1c7dcc4b |