A simple package designed to collect the edit histories of Wikipedia pages
Project description
Wikipedia Histories
A simple tool to allow a user 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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba7a8c675f6ad943e6c6a2d3aa8d63bbd9d29cf54312d83f7c51cb5f226f18c3 |
|
MD5 | 08943c0750553e8a2834bb8cf2465a59 |
|
BLAKE2b-256 | 971096595409625566a6a0643f7f2a618d71ff3a13b44bb4d51d6ef97c9a76c5 |
Close
Hashes for wikipedia_histories-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01951134060bf5556ba430dd8a85e4ce9521145149eb0c6b972a1ac4ab996f0a |
|
MD5 | 9769f36ad2aa67e77d774a3af01808bc |
|
BLAKE2b-256 | 0184471dcc9f18116c23915b61b51bbd5972e1c775b9333d52f1f59487ae1792 |