I used a API from Wikipedia API and created a simple wikipedia article scrapper by using html & jQuery(Ajax). Hope you like "Search Article on Wikipedia via Wikipedia Search API"
- Demo
- HTML
- CSS
- JS
- Edit Online
- Download
<h1 class="p-5 alert alert-dark text-center">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Wikipedia-logo-v2.svg/225px-Wikipedia-logo-v2.svg.png" style="width:100px" />
<p>Search Article on Wikipedia via Wikipedia Search API</p>
</h1>
<div class="mt-2 p-5">
<div class="row pb-4">
<div class="col-md-10">
<input type="text" id="sTerm" class="form-control" placeholder="Type here to search an article on wikipedia... By Pawan Mall | www.pawanmall.net">
</div>
<div class="col-md-2">
<button type="button" id="searchArticle" class="btn btn-primary btn-block">Search</button>
</div>
</div>
<div id="resultArea" class="form-control border-0" contenteditable="false"></div>
</div>
You need to include bootstrap 4 css file...
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
You need for jQuery file to perform the search task...
<script src="https://code.jquery.com/jquery-3.5.0.min.js" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
No comments:
Post a Comment
Thank you for your comment.