Last active 2 weeks ago

This script downloads videos from 7 days to today from selected YouTube channels. Downloaded videos will be logged in download.txt to prevent re-downloading them.

airikr revised this gist 2 weeks ago. Go to revision

No changes

airikr revised this gist 2 weeks ago. Go to revision

No changes

airikr revised this gist 2 weeks ago. Go to revision

1 file changed, 18 insertions, 12 deletions

download-youtube-videos.sh

@@ -51,18 +51,21 @@ sudo chown -R jellyfin:jellyfin "${path}"
51 51
52 52
53 53 # channels.txt
54 - https://piped.video/channel/UCRiYVwfoEnKfweISfKytuQw # Akimbo
54 + #https://piped.video/channel/UCRiYVwfoEnKfweISfKytuQw # Akimbo
55 55 https://piped.video/channel/UCxXlxVmarXu3n340ah5xwqA # Astrobiscuit
56 + https://piped.video/channel/UC-9b7aDP6ZN0coj9-xFnrtw # Astrum
56 57 #https://piped.video/channel/UCTEEa35OCDcJDh-lwbXehdg # CantrellCaving
58 + #https://piped.video/channel/UCbW17b5g1Eb90M457eOykPg # Chinese cuisine
57 59 https://piped.video/channel/UCg6gPGh8HU2U01vaFCAsvmQ # Chris Titus Tech
58 60 #https://piped.video/channel/UCvfqpaehdaqtkXPNhvJRyGA # Dash Cam Owners Australia
59 61 https://piped.video/channel/UCdC0An4ZPNr_YiFiYoVbwaw # Daily Dose of Internet
60 62 https://piped.video/channel/UCTIa8uo_aisNdqQpMf4wKTg # DailyDoseOfInternetCats
61 - https://piped.video/channel/UCnetiRHPnIMBCm-yY4m69qA # Dashcam Lessons
62 - https://piped.video/channel/UCOS7jdle9zw_HnKW4ytZnDw # Dashcam Nation
63 - https://piped.video/channel/UCqOoboPm3uhY_YXhvhmL-WA # Discovery
63 + #https://piped.video/channel/UCnetiRHPnIMBCm-yY4m69qA # Dashcam Lessons
64 + #https://piped.video/channel/UCOS7jdle9zw_HnKW4ytZnDw # Dashcam Nation
65 + #https://piped.video/channel/UCqOoboPm3uhY_YXhvhmL-WA # Discovery
64 66 https://piped.video/channel/UCxByVUuLdxxiqQVmbOnDEzw # Erik Granqvist
65 67 #https://piped.video/channel/UCPq2ETz4aAGo2Z-8JisDPIA # ESL Counter-Strike
68 + https://piped.video/channel/UCwF3VyalTHzL0L-GDlwtbRw # EVE Online
66 69 #https://piped.video/channel/UC73dVtWf9mpjiWYkXyIlm7A # Exploring the Unbeaten Path
67 70 https://piped.video/channel/UCPDis9pjXuqyI7RYLJ-TTSA # FailArmy
68 71 https://piped.video/channel/UCt8CdzMEoTie3iix3KmvV7A # GameSprout
@@ -71,27 +74,30 @@ https://piped.video/channel/UCt8CdzMEoTie3iix3KmvV7A # GameSprout
71 74 https://piped.video/channel/UCw7FkXsC00lH2v2yB5LQoYA # jackfrags
72 75 https://piped.video/channel/UCWFKCr40YwOZQx8FHU_ZqqQ # JerryRigEverything
73 76 https://piped.video/channel/UCla1P6TzCetvMHJ6ZHyXxgA # Kanal 5 Sverige
74 - #https://piped.video/channel/UCsXVk37bltHxD1rDPwtNM8Q # Kurzgesagt - In a Nutshell
77 + https://piped.video/channel/UCsXVk37bltHxD1rDPwtNM8Q # Kurzgesagt - In a Nutshell
75 78 #https://piped.video/channel/UCpJmBQ8iNHXeQ7jQWDyGe3A # Life Noggin
76 - #https://piped.video/channel/UCXuqSBlHAE6Xw-yeJA0Tunw # Linus Tech Tips
79 + https://piped.video/channel/UCXuqSBlHAE6Xw-yeJA0Tunw # Linus Tech Tips
80 + https://piped.video/channel/UCS1-E3fjfJmY5O2HqhXM5CQ # Learn Japanese Channel
77 81 #https://piped.video/channel/UCKIrZr7WuPFgFy7OfkAuHOw # MegaDrivingSchool
78 82 #https://piped.video/channel/UCS67mNnpfnHsU3IQYNHLToA # Most Dangerous
79 - https://piped.video/channel/UCpVm7bg6pXKo1Pr6k5kxG9A # National Geographic
80 - https://piped.video/channel/UCDPk9MG2RexnOMGTD-YnSnA # Nat Geo Wild
83 + #https://piped.video/channel/UCpVm7bg6pXKo1Pr6k5kxG9A # National Geographic
84 + #https://piped.video/channel/UCDPk9MG2RexnOMGTD-YnSnA # Nat Geo Wild
81 85 #https://piped.video/channel/UCL-g3eGJi1omSDSz48AML-g # NVIDIA GeForce
82 86 https://piped.video/channel/UC-ihxmkocezGSm9JcKg1rfw # OperatorDrewski
83 87 https://piped.video/channel/UCfpCQ89W9wjkHc8J_6eTbBg # Outdoor Boys
84 88 #https://piped.video/channel/UCKGe7fZ_S788Jaspxg-_5Sg # PC Security Channel
85 - #https://piped.video/channel/UCwdsaWtA70AiVeALp2ux6RA # RamenStyle
89 + https://piped.video/channel/UCwdsaWtA70AiVeALp2ux6RA # RamenStyle
86 90 #https://piped.video/channel/UCs5QhJQF9I1m81bCJy0WO-w # Real History
87 - https://piped.video/channel/UCB1qBlpuLMi2ydz8zxFfLfw # Ribecka
91 + #https://piped.video/channel/UCB1qBlpuLMi2ydz8zxFfLfw # Ribecka
88 92 https://piped.video/channel/UC8kQrh-1JyFZ3RiTHHKMt7A # Ruby Dashcam Academy
89 93 https://piped.video/channel/UCRtsZ5Iak9wSLsQLQ3XOAeA # SciManDan
90 94 #https://piped.video/channel/UCZpZTSdvEgVf0BqTqf9NjNg # Sean Dalton
91 95 https://piped.video/channel/UCpXwMqnXfJzazKS5fJ8nrVw # shiey
92 - https://piped.video/channel/UCUMwsAsbK-SsW5GHufJJFUA # SHL
96 + #https://piped.video/channel/UCUMwsAsbK-SsW5GHufJJFUA # SHL
93 97 https://piped.video/channel/UCpB959t8iPrxQWj7G6n0ctQ # SSSniperWolf
94 98 https://piped.video/channel/UCQD3awTLw9i8Xzh85FKsuJA # SovietWomble
99 + #https://piped.video/channel/UCOt5hVyS2-nbcJ3_FP41Ajg # Tomographic
95 100 #https://piped.video/channel/UCHnyfMqiRRG1u-2MsSQLbXA # Veritasium
96 101 https://piped.video/channel/UCYfnmhHA2O-q1JHPJDWpaOQ # Volvo Dashcam
97 - #https://piped.video/channel/UCvz84_Q0BbvZThy75mbd-Dg # Zack D. Films
102 + #https://piped.video/channel/UCvz84_Q0BbvZThy75mbd-Dg # Zack D. Films
103 + https://piped.video/channel/UC4Tklxku1yPcRIH0VVCKoeA # Quantum Tech HD

airikr revised this gist 2 weeks ago. Go to revision

No changes

airikr revised this gist 6 months ago. Go to revision

1 file changed, 4 insertions, 2 deletions

download-youtube-videos.sh

@@ -52,6 +52,7 @@ sudo chown -R jellyfin:jellyfin "${path}"
52 52
53 53 # channels.txt
54 54 https://piped.video/channel/UCRiYVwfoEnKfweISfKytuQw # Akimbo
55 + https://piped.video/channel/UCxXlxVmarXu3n340ah5xwqA # Astrobiscuit
55 56 #https://piped.video/channel/UCTEEa35OCDcJDh-lwbXehdg # CantrellCaving
56 57 https://piped.video/channel/UCg6gPGh8HU2U01vaFCAsvmQ # Chris Titus Tech
57 58 #https://piped.video/channel/UCvfqpaehdaqtkXPNhvJRyGA # Dash Cam Owners Australia
@@ -75,6 +76,8 @@ https://piped.video/channel/UCla1P6TzCetvMHJ6ZHyXxgA # Kanal 5 Sverige
75 76 #https://piped.video/channel/UCXuqSBlHAE6Xw-yeJA0Tunw # Linus Tech Tips
76 77 #https://piped.video/channel/UCKIrZr7WuPFgFy7OfkAuHOw # MegaDrivingSchool
77 78 #https://piped.video/channel/UCS67mNnpfnHsU3IQYNHLToA # Most Dangerous
79 + https://piped.video/channel/UCpVm7bg6pXKo1Pr6k5kxG9A # National Geographic
80 + https://piped.video/channel/UCDPk9MG2RexnOMGTD-YnSnA # Nat Geo Wild
78 81 #https://piped.video/channel/UCL-g3eGJi1omSDSz48AML-g # NVIDIA GeForce
79 82 https://piped.video/channel/UC-ihxmkocezGSm9JcKg1rfw # OperatorDrewski
80 83 https://piped.video/channel/UCfpCQ89W9wjkHc8J_6eTbBg # Outdoor Boys
@@ -91,5 +94,4 @@ https://piped.video/channel/UCpB959t8iPrxQWj7G6n0ctQ # SSSniperWolf
91 94 https://piped.video/channel/UCQD3awTLw9i8Xzh85FKsuJA # SovietWomble
92 95 #https://piped.video/channel/UCHnyfMqiRRG1u-2MsSQLbXA # Veritasium
93 96 https://piped.video/channel/UCYfnmhHA2O-q1JHPJDWpaOQ # Volvo Dashcam
94 - #https://piped.video/channel/UCvz84_Q0BbvZThy75mbd-Dg # Zack D. Films
95 - https://piped.video/channel/UCxXlxVmarXu3n340ah5xwqA # Astrobiscuit
97 + #https://piped.video/channel/UCvz84_Q0BbvZThy75mbd-Dg # Zack D. Films

airikr revised this gist 6 months ago. Go to revision

1 file changed, 2 insertions

download-youtube-videos.sh

@@ -48,6 +48,8 @@ sudo chown -R jellyfin:jellyfin "${path}"
48 48 --match-filter "!is_live & live_status!=is_upcoming & availability=public & title!*=WAN"
49 49 --download-archive "/path/to/youtube/downloaded.txt"
50 50 -o "/path/to/youtube/%(channel)s/%(upload_date>%Y-%m-%d)s - %(title)s [%(id)s].%(ext)s"
51 +
52 +
51 53 # channels.txt
52 54 https://piped.video/channel/UCRiYVwfoEnKfweISfKytuQw # Akimbo
53 55 #https://piped.video/channel/UCTEEa35OCDcJDh-lwbXehdg # CantrellCaving

airikr revised this gist 6 months ago. Go to revision

1 file changed, 46 insertions, 2 deletions

download-youtube-videos.sh

@@ -3,7 +3,7 @@ path="/path/to/youtube-folder"
3 3
4 4 sudo chown -R user:user "${path}"
5 5
6 - yt-dlp --config-location "ytdlp-config.txt" -a "${path}/channels-1.txt"
6 + yt-dlp --config-location "ytdlp-config.txt" -a "${path}/channels.txt"
7 7
8 8 echo
9 9 echo "Deleting JSON files"
@@ -17,6 +17,7 @@ done
17 17 echo "Done"
18 18 echo
19 19
20 + # Making it possible for you to delete files directly from Jellyfin
20 21 sudo chown -R jellyfin:jellyfin "${path}"
21 22
22 23
@@ -46,4 +47,47 @@ sudo chown -R jellyfin:jellyfin "${path}"
46 47 --compat-options no-youtube-unavailable-videos
47 48 --match-filter "!is_live & live_status!=is_upcoming & availability=public & title!*=WAN"
48 49 --download-archive "/path/to/youtube/downloaded.txt"
49 - -o "/path/to/youtube/%(channel)s/%(upload_date>%Y-%m-%d)s - %(title)s [%(id)s].%(ext)s"
50 + -o "/path/to/youtube/%(channel)s/%(upload_date>%Y-%m-%d)s - %(title)s [%(id)s].%(ext)s"
51 + # channels.txt
52 + https://piped.video/channel/UCRiYVwfoEnKfweISfKytuQw # Akimbo
53 + #https://piped.video/channel/UCTEEa35OCDcJDh-lwbXehdg # CantrellCaving
54 + https://piped.video/channel/UCg6gPGh8HU2U01vaFCAsvmQ # Chris Titus Tech
55 + #https://piped.video/channel/UCvfqpaehdaqtkXPNhvJRyGA # Dash Cam Owners Australia
56 + https://piped.video/channel/UCdC0An4ZPNr_YiFiYoVbwaw # Daily Dose of Internet
57 + https://piped.video/channel/UCTIa8uo_aisNdqQpMf4wKTg # DailyDoseOfInternetCats
58 + https://piped.video/channel/UCnetiRHPnIMBCm-yY4m69qA # Dashcam Lessons
59 + https://piped.video/channel/UCOS7jdle9zw_HnKW4ytZnDw # Dashcam Nation
60 + https://piped.video/channel/UCqOoboPm3uhY_YXhvhmL-WA # Discovery
61 + https://piped.video/channel/UCxByVUuLdxxiqQVmbOnDEzw # Erik Granqvist
62 + #https://piped.video/channel/UCPq2ETz4aAGo2Z-8JisDPIA # ESL Counter-Strike
63 + #https://piped.video/channel/UC73dVtWf9mpjiWYkXyIlm7A # Exploring the Unbeaten Path
64 + https://piped.video/channel/UCPDis9pjXuqyI7RYLJ-TTSA # FailArmy
65 + https://piped.video/channel/UCt8CdzMEoTie3iix3KmvV7A # GameSprout
66 + #https://piped.video/channel/UC5SlWFFu-YvbujLKa0zoNGw # Idiot Drivers
67 + #https://piped.video/channel/UCXE0IwEN5HkDohBq2ebv5Bw # Idiots In Cars
68 + https://piped.video/channel/UCw7FkXsC00lH2v2yB5LQoYA # jackfrags
69 + https://piped.video/channel/UCWFKCr40YwOZQx8FHU_ZqqQ # JerryRigEverything
70 + https://piped.video/channel/UCla1P6TzCetvMHJ6ZHyXxgA # Kanal 5 Sverige
71 + #https://piped.video/channel/UCsXVk37bltHxD1rDPwtNM8Q # Kurzgesagt - In a Nutshell
72 + #https://piped.video/channel/UCpJmBQ8iNHXeQ7jQWDyGe3A # Life Noggin
73 + #https://piped.video/channel/UCXuqSBlHAE6Xw-yeJA0Tunw # Linus Tech Tips
74 + #https://piped.video/channel/UCKIrZr7WuPFgFy7OfkAuHOw # MegaDrivingSchool
75 + #https://piped.video/channel/UCS67mNnpfnHsU3IQYNHLToA # Most Dangerous
76 + #https://piped.video/channel/UCL-g3eGJi1omSDSz48AML-g # NVIDIA GeForce
77 + https://piped.video/channel/UC-ihxmkocezGSm9JcKg1rfw # OperatorDrewski
78 + https://piped.video/channel/UCfpCQ89W9wjkHc8J_6eTbBg # Outdoor Boys
79 + #https://piped.video/channel/UCKGe7fZ_S788Jaspxg-_5Sg # PC Security Channel
80 + #https://piped.video/channel/UCwdsaWtA70AiVeALp2ux6RA # RamenStyle
81 + #https://piped.video/channel/UCs5QhJQF9I1m81bCJy0WO-w # Real History
82 + https://piped.video/channel/UCB1qBlpuLMi2ydz8zxFfLfw # Ribecka
83 + https://piped.video/channel/UC8kQrh-1JyFZ3RiTHHKMt7A # Ruby Dashcam Academy
84 + https://piped.video/channel/UCRtsZ5Iak9wSLsQLQ3XOAeA # SciManDan
85 + #https://piped.video/channel/UCZpZTSdvEgVf0BqTqf9NjNg # Sean Dalton
86 + https://piped.video/channel/UCpXwMqnXfJzazKS5fJ8nrVw # shiey
87 + https://piped.video/channel/UCUMwsAsbK-SsW5GHufJJFUA # SHL
88 + https://piped.video/channel/UCpB959t8iPrxQWj7G6n0ctQ # SSSniperWolf
89 + https://piped.video/channel/UCQD3awTLw9i8Xzh85FKsuJA # SovietWomble
90 + #https://piped.video/channel/UCHnyfMqiRRG1u-2MsSQLbXA # Veritasium
91 + https://piped.video/channel/UCYfnmhHA2O-q1JHPJDWpaOQ # Volvo Dashcam
92 + #https://piped.video/channel/UCvz84_Q0BbvZThy75mbd-Dg # Zack D. Films
93 + https://piped.video/channel/UCxXlxVmarXu3n340ah5xwqA # Astrobiscuit

