Template:WikipediaExtract: Difference between revisions

From Morrissey-solo Wiki
(Undo revision 12754 by Davidt (talk))
Tag: Undo
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 7: Line 7:
  |use stale cache
  |use stale cache
}}
}}
{{#get_web_data:
url=https://en.wikipedia.org/w/api.php?format=json&action=query&prop=pageimages&pilimit=1&pilicense=any&pithumbsize=300&titles={{trim| {{{1}}} }}
|format=JSON
|use jsonpath
|data=image=$.query.pages.*.thumbnail.source
|cache seconds=3600
|use stale cache
}}
{{#ifeq:{{#len:{{#external_value:image}}}}|0||<table class="wikitable" style="float:right; margin:0; margin-left: 10px;"><tr><td>{{#external_value:image}}</td></tr></table>}}
{{#external_value:extract}}
{{#external_value:extract}}
* https://en.wikipedia.org/wiki/{{trim| {{{1}}} }}
* https://en.wikipedia.org/wiki/{{trim| {{{1}}} }}

Latest revision as of 18:07, 30 September 2021