Comments (2)
Works for me. Keep in mind that bot flags are only shown in recentchanges/watchlist, not page history.
>>> import pprint
>>> import settings
>>> from wikitools import *
>>> site = wiki.Wiki('https://en.wikipedia.org/w/api.php')
>>> site.login(settings.bot, settings.botpass)
True
>>> p = page.Page(site, 'User:Mr.Z-man/test123')
>>> p.exists
False
>>> res = p.edit(text='Test', summary='Test', bot=True)
>>> res
{u'edit': {u'pageid': 46323959, u'title': u'User:Mr.Z-man/test123', u'newtimestamp': u'2015-04-05T18:46:12Z', u'contentmodel': u'wikitext', u'result': u'Success', u'new': u'', u'oldrevid': 0, u'newrevid': 655076325}}
>>> params = {'action':'query', 'list':'recentchanges', 'rcuser':'Mr.Z-bot', 'rclimit':1, 'rcprop':'title|flags'}
>>> req = api.APIRequest(site, params)
>>> pprint.pprint(req.query(False))
{u'query': {u'recentchanges': [{u'bot': u'',
u'new': u'',
u'ns': 2,
u'title': u'User:Mr.Z-man/test123',
u'type': u'new'}]},
u'query-continue': {u'recentchanges': {u'rccontinue': u'20150405111706|726410422'}},
u'warnings': {u'query': {u'*': u"Formatting of continuation data will be changing soon. To continue using the current formatting, use the 'rawcontinue' parameter. To begin using the new format, pass an empty string for 'continue' in the initial query."}}}
from wikitools.
bot flags are only shown in recentchanges/watchlist, not page history
Thanks, I was not aware of this. Sorry for a false report.
from wikitools.
Related Issues (20)
- COPYING missing HOT 3
- GET requests HOT 3
- very high lag time: possible causes? HOT 2
- Problem connecting with https-site HOT 2
- Cant delete pages HOT 2
- How to fix "The supplied MD5 hash was incorrect" error? HOT 4
- Upload file size limit is 100 MB HOT 1
- Allow finer control of API errors in client code. HOT 2
- Does this package support Python 3?
- using wikitools with MediaWiki in localhost HOT 1
- Port this to python3 HOT 2
- 403 Client Error
- py 3 page.py
- Py3 branch can not be installed with setuptools (dependency_links, install_requires), only through requirements.txt, due to version overload HOT 3
- How to iterate over each one item in category?
- import wikitools ImportError: No module named wikitools
- wikitools.wiki.Wiki for biografias.bcn.cl: Invalid JSON HOT 1
- Fall back from queryGen() to query() on versions with querycontinue only
- is project completely deprecated now ?
- Deprecated API calls
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wikitools.