airikr revised this gist 6 months ago. Go to revision

1 file changed, 1 insertion, 1 deletion

download-youtube-videos.sh

@@ -1,5 +1,5 @@
1 1 #!/bin/bash
2 - path="/path/to/youtube"
2 + path="/path/to/youtube-folder"
3 3
4 4 sudo chown -R user:user "${path}"
5 5

airikr revised this gist 9 months ago. Go to revision

1 file changed, 46 insertions, 33 deletions

download-youtube-videos.sh

@@ -1,36 +1,49 @@
1 1 #!/bin/bash
2 2 path="/path/to/youtube"
3 3
4 - sudo chown -R airikr:airikr "${path}"
5 -
6 - yt-dlp \
7 - --progress \
8 - --ignore-errors \
9 - --check-formats \
10 - --format "bv*[height<1080][ext=mp4]+ba" \
11 - --cookies-from-browser firefox:av9irb5a.profile \
12 - --merge-output mkv \
13 - --write-info-json \
14 - --write-annotations \
15 - --write-thumbnail \
16 - --convert-thumbnails jpg \
17 - --embed-thumbnail \
18 - --embed-chapters \
19 - --embed-info-json \
20 - --ignore-errors \
21 - --add-metadata \
22 - --parse-metadata "%(title)s:%(meta_title)s" \
23 - --parse-metadata "%(uploader)s:%(meta_artist)s" \
24 - --restrict-filenames \
25 - --concurrent-fragments 3 \
26 - --sponsorblock-mark all,-preview,-filler,-interaction \
27 - --dateafter now-7days \
28 - --playlist-end 10 \
29 - --no-playlist \
30 - --compat-options no-youtube-unavailable-videos \
31 - --match-filter "!is_live & live_status!=is_upcoming & availability=public & title!*=WAN" \
32 - --download-archive "${path}/downloaded.txt" \
33 - -a "${path}/channels.txt" \
34 - -o "${path}/%(channel)s/%(upload_date>%Y-%m-%d)s - %(title)s [%(id)s].%(ext)s"
35 -
36 - sudo chown -R jellyfin:jellyfin "${path}"
4 + sudo chown -R user:user "${path}"
5 +
6 + yt-dlp --config-location "ytdlp-config.txt" -a "${path}/channels-1.txt"
7 +
8 + echo
9 + echo "Deleting JSON files"
10 + echo
11 + for file in "${path}"/*/*.json; do
12 + if [ -f "$file" ]; then
13 + sudo rm "$file"
14 + fi
15 + done
16 +
17 + echo "Done"
18 + echo
19 +
20 + sudo chown -R jellyfin:jellyfin "${path}"
21 +
22 +
23 +
24 + # ytdlp-config.txt
25 + --progress
26 + --ignore-errors
27 + --check-formats
28 + --format "bestvideo[height<=1080][ext=mkv]+bestaudio[ext=m4a]/best[ext=mkv]/best"
29 + --merge-output mkv
30 + --write-info-json
31 + --write-annotations
32 + --write-thumbnail
33 + --convert-thumbnails jpg
34 + --embed-thumbnail
35 + --embed-chapters
36 + --embed-info-json
37 + --ignore-errors
38 + --add-metadata
39 + --restrict-filenames
40 + --concurrent-fragments 3
41 + --sponsorblock-mark all,-preview,-filler,-interaction
42 + --dateafter now-7days
43 + --playlist-end 10
44 + --no-playlist
45 + --cookies-from-browser firefox:vzh1hdbr.default-release
46 + --compat-options no-youtube-unavailable-videos
47 + --match-filter "!is_live & live_status!=is_upcoming & availability=public & title!*=WAN"
48 + --download-archive "/path/to/youtube/downloaded.txt"
49 + -o "/path/to/youtube/%(channel)s/%(upload_date>%Y-%m-%d)s - %(title)s [%(id)s].%(ext)s"

airikr revised this gist 10 months ago. Go to revision

1 file changed, 3 insertions, 4 deletions

download-youtube-videos.sh

@@ -1,5 +1,4 @@
1 1 #!/bin/bash
2 - # */3 * * * /bin/bash -c "download-youtube-videos.sh"
3 2 path="/path/to/youtube"
4 3
5 4 sudo chown -R airikr:airikr "${path}"
@@ -9,7 +8,7 @@ yt-dlp \
9 8 --ignore-errors \
10 9 --check-formats \
11 10 --format "bv*[height<1080][ext=mp4]+ba" \
12 - --cookies-from-browser firefox:av9irb5a.edgren \
11 + --cookies-from-browser firefox:av9irb5a.profile \
13 12 --merge-output mkv \
14 13 --write-info-json \
15 14 --write-annotations \
@@ -29,9 +28,9 @@ yt-dlp \
29 28 --playlist-end 10 \
30 29 --no-playlist \
31 30 --compat-options no-youtube-unavailable-videos \
32 - --match-filter "!is_live & live_status!=is_upcoming & availability=public" \
31 + --match-filter "!is_live & live_status!=is_upcoming & availability=public & title!*=WAN" \
33 32 --download-archive "${path}/downloaded.txt" \
34 33 -a "${path}/channels.txt" \
35 - -o "${path}/%(channel)s/%(upload_date>%Y-%m-%d)s - %(title)s [%(id)s].%(ext)s" 2>&1 | tee "${path}/output.log"
34 + -o "${path}/%(channel)s/%(upload_date>%Y-%m-%d)s - %(title)s [%(id)s].%(ext)s"
36 35
37 36 sudo chown -R jellyfin:jellyfin "${path}"
Newer Older