_______________________________________________mwparserfromhell.nodes.tag.Tag can represent any HTML-style tag. mwparserfromhell will parse wikitext tables into the HTML tag equivalents.Doing something like the below will let you visualize:>>> text = "before\n{| class='wikitable'\n!c1 h!!c2 h\n|r1 c1\n|r1 c2\n|}\nafter">>> for tag in wikicode.ifilter_tags(matches=lambda tag: tag.tag.lower() in ("table", "caption", "th", "tr", "td")):
... print(f"{tag!r} is a {tag.tag!r}")
...
"{| class='wikitable'\n!c1 h!!c2 h\n|r1 c1\n|r1 c2\n|}" is a 'table'
'!c1 h' is a 'th'
'!!c2 h\n' is a 'th'
'|r1 c1\n' is a 'td'
'|r1 c2\n' is a 'td'On Wed, Dec 21, 2022 at 5:04 PM Bináris <wikiposta@gmail.com> wrote:_______________________________________________I don't find the description of objects and available tags in documentation, can you help me?Are there cells, rows, columns, headings?
pywikibot mailing list -- pywikibot@lists.wikimedia.org
To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org
pywikibot mailing list -- pywikibot@lists.wikimedia.org
To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org