-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscript
More file actions
executable file
·27 lines (27 loc) · 1.31 KB
/
script
File metadata and controls
executable file
·27 lines (27 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
case "$1" in
"hls")
echo http://$2
;;
"m3u8")
curl -LNs "$2" | grep -Eom 1 '[^ "|'\''|>]+m3u8[^ "|'\''|<]*' | sed 's/\\//g;s/^\/\//http:\/\//' | grep http | awk '{out=$1 "#Referer=http%3a//'$2'&User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36";print out}'
;;
"dailymotion")
curl -LNs www.dailymotion.com/video/$2 | grep -Eo '[^ "|'\'']+m3u8[^ "|'\'']*' | sed 's/\\//g;s/^\/\//http:\/\//' | tail -1
;;
"euronews")
curl -Ls $(curl -s $2.euronews.com/api/watchlive.json | awk -F'"' '/url/{gsub(/\\/,"");print$(NF-1)}' | sed 's/\\//g;s/^\/\//http:\/\//') | awk -F'"' '/primary/{gsub(/\\/,"");print$(NF-1)}'
;;
"ovva")
curl -LNs $(curl -LNs "$2" | awk -F '"' '/ovva-player",/{print$(NF-1)|"base64 -d"}' | awk -F'"' '/balancer/{gsub(/\\/,"");print$8}') | awk '{gsub(/302=/,"");print $0}'
;;
"youtube")
cd /etc/enigma2;python -Bc "from YouTubeVideoUrl import YouTubeVideoUrl;print YouTubeVideoUrl().extract('$(curl -GLNs "https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&maxResults=1&eventType=live&key=AIzaSyCSDI9_w8ROa1UoE2CNIUdDQnUhNbp9XR4" --data-urlencode "q=$2" | awk -F'"' '/videoId/{print$(NF-1)}')')"
;;
"gledai")
python -B /etc/enigma2/gledai.py $2 $3
;;
*)
echo "Error. No input route"
exit 1
;;
esac