Steps to replicate the issue (include links if applicable):
>>> page = pywikibot.Page(site, "Wikidata:Requests for deletions#FakeHeading") >>> page.exists() True
What happens?:
The documentation claims that it will return False if a heading is included but the heading does not exist on the page. However, this behavior does not happen.
What should have happened instead?:
Ideally, if the heading did not exist, it would return False. However, since templates can add section headings, pywikibot would need to parse the generated HTML to determine if the section header exists, or alternatively this line can be removed from the documentation.
Software version:
Pywikibot 2
Other information (browser name/version, screenshots, etc.):