Thread: i24NEWS Live
View Single Post
  #17  
Old 02-02-2019, 05:20 AM
j_cool j_cool is offline
Senior Member
 
Join Date: Feb 2016
Posts: 515
j_cool is on a distinguished road
Default

Re: i24NEWS Live


And here are the latest news from Holy Land in MPV:



Code:
#include <AutoItConstants.au3>
$hls = "http://uk.play.tv/player/play/i24-news-uk/?format=hls^&language=en"
$iPID = Run(@ComSpec & ' /c curl.exe ' & $hls,'',@SW_HIDE,$STDOUT_CHILD)
ProcessWaitClose($iPID)
Local $s = StdoutRead($iPID)
$s = StringTrimLeft($s,StringInStr($s,'.'))
$s = StringTrimRight($s,(StringLen($s)+1)-StringInStr($s,'.'))
$s = StringReplace($s,'_','/')
$iPID = Run('cmd.exe /c decoder.exe -d ' & $s,'','',$STDOUT_CHILD)
ProcessWaitClose($iPID)
$s = StdoutRead($iPID)
$s = StringReplace($s,'\/','/')
$s = StringReplace($s,'{"url":"','')
$s = StringReplace($s,'"}','')
$header = '--http-header-fields="Referer: http://uk.play.tv/live-tv/1110/i24-news-uk/","User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:64.0) Gecko/20100101 Firefox/64.0"'
$s = $header & ' "' & $s & '"'
ShellExecute('mpv.exe',$s)

Last edited by j_cool : 02-02-2019 at 06:16 AM.
Reply With Quote