Replies: 2 comments
-
The process is like I demonstrated in #328. You have to know what the templates to to their inputs. Depending on your goals, you might be better off using the |
Beta Was this translation helpful? Give feedback.
0 replies
-
First one can be done with a single call: >>> mwparserfromhell.parse('founded {{start date and age|September 25, 1928}} as [[ABC Company]]').strip_code(keep_template_params=True)
'founded September 25, 1928 as ABC Company' Second one, as JJMC89 says, you need to know a bit about what the template actually produces to get it exactly right. mwparserfromhell just parses the wikitext, it doesn't have a way to solve this problem for you directly. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
what is the function or set of operations to parse from Infobox line:
| foundation = founded {{start date and age|September 25, 1928}} as [[ABC Company]]
to plain text
founded September 25, 1928 as ABC Company
also, from:
revenue = {{increase}} {{USD|9.98 billion|link=yes}} (2023)
to
US$9.98 billion (2023)
(as displayed on Wikipedia page)Beta Was this translation helpful? Give feedback.
All reactions