Get video ids from youtube with yt-dlp #8

Merged
gg merged 1 commits from pta/WeatherNews.jl:yt-dlp into main 2024-04-17 23:18:50 +00:00
Contributor

For two reasons:

  1. Youtube is the primary source.
    Apparently staff manually copies the video id youtube gives them,
    since they sometimes forget to update their json. With this commit,
    I'm practically implementing the automation they should have
    implemented themselves.
  2. Make links available ahead of time for convenience.
    Currently on our site, links aren't available until the moment the
    program starts. So in practice, I have to open youtube to copy the
    next stream's url for playing in mpv, lest I miss the first several
    seconds of the show. (I know staff puts the next stream's link in
    chat, but since it's manual, occasionally they forget, and the url is
    usually in "/live/" rather than "/watch?v=" format: the latter makes
    clearer screenshot filenames, imo.

yt-dlp becomes a required dependency. The same information could be
sourced with Julia code to scrape an invidious instance, but that would
incur more code to produce the same array of per-video dictionaries,
which could be desireable later as exercise in Julia.

Since urls will be known well ahead of time, the redundant calls to wndb-video.jl in crontab might be unnecessary.

For two reasons: 1. Youtube is the primary source. Apparently staff manually copies the video id youtube gives them, since they sometimes forget to update their json. With this commit, I'm practically implementing the automation they should have implemented themselves. 2. Make links available ahead of time for convenience. Currently on our site, links aren't available until the moment the program starts. So in practice, I have to open youtube to copy the next stream's url for playing in mpv, lest I miss the first several seconds of the show. (I know staff puts the next stream's link in chat, but since it's manual, occasionally they forget, and the url is usually in "/live/" rather than "/watch?v=" format: the latter makes clearer screenshot filenames, imo. yt-dlp becomes a required dependency. The same information could be sourced with Julia code to scrape an invidious instance, but that would incur more code to produce the same array of per-video dictionaries, which could be desireable later as exercise in Julia. Since urls will be known well ahead of time, the redundant calls to wndb-video.jl in crontab might be unnecessary.
pta added 1 commit 2024-04-17 19:09:56 +00:00
63b1f54515 Get video ids from youtube with yt-dlp
For two reasons:
1. Youtube is the primary source.
   Apparently staff manually copies the video id youtube gives them,
   since they sometimes forget to update their json. With this commit,
   I'm practically implementing the automation they should have
   implemented themselves.
2. Make links available ahead of time for convenience.
   Currently on our site, links aren't available until the moment the
   program starts. So in practice, I have to open youtube to copy the
   next stream's url for playing in mpv, lest I miss the first several
   seconds of the show. (I know staff puts the next stream's link in
   chat, but since it's manual, occasionally they forget, and the url is
   usually in "/live/" rather than "/watch?v=" format: the latter makes
   clearer screenshot filenames, imo.

yt-dlp becomes a required dependency. The same information could be
sourced with Julia code to scrape an invidious instance, but that would
incur more code to produce the same array of per-video dictionaries,
which could be desireable later as exercise in Julia.
Owner

This is very cool. I'm OK with having yt-dlp as a dependency. I'll try to get this deployed in a few hours after I do some unrelated errands.

This is very cool. I'm OK with having yt-dlp as a dependency. I'll try to get this deployed in a few hours after I do some unrelated errands.
gg merged commit b4fbc705ed into main 2024-04-17 23:18:50 +00:00
Owner

Looks good!
image

Looks good! ![image](/attachments/bac15361-092e-4da6-92f5-cad59bb5ff39)
pta deleted branch yt-dlp 2024-04-18 21:12:38 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gg/WeatherNews.jl#8
No description provided.