Xqt added a comment.
> The stripped name does not contain the equals signs. The section headers aren't stripped: import pywikibot from pywikibot.textlib import extract_sections from pprint import pprint s = pywikibot.Site('wikipedia:en') t ="""'''A''' is a thing. == History of A == Some history... == Usage of A == Some usage... === Some details === Details of Usage... [[Category:Things starting with A]] """ x = extract_sections(t, s) pprint(x.sections) [_Section(title='== History of A ==', content='\nSome history...\n\n'), _Section(title='== Usage of A ==', content='\nSome usage...\n\n'), _Section(title='=== Some details ===', content='\nDetails of Usage...\n\n')] x.sections[0].title '== History of A ==' TASK DETAIL https://phabricator.wikimedia.org/T338748 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt Cc: Xqt, Aklapper, pywikibot-bugs-list, matej_suchanek, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org