tekumatlamallesh

How to search the multiple YouTube videos based on url’s and display?

To search for YouTube videos based on URLs and display them using a free script, you can follow these steps:

  1. Choose a programming language that you are familiar with, such as Python, JavaScript, or PHP.
  2. Install the YouTube API client library for your chosen programming language. This library will allow you to interact with the YouTube API, which provides access to YouTube’s data, including videos, channels, and playlists.
  3. Obtain a YouTube API key. You can get an API key by creating a project in the Google Developers Console and enabling the YouTube API for that project.
  4. Write a script that takes a list of YouTube video URLs as input and uses the YouTube API client library to search for those videos and retrieve their metadata, including titles, descriptions, and other details.
  5. Use a web framework or a script host to display the results in a user-friendly way, such as a web page or a console output.

There are many resources available online that can help you write scripts that interact with the YouTube API, including documentation, tutorials, and code examples. You may also be able to find open-source scripts or libraries that you can use or modify for your own purposes.

youtube.html


<!DOCTYPE html>
<html lang="en">
<head>
  <title>URL</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<style>
#open-button{
    background-color: #000;
    color: #ffff;
    border-radius: 5px;
}
</style>
<body>

<div class="container">
  <h2 style="text-align:center;">Enter Youtube url Link</h2>
  <form > 
    <div class="form-group">
      <label for="url">URL:</label>
      <input type="text" class="form-control"  placeholder="Enter url" id="mytext" onkeyup="appen()">
    </div>
  <input type="submit" id="open-button" name="Submit" value="Open" onmouseenter="appen()">

  </form>

<table id="mytable">
  <thead>
    <tr>
    
 
    </tr>
  </thead>
  <tbody>
  </tbody>
</table>


</div>
<script>
function appen() {
  var a = $("#mytext").val();
  var video_id = a.split("v=")[1].substring(0, 11)
  var b = $("#lastname").val();
  var c = $("#any").val();
  $("#mytable tbody").append('<iframe src="http://www.youtube.com/embed/'+video_id+'?autoplay=1" width="400px" height="300px" allow="autoplay"></iframe>');
  
 
  $("#mytext").val('');
 
}


</script>

<script>
    $('#submit input').keydown(function(e) {
    if (e.keyCode == 13) {
        $('#submit').submit();
    }
});
</script>

</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *