| Mpaa added a comment. |
IMO, it behaves as promised.
It doesn't say you will get the redirect target, it says you'll get an exception if page is a redirect.
Unless you specify get_redirect=True, which will give you the wikitext of page.
>>> import pywikibot
>>> site = pywikibot.Site('en', 'wikisource')
>>> page = pywikibot.Page(site, 'Author:Richard Lugar) # a redirect
>>> page.get()
...
pywikibot.exceptions.IsRedirectPage: Page [[en:Author:Richard Lugar]] is a redirect page.>>> page.get(get_redirect=True) '#REDIRECT [[Author:Richard Green Lugar]]'
TASK DETAIL
EMAIL PREFERENCES
To: Mpaa
Cc: Mpaa, Aklapper, Zppix, pywikibot-bugs-list, APerson, Mdupont, jayvdb
Cc: Mpaa, Aklapper, Zppix, pywikibot-bugs-list, APerson, Mdupont, jayvdb
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
