Skip to content

Commit

Permalink
Fixed to work with current url resolver
Browse files Browse the repository at this point in the history
URL resolver now adds user agent after a | at the end of the URL. This cuts that from the URL so wget can work again.
  • Loading branch information
theredbaron1834 authored Nov 12, 2016
1 parent aab2c34 commit 5550cce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wget-cli
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# </player>

# If you have trouble, uncomment the following line, and send me the output. I might be able to get it working.
#xterm -hold -e echo "wget $1 -P $HOME/Videos/ $2 $3 $4 $5"
xterm -e wget $1 -O "$HOME/Videos/$(zenity --entry --text "File name?" --entry-text "$(echo $1| sed s'/\./\n/g' | head -n 2 | tail -n 1 | tr -cd '[:alnum:] [:space:]')-$(date "+%j%H%M%S%N")").mp4" #If you don't want/need it to stay open, remove -hold and it will auto close.

zenity --notification --text "file downloaded"
#xterm -hold -e echo "wget $URL -P $HOME/Videos/ $2 $3 $4 $5"
URL=$(echo $1 | sed 's/|User-Agent=.*//')
xterm -hold -e wget "$URL" -O "$HOME/Videos/$(zenity --entry --text "File name?" --entry-text "$(echo $URL| sed s'/\./\n/g' | head -n 2 | tail -n 1 | tr -cd '[:alnum:] [:space:]')-$(date "+%j%H%M%S%N")").mp4" #If you don't want/need it to stay open, remove -hold and it will auto close.
notify-send "file downloaded"

0 comments on commit 5550cce

Please sign in to comment.