Giter VIP home page Giter VIP logo

ytgrep's Introduction

ytgrep

https://travis-ci.com/alexkohler/ytgrep.svg?branch=master

ytgrep is a CLI tool to search Youtube closed captions with a grep-like interface.

Requirements

  • Requires python >= 3.5

Installation

pip install ytgrep

Purpose

ytgrep is particularly useful whilst looking for particular topic or keywords mentioned in a video.

For example, searching for the word 'topoloigcal sort' in MIT's Open Courseware Lecture on DFS and topological sort:

image0

Usage

usage: ytgrep.py [-h] [-e] [-v] [-links] pattern urls [urls ...]

Flags

  • -e <PATTERN> - specify a regular expression to match
  • -v - verbose, print debug information
  • -links - include the time shortcut link with each match (see example below)

More examples

Include timestamped links (e.g. <youtube URL>/&t=196s) to jump directly to part in video where keyword was mentioned.

$ ytgrep -links 'potassium' https://www.youtube.com/watch?v=OIYOshsEqmQ

Search with regular expression

ytgrep -e 'banana|potassium' https://www.youtube.com/watch?v=OIYOshsEqmQ

Search multiple urls

ytgrep 'banana' https://www.youtube.com/watch?v=LH5ay10RTGY https://www.youtube.com/watch?v=zFQWVN4xip0

Development

Run Tests

Note: Functional tests do download directly from Youtube

## All tests
python -m unittest discover

## Unit tests
python -m unittest discover test/unit

## Functional tests
python -m unittest discover test/functional

Related projects

ytgrep's People

Contributors

alexkohler avatar mkly avatar

Stargazers

bk111 avatar Daniel avatar  avatar Josscii avatar Zed Kaido avatar  avatar J Johnson avatar Johannes Breuer avatar boB Rudis avatar Alexandre Dulaunoy avatar Giacomo Giallombardo avatar  avatar  avatar Martin Pittenauer avatar  avatar Sidnei Pereira avatar Kyle Cain avatar  avatar Iqbal Rifai avatar Rico P avatar  avatar Chetan Kumar avatar lolisamurai avatar  avatar cocoonk1d avatar Corentin Forler avatar Mathias Fußenegger avatar

Watchers

James Cloos 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.