Skip to content

Instantly share code, notes, and snippets.

@jabbalaci
Created May 16, 2023 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jabbalaci/457ae95d7a754299e5607b01d22481cd to your computer and use it in GitHub Desktop.
Save jabbalaci/457ae95d7a754299e5607b01d22481cd to your computer and use it in GitHub Desktop.
YouTube tips

YouTube tippek

Q: Egy videó adatait hogyan lehet leszedni JSON formában?

A: Példa:

#!/usr/bin/env bash

URL="https://www.youtube.com/watch?v=YbZZ9X-jFog"

yt-dlp -j --flat-playlist $URL > out.json

A kimenet egy szép nagy JSON file lesz.


Q: Egy playlist összes videójáról hogyan lehet leszedni az adatokat JSON formában?

A: Ugyanúgy, mint az előző példában, csak az URL most mutasson a playlist-re. A kimenetben minden egyes sor egy-egy szabályos JSON sztring lesz.


Q: Egy videó leírását (description) hogyan lehet letölteni?

A: Példa:

#!/usr/bin/env bash

URL="https://www.youtube.com/watch?v=YbZZ9X-jFog"

yt-dlp --skip-download --write-description "$URL"
yt-dlp --print description "$URL" > out.txt

Az első egy .description kiterjesztésű fájlba menti le az eredményt. A második a képernyőre ír, amit át lehet irányítani.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment