Skip to content

Instantly share code, notes, and snippets.

@hoangdh
Created November 6, 2018 14:46
Show Gist options
  • Save hoangdh/dae677b2ce24918402e0897f0bf3b070 to your computer and use it in GitHub Desktop.
Save hoangdh/dae677b2ce24918402e0897f0bf3b070 to your computer and use it in GitHub Desktop.
Tải film từ VTV Giải trí.
#!/bin/bash
regex='(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'
if [ -e $1 ]
then
lists=`cat $1`
for x in $lists
do
name=`echo $x | grep -Eo '?.*?\.mp4' | awk -F '/' {'print $NF'}`
ffmpeg -i "$x" -c copy $name
done
elif [[ $1 =~ $regex ]]; then
name=`echo $1 | grep -Eo '?.*?\.mp4' | awk -F '/' {'print $NF'}`
ffmpeg -i "$1" -c copy $name
else
echo 'Please insert input.'
fi
@hoangdh
Copy link
Author

hoangdh commented Nov 6, 2018

Bấm F12 > Chọn tab Network (Lọc file M3U8)

Lấy toàn bộ link M3U8 từ VTV Giải trí cho vào file text. Chạy script kèm theo file text

Yêu cầu: FFMpeg

./download-vtvgiaitri.sh list.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment