|
I don't care about the references, but I want all the other templates expanded, can mwparserfromhell do that? |
Answered by
earwig
Dec 23, 2022
Replies: 1 comment 1 reply
|
Since you want to expand templates, this might be best done without mwparserfromhell. You can use the soup = bs4.BeautifulSoup(text)
count = len(' '.join(soup.stripped_strings) |
1 reply
Answer selected by
dpriskorn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since you want to expand templates, this might be best done without mwparserfromhell. You can use the
action=renderendpoint to get the expanded HTML for a live page (example) then beautifulsoup to extract the text: