YTV Tags is a web application that allows users to extract and view the keywords from a YouTube video page. By entering a YouTube video URL, users can fetch the keywords embedded in the video's page source and display them in a user-friendly interface.
- Open the Application: Navigate to https://ajayparihar.github.io/ytv-tags in your web browser.
- Enter YouTube Video URL: In the input field, enter the URL of the YouTube video from which you want to extract keywords.
- Fetch Keywords: Click the "Get Tags" button or press the Enter key to fetch the keywords.
- View Keywords: The extracted keywords will be displayed in the textarea below the input field. If the URL is invalid or no keywords are found, an appropriate message will be displayed.
index.html: Contains the HTML structure of the web page.styles.css: Contains the CSS styles for the web page.script.js: Contains the JavaScript code that handles the functionality of the web page.README.md: Documentation for the project.
- Input Validation: The application validates the entered URL to ensure it is a valid YouTube video URL.
- Fetching Page Source: The application uses a proxy API to fetch the HTML source code of the specified YouTube video page.
- Extracting Keywords: The application parses the fetched HTML source code to extract the keywords from the meta tags.
- Displaying Keywords: The extracted keywords are displayed in a textarea on the web page.
This project uses a proxy API to fetch the page source. Ensure you have an internet connection to use this feature.
The application uses the following proxy API to fetch the page source:
https://api.codetabs.com/v1/proxy?quest={URL}
Replace {URL} with the encoded YouTube video URL.
- onDOMContentLoaded: Initializes the application and sets up event listeners.
- fetchKeywords: Fetches the keywords from the YouTube video URL.
- getProxyUrl: Constructs the proxy URL for fetching the page source.
- extractKeywords: Extracts keywords from the fetched HTML source code.
- handleError: Handles errors during the fetch process.
- toggleVisibility: Toggles the visibility of an element.
- getInputValue: Gets the value of an input element.
- setInputValue: Sets the value of an input element.
- addEnterKeyListener: Adds an event listener for the Enter key.
- isValidYouTubeUrl: Validates if the URL is a YouTube video URL.
The application uses CSS for styling the web page. Key styles include:
- Root Variables: Defines CSS variables for colors, gradients, and other styles.
- Body Styling: Styles the body of the web page.
- Header: Styles the header and the
h1element. - App Container: Styles the main container of the application.
- Input Wrapper: Styles the input field wrapper.
- Buttons: Styles the buttons.
- Output Wrapper: Styles the output textarea.
- Animations: Defines keyframe animations for fade-in effects.
- Responsive Design: Ensures the application is responsive on different screen sizes.
This project is licensed under the MIT License. See the LICENSE file for details.