You can use mwparserfromhell to filter the type of tag.
wikicode = mwparserfromhell.parse(text) for table in wikicode.ifilter_tags(matches=lambda tag: tag.tag.lower()=="table"): wikicode.remove(table)
On Wed, Dec 21, 2022 at 8:58 AM Bináris wikiposta@gmail.com wrote:
Do we have anything to exclude tables from page text? I read mwparserfromhell doc, but did not find.
-- Bináris _______________________________________________ pywikibot mailing list -- pywikibot@lists.wikimedia.org To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org