Skip to content

Commit

Permalink
added shorts videos URL format for youtube
Browse files Browse the repository at this point in the history
  • Loading branch information
mars4science committed Dec 15, 2023
1 parent d585b06 commit 8cf53a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions y_tube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ fi

URL=${!#} # ! bash's indirect substitution, get last positional parameter
video_id=$(echo "$URL" | awk 'BEGIN { FS = "=" } { print $2 }')
if [ -z "${video_id}" ]; then # for "shorts" type of videos URL is in different format
video_id=$(echo "$URL" | awk 'BEGIN { FS = "/" } { print $5 }')
fi

# deleting subtitle files that are empty - w/out words (only timestamps), 2023/07 noted there are those like "de" when "de-en" were introduced.

Expand Down

0 comments on commit 8cf53a6

Please sign in to comment.