Skip to content

Commit

Permalink
add script to download missing YT thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
harivyasi committed Jul 9, 2024
1 parent a49d7c1 commit bbd97f6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ jobs:
node-version: 20
cache: "npm"

- name: Download YT Thumbnails
run: |
for file in $(grep -roP 'youtube-nocookie.com/embed/.{11}' docs | rev | cut -d / -f 1 | rev); do
if [ ! -f "static/img/yt_thumbnails/$file.jpg" ]; then
wget -O "static/img/yt_thumbnails/$file-hq.jpg" "https://img.youtube.com/vi/$file/hqdefault.jpg" || wget -O "static/img/yt_thumbnails/$file.jpg" "https://img.youtube.com/vi/$file/0.jpg"
fi
done
- name: Build
id: build
run: |
Expand Down

0 comments on commit bbd97f6

Please sign in to comment.