Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wikia: some pages return empty history #317

Closed
nemobis opened this issue May 22, 2018 · 1 comment
Closed

Wikia: some pages return empty history #317

nemobis opened this issue May 22, 2018 · 1 comment

Comments

@nemobis
Copy link
Member

nemobis commented May 22, 2018

For instance http://tdicamps.wikia.com/wiki/File:Llojdsjjlkjd.png: it's a file without associated file description history. Might be a botched import or half-deletion.

This is what we get in the API:

>>> import wikitools
>>> title = 'File:Llojdsjjlkjd.png'
>>> site = wikitools.wiki.Wiki('http://tdicamps.wikia.com/api.php')
>>> pparams = {
...                     'action': 'query',
...                     'titles': title,
...                     'prop': 'revisions',
...                     'rvlimit': 'max',
...                     'rvprop': 'ids|timestamp|user|userid|size|sha1|contentmodel|comment|content'
...                 }
>>> prequest = wikitools.api.APIRequest(site, pparams)
>>> results = prequest.queryGen()
>>> results.next()
{u'query': {u'pages': {u'40381': {u'ns': 6, u'pageid': 40381, u'title': u'File:Llojdsjjlkjd.png'}}}, u'limits': {u'revisions': 50}, u'warnings': {u'revisions': {u'*': u"Unrecognized value for parameter 'rvprop': contentmodel"}}}
@nemobis
Copy link
Member Author

nemobis commented Jun 2, 2018

Ok, seems to be handled now.

@nemobis nemobis closed this as completed Jun 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant