| Anomie added a comment. |
In T174298#3734602, @Yurik wrote:@Anomie - is there an easy api way to get resolved template parameters on a wiki page via a GET request?
No. That would involve some particularly deep diving into the parser internals.
You can use action=""> to get the wikitext annotated with XML-style tags setting off the templates and their unresolved parameters' wikitext.
You might also be able to use TemplateSandbox to replace the actual template with something that just prints the parameter out in a machine-readable format. I note the specific template you're looking at there seems to already do that, embedding the parameter into a link.
Your best bet for a general parsing is to use something like mwparserfromhell; I don't know if there's a _javascript_ version of something like that.
Cc: daniel, Jonas, Smalyshev, Anomie, gerritbot, Lucas_Werkmeister_WMDE, Addshore, Wikidata-Query-Service, Aklapper, Yurik, Lahi, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, EBjune, merbst, Avner, Lewizho99, Maathavan, debt, Gehel, FloNight, Xmlizer, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Mbch331
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
