Requiremens:
-youtube-dl
- kodi
- youtube addon kodi
0- Fisrst, we go to youtube web and search for 80's Playlists with many movies.. and we download them until we pick enought movies. We copy playlist url and use it like in code below to download playlist youtube urls.:
Code: Select all
playlisturl="https://www.youtube.com/watch?v=_TeoeXWxvZI&list=PLFjximVveyNVCD1u9NkIC0m5hvaSEYUZv"
youtube-dl -j --flat-playlist "$playlisturl" | jq -r '.id' | sed 's_^_https://www.youtube.com/watch?v=_' >> Mylist80's.txt
cat *.txt > Allmovies.txt | sort -u > FilteredMovies.txt
2- Now we will need to pick only urls that are a full movie and drop those ones with low quality (not hd).:
for that we will parse following script that uses youtube-dl.:
youtube1080p720p.sh
**This script generate several resulting txt files with quality of movies, and drop trailers and short movies with duration less than 1 hour
Code: Select all
#!/bin/bash
#
#------#------#------#------#------#------#------#------
bpath="/tmp/backyou720p1080p-`date +%Y-%m-%d_%H%M%S`"
mkdir -p "$bpath"
cp *.txt "$bpath/"
rm 480p.txt 720p.txt 1080p.txt DASH.txt otros.txt sal.txt log*.txt trailers.txt
for i in `cat *.m3u8`;
do
echo $i
A="$(youtube-dl --get-format --get-duration "$i")"
B=$(echo "$A" | tr -cd ':'|wc -c)
if [ "$B" == "2" ]
then
:
else
echo "es Trailer, no tiene x2 comillas el datetime, osea < 1 hora"
echo "Formato es $A : $i" >> logtrailers.txt
echo "$i" >> trailers.txt
continue
fi
case "$A" in
#Formato es 135 - 640x480 (480p)+140 - audio only (tiny)
*"480p"* )
echo "Formato es $A" >> log480p.txt
echo "$i" >> 480p.txt
;;
*"720p"* )
echo "Formato es $A" >> log720p.txt
echo "$i" >> 720p.txt
;;
*"1080p"* )
echo "Formato es $A" >> log1080p.txt
echo "$i" >> 1080p.txt
;;
*"244"* )
echo "Formato es $A" >> log480p.txt
echo "$i" >> 480p.txt
;;
*"247"* )
echo "Formato es $A" >> log720p.txt
echo "$i" >> 720p.txt
;;
*"248"* )
echo "Formato es $A" >> log1080p.txt
echo "$i" >> 1080p.txt
;;
*"135"* )
echo "Formato es $A" >> log480p.txt
echo "$i" >> 480p.txt
;;
*"137"* )
echo "Formato es $A" >> log1080p.txt
echo "$i" >> 1080p.txt
;;
* )
echo "Formato es $A" >> otros.txt
;;
esac
echo "Formato es $A" >> sal.txt
done
bpath="/tmp/backyou720p1080p-`date +%Y-%m-%d_%H%M%S`"
mkdir -p "$bpath"
cp *.txt "$bpath/"
like this, each one.:
Movies of Vampires - Full Movie (1985).strm
Code: Select all
plugin://plugin.video.youtube/play/?video_id=JUA_cV6kkcQ
you2strm.sh
**We will have to rename playlists extensions to m3u8 previously to parse script
Code: Select all
#!/bin/bash
#
for i in `cat *.m3u8`;
do
A=$(youtube-dl -i --get-id --get-filename "$i")
id=$(echo "$A" | head -n 1)
sfilename=$(echo "$A" | tail -n 1)
filename=${sfilename%-*}
echo "Id es $id, Nombre: $filename"
urlyou="plugin://plugin.video.youtube/play/?video_id=$id"
echo "$urlyou" > "$filename.strm"
done
So the resulting we will look like this, and we will get more than 500 hd playable full movies from youtube which copyrights are down to youtube legality, so It will be legal everything we did.:
when we scan folder, We will select : Universal Movies Scrapper, so kodi is able to build up library metadatas information with strm files.
- Kodi folder, with library loaded.:
Enjoy!!