0

Im using wikipedia api to call information from artists. The question is, how can I only call the image of the artist, name, date of birth and place, age, genres and the website. How can I only call this fields?

I have researched but I don't find anything related to wikipedia api... I have this code:

var url ="";

$("#biography").click(function() {

  $(".div-pesquisa").hide();
  $(".div-biography").show();

  url = "https://en.wikipedia.org/w/api.php?action=parse&page=" + query + "&format=json&origin=*";
  url = encodeURI(url);
  
  $.get(url, function(response, status) {
    if (status == 'success') {
      $(".div-biography .row h3").html(response.parse.title);
      $(".div-biography p").html(response.parse.text['*']);
    }
  });

});
<div class="div-biography" style="overflow:scroll; height:480px;">

  <ul class="header">
    <li><button class="go-back-btn-bio" type="button" name="button" id="your-playlist"><i class="ion-ios-arrow-back"></i>GO BACK</button></li>
  </ul>
  <div class="row">
    <h3></h3>
  </div>
  <p></p>
</div>

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

Thank you in advance!

Roko C. Buljan
  • 196,159
  • 39
  • 305
  • 313

0 Answers0