Code Monkey home page Code Monkey logo

youtube-targeted-downloader's Introduction

youtube-targeted-downloader

Download (archive) youtube content with specifications.

A setting for videos as well as for audio extractions from videos are provided.

Motivation

Youtube content has become important to people. My contribution hepls you to download videos which are important to you or of which you want to do further research on from your hard disk. Moreover, anytime channels can get closed and the videos won't be available online any longer. Due to that, you can archive videos on your own computer.

Usage

You can specify channels or playlists or singular videos.

You set which channel etc. you target in the file yt-dlp-channels-audio.txt or yt-dlp-channels-video.txt respectively. You can list as much targests as you want here, each in a new line.

  1. Go to the channel's videos section for example
  2. Copy the address shown in the address bar
  3. Paste this address into the channels file.

The program then reads the content from the channels file and downloads all the content according to the specifications set in the configuration file which is explained below.

After downloading each youtube content, the unique ID of that one is then saved in the archive files yt-dlp-archive-video.txt or yt-dlp-archive-audio.txt respectively. So when you run the application agin on the same targets, the downloader skips the content you already downloaded. So for the archiving to work propery, keep the archive file and leave it basically untouched.

Download pattern and filter setup

Videos

  • Quality settings are set for getting the best videos but with a highest resolution of 800p (to save disk space).
  • Free formats are preferred.
  • Title names which match a certain pattern are downloaded only Here, the title must include two keywords in order to be triggered for downloading: sleep and meditation. This is useful to execute a targeted filter towards the title name. In a channel about spirituality for example, you get only content which is about a possible interaction of sleep and meditation.
  • Output file names are set to be congruent to windows file name prerequisites.
  • Output file naming pattern is here: /channel/video/playlist/title - license-comments-likes-views

Example output:

Why Do We Fall Asleep in Meditation - Questions and Answers with Shunyamurti - NA-51comments-422likes-8408views.webm

  • Metadata and thumbnail picture are saved.
  • The video's description text is being saved to a file with extension .description.
  • A JSON file is being saved with details of the downloaded content which is suitable for post-processing in your online application.
  • The comments will be saved inside the json file too
  • Subtitle file is being downloaded too, if available

Audio extractions

The options of the video context is equal; though video format settings are replaced with audio settings:

  • An order of file formats are set: opus format is preferred over mp3 is preferred over aac is preferred over m4a
  • The audio quality is set as 5 of 10, while 0 is best and 10 is worst quality. This provides decent quality but not extreme (which can be adequate for vocal content such as a podcast or an audio book). Set this value lower in case you require high quality for i.e. an audiophile music experience or activate the line below in the configuration file which yields for the high resolution FLAC file format. When choosing quality, think about that higher quality demands usually more disk space and that the downloads take longer.
  • Output file naming pattern is here: /channel/audio/playlist/title - license-comments-likes-views

Adaptability

Nearly infinite customization possible. If you are a beginner, you can start with modifying values given in the configuration files.-

Get started

  1. Install yt-dlp (see below)
  2. Insert the youtube content URLs you are targeting into the channels file.
  3. Open the configuration file and set in line 4 the path for where you keep your channels and archive file. After, set the download path in line 6 where you want your downloads to be saved.

You run it via yt-dlp --config-clocation "c:\path\to\the\configfile"

Development setup

The environment used is

Thank you to its developers.

Download the latest release and copy the extracted file into the folder of your development setup, i.e. c:\users\username\Anaconda3\ if you have installed the Anaconda package.

Meta

Author: Jonas Dossmann

Distributed under the UNLICENSE license.

https://github.com/dossma/

youtube-targeted-downloader's People

Contributors

dossma avatar

Watchers

 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.