Thread: i24NEWS Live
View Single Post
  #3  
Old 06-18-2018, 12:16 PM
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


Troller,

you put Streamlink to shame.

They have a plugin for play.tv and it doesn't work more often than it does work.

[cli][info] Found matching plugin play for URL http://uk.play.tv/player/play/i24-news-uk/
[plugin.play][error] invalid username
error: No playable streams found on this URL: http://uk.play.tv/player/play/i24-news-uk/
Press any key to continue . . .

Here is what I make out of "http://uk.play.tv/player/play/i24-news-uk/?format=hls&language=en"

i24.au3

Code:
#include <AutoItConstants.au3>
$s = "http://uk.play.tv/player/play/i24-news-uk/?format=hls^&language=en"
Local $iPID = Run('cmd.exe /c curl.exe ' & $s,'',@SW_HIDE,$STDOUT_CHILD)
ProcessWaitClose($iPID)
Local $s = StdoutRead($iPID)
$s = StringReplace($s,'\/','/')
$s = StringReplace($s,'{"url":"','')
$s = StringReplace($s,'"}','')
$s = StringReplace($s,'\u0026','&')
$header = '--http-header-fields="Accept-Encoding: gzip, deflate","Accept-Language: en-GB,en;q=0.5","Connection: keep-alive","Origin: http://uk.play.tv","Referer: http://uk.play.tv/live-tv/1110/i24-news-uk/","User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0"'
$s = $header & ' "' & $s & '"'
ShellExecute('mpv.exe',$s,'','','')
Replace mpv.exe with another player if you want and specify full path if it is not in %PATH%.
curl should also be on %PATH%, if it is not specify path in script.

Code:
#include <AutoItConstants.au3>
$s = "http://uk.play.tv/player/play/i24-news-uk/?format=hls^&language=en"
Local $iPID = Run('cmd.exe /c curl.exe ' & $s,'',@SW_HIDE,$STDOUT_CHILD)
ProcessWaitClose($iPID)
Local $s = StdoutRead($iPID)
$s = StringReplace($s,'\/','/')
$s = StringReplace($s,'{"url":"','')
$s = StringReplace($s,'"}','')
$s = StringReplace($s,'\u0026','&')
$s = '"' & $s & '"'
ShellExecute('C:\path\YOURPLAYER.exe',$s,'','','')
Save this code as txt file and name it i24.au3

Download autoit-v3.zip from https://www.autoitscript.com/site/autoit/downloads/ and extract it.



Open i24.au3 with scite.exe ( autoit editor and compiler ) and compile i24.au3 to get i24.exe by pressing Ctrl+F7
or choosing compile from tools menu.



Double click on i24.exe and here is screenshot of player working.


Last edited by j_cool : 06-19-2018 at 05:25 AM.
Reply With Quote