Git Product home page Git Product logo

mercan / youtube-subtitles Goto Github PK

View Code? Open in Web Editor NEW
8.0 0.0 0.0 32 KB

Allows users to quickly find the desired text in YouTube videos by showing the time, minute, and second intervals where the desired word or sentence appears in videos with subtitles or auto-generated subtitles.

Dockerfile 6.42% Go 80.90% Makefile 12.69%
subtitle subtitles youtube youtube-dl subtitle-downloader subtitle-search youtube-subtitle youtube-subtitles yt-dlp ytdl

youtube-subtitles's Introduction

Allows users to quickly find the desired text in YouTube videos by showing the time, minute, and second intervals where the desired word or sentence appears in videos with subtitles or auto-generated subtitles.

   

Run on Your Computer

1. Clone the Project:

  git clone https://github.com/mercan/Youtube-Subtitles.git

2. Go to Project Directory:

  cd Youtube-Subtitles

Using Docker

Build the Docker Image:

This command builds a Docker image named youtube-subtitles containing your project code.

  make build

Run the Docker Image:

This command starts the Docker container based on the built image. It maps the container port 8080 to the host port 8080 by default, but you can specify a different port number by setting the PORT environment variable.

  make run
  make run PORT=3000

Stop the Docker Container:

To stop the running Docker container, execute:

  make stop

Show Logs:

To view the logs of the running Docker container, use:

  make logs

Remove the Docker Image and Container:

To remove the Docker image and container, execute:

  make clean

 

Available Commands:

You can use the following Makefile commands to manage the Docker image:

  • make build: Builds the Docker image.
  • make run: Runs the Docker image.
  • make stop: Stops the running Docker container.
  • make logs: Shows the logs of the Docker container.
  • make clean: Stops and removes any running container and the built image.
  • make help: Displays a help message about available commands.

Note: Make sure you have Docker installed and running on your system to use these commands.

 

API Usage

Search Subtitles:

  GET /subtitles?url=YoutubeVideoURL&text=SearchTerm
Parameter Type Description
url string Required. Youtube Video URL.
text string Required. The word/sentence you want to find in the video.

Example Usage

Find the timestamps of the word "Hello" in the following YouTube video:

    curl -X GET "http://localhost:8080/subtitles?url=https://www.youtube.com/watch?v=YQHsXMglC9A&text=Hello"

This request will return a JSON response with the timestamps where the word "Hello" appears in the video.

youtube-subtitles's People

Contributors

mercan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.