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 = wikipedia_histories.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
>>> wikipedia_histories.build_df(golden_swallow)
# Generate a JSON with text and metadata from the list of versions
>>> wikipedia_histories.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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2904e276aa6fef33681ae3f7f59c506ec6b47ec1e2b67920d3fe6450f3531c0 |
|
MD5 | 1c34d103e50fddaf09cb8ed980911504 |
|
BLAKE2b-256 | c72acb6ff0300675a9169f016436fd0ada64d6829a0af64c3f0325a0c334d172 |
Close
Hashes for wikipedia_histories-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48d326921623ca6a292bd81ca697245d9a484ea279acb873bed283c1a34721bd |
|
MD5 | b0d78b2d1bcf33e04e9549d80d602f62 |
|
BLAKE2b-256 | b4a2236806ffd7a2ac15d0428f1db0128965f9a93486f2a8650fe8a8a98b92b8 |