diff --git a/.local/bin/tools/ripper b/.local/bin/tools/ripper index b9ce6f0..c9974e0 100755 --- a/.local/bin/tools/ripper +++ b/.local/bin/tools/ripper @@ -1,8 +1,6 @@ #!/bin/zsh - #needed if run as cronjob export XDG_VIDEOS_DIR=$HOME/vids -echo $XDG_VIDEOS_DIR DLARCHIVE=$XDG_VIDEOS_DIR/.downloaded DLLOC=$XDG_VIDEOS_DIR CHANNELSFILE=$XDG_VIDEOS_DIR/.channels @@ -14,7 +12,7 @@ export DISPLAY=:0.0 range="now-40years" notify-send "Channel Ripper" "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 'bitchute' "$CHANNELSFILE" | xargs -L1 lynx --dump --nonumbers -listonly $1 | grep 'bitchute\.com\/video' | sort -u >> /tmp/todownload