Template:WikipediaExtract: Difference between revisions

From Morrissey-solo Wiki
(Add image)
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 8: Line 8:
}}
}}
{{#get_web_data:
{{#get_web_data:
  url=https://en.wikipedia.org/w/api.php?format=json&action=query&prop=pageimages&pilimit=1&pithumbsize=300&titles={{trim| {{{1}}} }}
  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
  |format=JSON
  |use jsonpath
  |use jsonpath
Line 15: Line 15:
  |use stale cache
  |use stale cache
}}
}}
{| class="wikitable" style="float:right; margin-left: 10px;"
{{#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:image}}  
|}
{{#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