I'm moving everything from Windows 8 to Kubuntu (including Games!)


(Gregorius Techneticies) #21

Yeah back on Windows XP everything just kinda worked, but now on newer Windows nothing works!


(Gregorius Techneticies) #22

Recently I got pissed at Youtube again not showing the Notifications for my Subscriptions despite ringing the Bell and everything, so I decided I will write something that does it for me.

First I grabbed all the Channel Page Links I could get (except for the 10 that this wont work for)

Then I added the argument for making an Archive of already downloaded Links to keep track of:

 --download-archive "~/Documents/Scripts/downloaded.txt"

And an Argument for stopping the Check after 24 Videos:

 --playlist-end 24

Now the Script will download the 24 most recent Videos from the Channel Page, but clearly I dont wanna download 24 of the videos I already watched, so I needed to be a bit tricky and changed this:

 -o "/data/Downloads/%(title)s.%(ext)s"

to this:

 -o "~/Documents/Scripts/dummy.txt"

And added an empty dummy.txt File to that Location, so now the 24 most recent Videos will be added to the List of Links it already downloaded, because youtube-dl thinks the File is already done.

Then I changed it back to the actual Location, since all Videos were marked as Downloaded now.

Now the Script, whenever I press the Macro Key on my Keyboard for it, will automatically download all new Videos regardless of what Youtube thinks I should be notified about, and that at the Resolution I want them to be (unlike what the Youtube Media Player often does).

But there was more, Videos that go at 240p get throttled by Youtube, which is ofcourse slowing down this entire Script. Adding this Argument fixed that though:

 --http-chunk-size 10M

Though one problem was left, there is Channels where I want 360p Videos for one Type of Content and 240p for another Type. Mainly in case of TeamFourStar, so I needed to use a Regex so the DnD and the Fan Art Streams were downloaded at a higher Resolution.

 --match-title "tfs.at.the|fan.art|fanart|inktober"

And then follow the 360p Regex Filtered Line with a 240p Unfiltered Line, which thanks to the Download Archive that keeps track of downloaded Videos will not repeat downloading the 360p Video.

youtube-dl "https://www.youtube.com/channel/UCyfG7-7lPhf6EIC6igUOfzw/videos" -if "best[height<=360]" -o "/data/Downloads/%(title)s.%(ext)s" --restrict-filenames --retries infinite --console-title --download-archive "~/Documents/Scripts/downloaded.txt" --playlist-end 24 --http-chunk-size 10M --match-title "tfs.at.the|fan.art|fanart|inktober"
youtube-dl "https://www.youtube.com/channel/UCyfG7-7lPhf6EIC6igUOfzw/videos" -if "best[height<=240]" -o "/data/Downloads/%(title)s.%(ext)s" --restrict-filenames --retries infinite --console-title --download-archive "~/Documents/Scripts/downloaded.txt" --playlist-end 24 --http-chunk-size 10M