youtube ripper using rss feeds now

This commit is contained in:
Alexander Bocken 2020-11-08 12:27:34 +01:00
parent 6dd9899a03
commit 01ba893623
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8

View File

@ -1,8 +1,6 @@
#!/bin/zsh #!/bin/zsh
#needed if run as cronjob #needed if run as cronjob
export XDG_VIDEOS_DIR=$HOME/vids export XDG_VIDEOS_DIR=$HOME/vids
echo $XDG_VIDEOS_DIR
DLARCHIVE=$XDG_VIDEOS_DIR/.downloaded DLARCHIVE=$XDG_VIDEOS_DIR/.downloaded
DLLOC=$XDG_VIDEOS_DIR DLLOC=$XDG_VIDEOS_DIR
CHANNELSFILE=$XDG_VIDEOS_DIR/.channels CHANNELSFILE=$XDG_VIDEOS_DIR/.channels
@ -14,7 +12,7 @@ export DISPLAY=:0.0
range="now-40years" range="now-40years"
notify-send "Channel Ripper" "Scanning for new Videos to download" notify-send "Channel Ripper" "Scanning for new Videos to download"
echo "Scanning for new Videos to download" echo "Scanning for new Videos to download"
grep 'youtube' "$CHANNELSFILE" | sed "s/$/\/videos/" |xargs -L1 lynx --dump --nonumbers -listonly $1 | grep "youtube.com/watch?v=" | grep -v "&list" > /tmp/todownload grep 'youtube' "$CHANNELSFILE" | xargs -L1 lynx --dump --listonly --nonumbers | grep 'videos.xml' | xargs lynx --dump | grep 'yt:video:' | perl -pe 's/^.*yt:video:([^ \t\s]*) .*$/https:\/\/www\.youtube\.com\/watch\?v=\1/' > /tmp/todownload
grep 'youtube' "$DLARCHIVE" | sed 's/youtube /https:\/\/www\.youtube\.com\/watch?v=/' > /tmp/alreadydownloaded grep 'youtube' "$DLARCHIVE" | sed 's/youtube /https:\/\/www\.youtube\.com\/watch?v=/' > /tmp/alreadydownloaded
grep 'bitchute' "$CHANNELSFILE" | xargs -L1 lynx --dump --nonumbers -listonly $1 | grep 'bitchute\.com\/video' | sort -u >> /tmp/todownload grep 'bitchute' "$CHANNELSFILE" | xargs -L1 lynx --dump --nonumbers -listonly $1 | grep 'bitchute\.com\/video' | sort -u >> /tmp/todownload