from which version of wikipedia articles are the APIs extracting?
xinyadu opened this issue · 1 comments
xinyadu commented
from which version of wikipedia articles are the APIs extracting?
siznax commented
Hi @xinyadu!
We don't specify a version, so we get the latest revision, and we do not currently show revisionid
in the data
attribute. If we do, we can get it from lastrevid
returned by get_query
, for example:
>>> import wptools
>>> random_page = wptools.page()
>>> random_page.get_query()
>>> random_page.query('query')
'https://en.wikipedia.org/w/api.php?action=query&exintro&formatversion=2&inprop=url|watchers&list=random&pithumbsize=240&pllimit=500&ppprop=disambiguation|wikibase_item&prop=extracts|info|links|pageassessments|pageimages|pageprops|pageterms|redirects&redirects&rdlimit=500&rnlimit=1&rnnamespace=0&titles=Frederick%20of%20Isenberg'
from the result...
"query": {
"pages": [
{
"title": "Frederick of Isenberg",
"touched": "2019-04-11T11:27:14Z",
"lastrevid": 855670751,
Would it be helpful to have lastrevid
appear in random_page.data['revision']
?