Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ilive.to / streamlive.to plugin broken #739

Closed
hpmueller1971 opened this issue Feb 16, 2015 · 34 comments
Closed

ilive.to / streamlive.to plugin broken #739

hpmueller1971 opened this issue Feb 16, 2015 · 34 comments

Comments

@hpmueller1971
Copy link

Hi,

the plugin for streamlive.to is broken since a few weeks. The problem seems to be that the website that the plugin uses (http://www.mobileonline.tv/index.php) does no longer gives valid links for the channels; but the channels themself on streamlive.to are working in the browser.

Any chance someone could adapt the plugin to work directly with streamlive.to instead of mobileonline.tv?

@hpmueller1971
Copy link
Author

Hi all,

little update, there's an official kodi-addon from streamlive.to under http://142.4.216.60/ which is also written in python, seems to have a nice library to fetch token, channels etc, maybe this is usefull for some snakewranglers here ;).

@expandables2
Copy link

Found this in sportsdevil hopefully it can help with ilive.

#item_info_name=title
#item_info_from=@param1@
#item_info_build=iLive - %s

item_info_name=pageUrl
item_info_from=@param1@
item_info_build=http://www.streamlive.to/embedplayer.php?width=640&height=400&channel=%s&autoplay=true

item_info_name=req
item_info_from=pageUrl
item_info_convert=getInfo('%s','._getJSON("([^'"]+)".streamer[:,]\s'"['"]._file[:,]\s*'".flv['"]','@referer@','server|rtmp.tmp|file')
item_info_build=%s

item_info_name=token
item_info_from=http:' + server
item_info_convert=getInfo('%s','.?token":"([^'"]+).','http://www.streamlive.to/embedplayer.php')
item_info_build=%s

item_info_name=rtmp
item_info_from=rtmp.tmp
item_info_convert=replace('%s','','')
#item_info_convert=replace('%s','watch1','watch3')
item_info_build=%s

item_info_name=app
item_info_from=rtmp
item_info_convert=parseText('%s','._._rtmp://[.\w:]*/([^\s]+)')
item_info_build=%s

item_info_name=url
item_info_from=rtmp + ' app=' + app + ' playpath=' + file + ' swfUrl=http://www.streamlive.to/player/player_ilive_embed.swf live=1 timeout=15 token=' + token + ' swfVfy=1 pageUrl=http://www.streamlive.to
item_info_build=%s

@expandables2
Copy link

I played a channel and it output this
rtmp://watch4.streamlive.to:1935/edge/definst/?xs=_we_bG9nb2piamhhcjc5cGM4fDE0MzEzODI5ODZ8MjQuMjMxLjUxLjIzOHw1NTUxMmE2MmNjZjg5fDg5NzIzOWI5NDk0YTI2MTFlODk4OWY1Mzg2MzhkMjdjMWUyMGNhNzY. app=edge/definst/?xs=_we_bG9nb2piamhhcjc5cGM4fDE0MzEzODI5ODZ8MjQuMjMxLjUxLjIzOHw1NTUxMmE2MmNjZjg5fDg5NzIzOWI5NDk0YTI2MTFlODk4OWY1Mzg2MzhkMjdjMWUyMGNhNzY. playpath=logojbjhar79pc8 swfUrl=http://www.streamlive.to/player/player_ilive_embed.swf live=1 timeout=15 token=q4d420459646f77a995b0783ece4215b swfVfy=1 pageUrl=http://www.streamlive.to

@vstavrinov
Copy link

Here is solution. Log in on

http://m.streamlive.to/login

with Your user name and password and save cookies. Then get e.g.

http://m.streamlive.to/view/68967

using saved cookies and cut out from there stream MRL with command:

grep -Po "<video .* src="\K[^\"]+"

@vstavrinov
Copy link

Actually logging in not needed. So, solution is very simple.

@privatesam
Copy link

Logging in is now needed to access m.streamlive.to

I've been trying to use a Python script with the Requests library to automate logging in and then scraping the MRL but I can't get the log in script to work let alone then figure out how to use the cookies to keep scraping - can you help potantate?

@vstavrinov
Copy link

On Wed, Oct 21, 2015 at 01:02:57AM -0700, privatesam wrote:

Logging in is now needed to access m.streamlive.to

Neither logging in, nor m.streamlive.to not needed any more for now.

I've been trying to use a Python script with the Requests library to
automate logging in and then scraping the MRL but I can't get the log

As above, You don't need logging in anymore.

in script to work let alone then figure out how to use the cookies to

But cookies still required.

keep scraping - can you help potantate?

Here in attachment is my bash script running by cgi via http.
So You can play video this way for example:

ffplay http://your_web_server/cgi/streamlive?pattern=HBO&categories=Entertainment,Movies'

You may decide that it has redundant functionality, because it uses
categories list and channel names pattern or channel id explicitly.
In first case it finds the list of matching channels and then
randomly picks out one of them for streaming. You can see this list
by making GET request with "show=1" parameter. With "debug=1"
parameter you can get exact command line of rtmpdump with full MRL,
that will be played. If You got 404 http response with "show=1"
parameter, this means that there are no available streams matching
Your request. In case of you got at least one channel with "show=1"
parameter, but after that You got 404 http response either with
"debug=1" parameter, or trying to play it, this most likely means
that this channel requires premium account. I don't checked this, but
may be it is possible to watch such channels if You do logging in
with this script. You can see this part of code commented out, that
I've used some time before.

You can skip categories list and channel pattern and play exact
channel with parameter "channel=$id", where $id is channel number
that You can see in page url.

Also You can see there simple captcha handling. It may become a
problem in the future if they will use images.

And finally xml parser used to get available channels.

#!/bin/bash

#set -x -v

NAME="Your_login_name"
PASSWORD="Your_password"
LOGIN="http://m.streamlive.to/login"
COOKIES="$(mktemp /dev/shm/streamlive.cookies.XXXXXXXX)"
#COOKIES="streamlive.cookies"

SEARCH="http://www.streamlive.to/api/live.xml"
#VIDEO="http://m.streamlive.to/view/"
#VIDEO="http://www.streamlive.to/channel.php?n="
VIDEO="http://www.streamlive.to/view/"
PLAYER="http://cdn.streamlive.to/player/ilive-plugin.swf"
JSON="http://www.streamlive.to/server.php?id=$(date +%s)"

QUERY_STRING=$(
echo "$QUERY_STRING" |
sed -e 's/%20/" "/'
)
eval "${QUERY_STRING//&/ }"

[ "$categories" != "${categories/,/}" ] &&
categories=$(
echo "$categories" |
sed -r -e 's/,/|/g' -e 's/([^,]+)/(\1)/g'
)

if [ -z "$pattern" ] && [ -z "$channel" ]; then
if [ -z "$channel" ]; then
echo "channel not specified. Exiting ..."
else
echo "pattern not specified. Exiting ..."
fi
echo -e "Content-Type: text/plain\n"
exit 1
fi

#wget -U "" -qO - \

--post-data "username=$NAME&password=$PASSWORD&submit=Login&accessed_by=web" \

--keep-session-cookies \

--save-cookies $COOKIES $LOGIN > /dev/null

TOKEN=$(
wget -qO - $JSON |
php -r 'fscanf(STDIN, "%s\n", $json);
$data=(json_decode($json, true));
echo $data["token"];')

stream () {
channel=$1
HTML="$(
wget -U '' -qO -
--save-cookies $COOKIES
--keep-session-cookies
${VIDEO}${channel}
)"
[ -v debug ] && echo "$HTML" 1>&2
QUESTION=$(
echo "$HTML" |
grep -Po '\bQuestion: (.: )?\K[^<>]+'
)
if [ $(($QUESTION)) -gt 0 ]; then
CAPTCHA=$(($QUESTION))
else
CAPTCHA=$QUESTION
fi
HTML="$(
wget -U "" --keep-session-cookies
--load-cookies $COOKIES
--post-data="captcha=$CAPTCHA"
-qO - ${VIDEO}${channel}
)"
[ -v debug ] && echo "$HTML" 1>&2
#echo "$HTML" |
#grep -Po "'file': '\K[^']+"
URL=$(
echo "$HTML" |
grep -Po 'streamer: "\K[^\"]+' |
sed 's%%%g'
)
[ -z "$URL" ] && return 1
APP=$(
echo "$URL" |
grep -Po '^[[:alnum:]]+://[^/]+/\K.
'
)
FILE=$(
echo "$HTML" |
grep -Po 'file: "\K[^".]+'
)
echo "$URL -a $APP -y $FILE -p ${VIDEO}${channel}"

}

if [ -n "$channel" ]; then
LOCATION=$(stream $channel )
else
LIST="$(
wget -U "" -qO - "$SEARCH" |
xmlstarlet sel -T -t -m channels/channel
-v name -o ","
-v category -o ","
-v language -o ","
-v url -n |
awk -v IGNORECASE=1 -F, "{
if (($2 ~ "${categories}")
&& ($1 ~ "${pattern}")
&& ($3 ~ "${language}")) {
printf $4
printf "\t" $1 " (" $2 ")"
print "\n"
}
}"
)"

if [ -z "$LIST" ]; then
    echo "Status: 404 Not Found"
    echo -e "Content-Type: text/plain\n"
    echo "No stream found."
    exit
fi

if [ -v show ]; then
    echo -e "Content-Type: text/plain\n"
    echo "$LIST"
    exit
fi
LOCATION=$(
    echo "$LIST" |
    while read URL TITLE; do
        CHANNEL=$(echo "$URL" | grep -Eo '[0-9]+$')
        STREAM="$(stream $CHANNEL)"
        # HEAD "$STREAM" > /dev/null &&
        [ -n "$STREAM" ] &&
        echo "$STREAM"
    done |
    shuf |
    tail -1
)

fi

if [ -n "$LOCATION" ]; then
# echo -e "Location: $LOCATION\n"
echo -e "Content-Type: video/flv\n"
eval ${debug:+echo} "rtmpdump -r $LOCATION -W $PLAYER -T $TOKEN -f 'LNX 19,0,0,201' -v"
else
echo "Status: 404 Not Found"
echo -e "Content-Type: text/plain\n"
echo "No stream available."
fi

rm $COOKIES

@privatesam
Copy link

vstavrinov Thanks so much for this! Going to start playing with this script now and try and get it working. Really appreciate you taking the time to post back.

@privatesam
Copy link

vstavrinov almost got this working but just struggling with this error:

line 146: rtmpdump: command not found

The script is scraping and getting the MRL and the rmtp address but regardless of if I try and run ffplay or vlc the stream won't play. Once I've got the MRL and a token can I plug this data direct into ffplay/vlc to get the stream running?

@skulblakka
Copy link
Contributor

rtmpdump: command not found

Do you have rtmpdump installed and added to you path?

@privatesam
Copy link

Oops! Nope - I thought it came with ffplay. Just installed now and now the script kicks out a different error:

WARNING: You haven't specified an output file (-o filename), using stdout
Connecting ...
INFO: Connected...
ERROR: RTMP_ReadPacket, failed to read RTMP packet header

(thanks for helping out here skulblakka)

@vstavrinov
Copy link

On Wed, Oct 21, 2015 at 09:01:06AM -0700, privatesam wrote:

line 146: rtmpdump: command not found

Yes, You should install rtmpdump first as well as other utilities,
used in the script :) rtmpdump outputs the stream to stdin and then
feed via http to Your player.

The script is scraping and getting the MRL and the RTMP address but
regardless of if I try and run ffplay or vlc the stream won't play.
Once I've got the MRL and a token can I plug this data direct into
ffplay/vlc to get the stream running?

Yes, but it is limited in time, because the MRL contains
authorization data. But You actually don't need this because the
script works well even with example given.

Vladimir Stavrinov

@vstavrinov
Copy link

On Wed, Oct 21, 2015 at 09:20:57AM -0700, privatesam wrote:

WARNING: You haven't specified an output file (-o filename), using

You are probably using ffmpeg instead of ffplay.

But with http You can use any player.

Vladimir Stavrinov

@privatesam
Copy link

Solved some bits and pieces that were wrong with my install (php etc). Now the script almost works. I had to change line #55 grep -Po "'file': '\K[^']+" this line was originally hashed but my channel identification using just wouldn't work without this. Now it seems to grab all the information it needs but rtmpdump is still struggling to get anything streaming down. The error always returns:

 WARNING: You haven't specified an output file (-o filename), using stdout
 Connecting ...
INFO: Connected...
ERROR: rtmp server sent error
ERROR: rtmp server requested close
./streamlive.sh: line 155: rtmp://watch4.streamlive.to:1935/edge/_definst_/?    xs=_we_ZHQwcXZrNm5tZGhrOHU2fDE0NDU1MzUxMDZ8NzcuOTkuMTg3LjI0OXw1NjI5MWMxYWYz    MmRhfGEzMmRkZWNhOWJhY2ZhYjdlOTg4OWY1Y2ZmMDU1YTdiODA0OTM1ZmM.: No such file or directory

I'll post the full script I'm using below and I'm really grateful for any help. Also to note - the script occasionally gets beaten by the captcha - I noticed something went wrong a few times with the question "type the walking dead in the box" and "100 + 100" sum.

Here is my script if you want me to run it with a few more 'echo's thrown in for debugging let me know:

 #!/bin/bash

#set -x -v


NAME="xxxxx"
PASSWORD="xxxxxx"
channel="69956"
LOGIN="http://m.streamlive.to/login"
COOKIES="$(mktemp /dev/shm/streamlive.cookies.XXXXXXXX)"
#COOKIES="streamlive.cookies"

SEARCH="http://www.streamlive.to/api/live.xml"
#VIDEO="http://m.streamlive.to/view/"
#VIDEO="http://www.streamlive.to/channel.php?n="
VIDEO="http://www.streamlive.to/view/"
PLAYER="http://cdn.streamlive.to/player/ilive-plugin.swf"
JSON="http://www.streamlive.to/server.php?id=$(date +%s)"


echo $COOKIES

QUERY_STRING=$(
    echo "$QUERY_STRING" |
    sed -e 's/%20/" "/'
)
eval "${QUERY_STRING//&/ }"

[ "$categories" != "${categories/,/}" ] &&
categories=$(
    echo "$categories" |
    sed -r -e 's/,/\\|/g' -e 's/([^,]+)/\\(\1\\)/g'
)

if [ -z "$pattern" ] && [ -z "$channel" ]; then
    if [ -z "$channel" ]; then
        echo "channel not specified. Exiting ..."
    else
        echo "pattern not specified. Exiting ..."
    fi
    echo -e "Content-Type: text/plain\\n"
    exit 1
fi

#wget -U "" -qO - \
#        --post-data "username=$NAME&password=$PASSWORD&submit=Login&accessed_by=web" \
#        --keep-session-cookies \
#   --save-cookies $COOKIES $LOGIN > /dev/null

TOKEN=$(
    wget -qO - $JSON |
    php -r 'fscanf(STDIN, "%s\n", $json);
        $data=(json_decode($json, true));
        echo $data["token"];')

stream () {
    channel=$1
    HTML="$(
        wget -U '' -qO - \
            --save-cookies $COOKIES \
            --keep-session-cookies \
            ${VIDEO}${channel}
    )"
    [ -v debug ] && echo "$HTML" 1>&2
    QUESTION=$(
        echo "$HTML" |
        grep -Po '\bQuestion: (.*: )?\K[^<>]+'
    )
    if [ $(($QUESTION)) -gt 0 ]; then
        CAPTCHA=$(($QUESTION))
    else
        CAPTCHA=$QUESTION
    fi
    HTML="$(
        wget -U "" --keep-session-cookies \
            --load-cookies $COOKIES \
            --post-data="captcha=$CAPTCHA" \
            -qO - ${VIDEO}${channel}
    )"
    [ -v debug ] && echo "$HTML" 1>&2
    echo "$HTML" |
#the grep on the following line was hashed  
grep -Po "'file': '\K[^']+"
    URL=$(
        echo "$HTML" |
        grep -Po 'streamer: "\K[^\"]+' |
        sed 's%\\%%g'
    )
    [ -z "$URL" ] && return 1
    APP=$(
        echo "$URL" |
        grep -Po '^[[:alnum:]]+://[^/]+/\K.*'
    )
    FILE=$(
        echo "$HTML" |
        grep -Po 'file: "\K[^".]+'
    )
    echo "$URL -a $APP -y $FILE -p ${VIDEO}${channel}"

}

if [ -n "$channel" ]; then
    LOCATION=$(stream $channel )
else
    LIST="$(
        wget -U "" -qO - "$SEARCH" |

let sel -T -t -m channels/channel \
            -v name -o "," \
            -v category -o "," \
            -v language -o "," \
            -v url -n |
        awk -v IGNORECASE=1 -F, "{
            if ((\$2 ~ \"${categories}\") \
                && (\$1 ~ \"${pattern}\") \
                && (\$3 ~ \"${language}\")) {
                    printf \$4
                    printf \"\t\" \$1 \" (\" \$2 \")\"
                    print "\n"
                }
        }"
    )"

    if [ -z "$LIST" ]; then
        echo "Status: 404 Not Found"
        echo -e "Content-Type: text/plain\n"
        echo "No stream found."
        exit
    fi

    if [ -v show ]; then
        echo -e "Content-Type: text/plain\n"
        echo "$LIST"
        exit
    fi
    LOCATION=$(
        echo "$LIST" |
        while read URL TITLE; do
            CHANNEL=$(echo "$URL" | grep -Eo '[0-9]+$')
            STREAM="$(stream $CHANNEL)"
            #HEAD "$STREAM" > /dev/null &&
            [ -n "$STREAM" ] &&
            echo "$STREAM"
        done |
        shuf |
        tail -1
    )
fi

if [ -n "$LOCATION" ]; then
     echo -e "Location: $LOCATION\n"
    echo -e "Content-Type: video/flv\n"
    eval ${debug:+echo} "rtmpdump -r $LOCATION -W $PLAYER -T $TOKEN -f 'LNX 19,0,0,201' -v"
else
    echo "Status: 404 Not Found"
    echo -e "Content-Type: text/plain\n"
    echo "No stream available."

fi

rm $COOKIES

@expandables2
Copy link

Can anyone get the rtmp for this link http://www.newzphobia.com/2013/09/get-latest-views-and-news-from-hln-live-stream/

@vstavrinov
Copy link

privatesam, first of all, if You want to get my script working, You should not change anything inside. When you get it working, then You can try to change something.

Second, this is CGI script, and as such, it designed for http server only. You should configure Your server for CGI. Then You can run it this way:

ffplay http://localhost/cgi/streamlive?channel=57804

Though You can run it from command line for debugging purpose only, for example this way:

QUERY_STRING='pattern=CNN&show=1' ./streamlive

If You want to use it from command line for streaming, You should remove http headers inside script and pipe stream to player:

QUERY_STRING='channel=57804' ./streamlive | ffplay -

Again: don't spend Your time for command line, but do configure Your server instead.

@expandables2
Copy link

Hi sir can you please help me on getting the rtmp for this link http://www.newzphobia.com/2013/09/get-latest-views-and-news-from-hln-live-stream/ So i can play it in vlc thanks!

@privatesam
Copy link

Thanks for the help vstavrinov I'll sort out my cgi-bin today and test the script using http as per your instructions.

@vstavrinov
Copy link

On Thu, Oct 22, 2015 at 01:12:44PM -0700, expandables2 wrote:

Hi sir can you please help me on getting the rtmp for this link
http://www.newzphobia.com/2013/09/get-latest-views-and-news-from-hln-li
ve-stream/ So i can play it in vlc thanks!

I've sniffed the traffic and saw, that it should look like this:

rtmp://77.92.76.182/live/HLN202?id=48122&pk=d99c3b0f12a1fce42362a3fecd25cae3d7d2c4d02824755413f969f49c3b1953 swfUrl=http://www.janjuaplayer.com/resources/scripts/eplayer.swf pageUrl=http://www.janjuaplayer.com/embedplayer/HLN202/1/600/400 live=1

But it is protected: You see long id there, that is unique and
generated for every request. So we need scrap script for this site
like ones for streamlive.to above to get this id. I will write it.
Wait.

Vladimir Stavrinov

@vstavrinov
Copy link

No, this id don't changed between requests. So there are some other problem. May be token required. Or something else. So we need more deep investigation.

@privatesam
Copy link

vstavrinov I have my web server up and running but apache2 is now kicking out this error:

 malformed header from script 'streamlive.cgi': Bad header: /dev/shm/streamlive.cookies.5e

When I run
ffplay http://localhost/cgi/streamlive?channel=57804

It looks like the cookies string is being cut?

@vstavrinov
Copy link

This means there are no empty line after http header. This done with echo command. Most likely You broke the script in some way. Check this line:

echo -e "Content-Type: video/flv\n"

@privatesam
Copy link

Thanks vstavrinov - I got it working. Just used your script from scratch and took out anything I did - you were right. Thank you for your help.

@vstavrinov
Copy link

Great! We spent time and few messages to convince You do not touch the script. This is help You thanks for. And it is not technical issue. But this is common rule: before modifying any script, get it working first for You, if it is working for others.

@vstavrinov
Copy link

On Thu, Oct 22, 2015 at 01:12:44PM -0700, expandables2 wrote:

Hi sir can you please help me on getting the rtmp for this link
http://www.newzphobia.com/2013/09/get-latest-views-and-news-from-hln-li
ve-stream/ So i can play it in vlc thanks!

Here is cgi script, scraping video from this site in attachment. As
above, You should setup your web server for CGI, and then play it
this way:

vlc http://localhost/cgi/newzphobia?URL=http://www.newzphobia.com/2013/09/get-latest-views-and-news-from-hln-live-stream/

You see, it takes only one parameter URL, but You can add debug=1 for
GET request only.

Vladimir Stavrinov

#!/bin/bash

PLAYER="http://www.janjuaplayer.com/resources/scripts/eplayer.swf"
EMBEDED="http://www.janjuaplayer.com/embedplayer/"
MRL="rtmp://77.92.76.182/live/"

QUERY_STRING=$(
echo "$QUERY_STRING" |
sed -e 's/%20/" "/'
)
eval "${QUERY_STRING//&/ }"

if [ -z "$URL" ]; then 
    echo -e "Content-Type: text/plain\\n"
    echo "URL do not specified. Exiting ..."
    exit 1
fi

PAGE="$(curl -s $URL)"
CHANNEL=$(
echo "$PAGE" |
grep -Po ",channel='\K[^']+"
)
HEIGHT=$(
echo "$PAGE" |
grep -Po ",height=\K[0-9]+"
)
WIDTH=$(
echo "$PAGE" |
grep -Po ">width=\K[0-9]+"
)
G=$(
echo "$PAGE" |
grep -Po ",g='\K[^']+"
)

FLASHVARS="$(
curl -se "$URL" "${EMBEDED}/${CHANNEL}/${G}/${WIDTH}/${HEIGHT}" |
grep -Po "so.addParam('FlashVars', '\K[^\']+"
)"

eval "${FLASHVARS//&/ }"

echo -e "Content-Type: video/flv\n"
eval ${debug:+echo} "rtmpdump -r '${MRL}${CHANNEL}?id=$id&pk=$pk' -W $PLAYER -C 'S:OK'"

@privatesam
Copy link

Hi vstavrinov . Just wanted to ask a quick question - no worries if you haven't got time to take a look but the Walking Dead captcha keeps kicking out this error (this is from my apache log). Don't want to start editing the script to fix this if you know how:

 line 64: walking dead: syntax error in expression (error token is "dead")

@vstavrinov
Copy link

On Mon, Oct 26, 2015 at 03:03:03AM -0700, privatesam wrote:

line 64: walking dead: syntax error in expression (error token is "dead")

This may occur when QUESTION variable is empty, but this should not
be the case. It means that something changed on site side with
captcha. First of all we should find what changed on the site. But in
any case the code should be modified for the case when QUESTION
variable is empty.

Vladimir Stavrinov

@vstavrinov
Copy link

On Mon, Oct 26, 2015 at 01:22:07PM +0300, Vladimir Stavrinov wrote:

be the case. It means that something changed on site side with
captcha. First of all we should find what changed on the site. But in

Yes, this is true - chaptcha gets essential changes. But as I see, it
is still foolish enough to make possible to handle it with our
script. I will try.

Vladimir Stavrinov

@vstavrinov
Copy link

On Mon, Oct 26, 2015 at 01:33:49PM +0300, Vladimir Stavrinov wrote:

Yes, this is true - chaptcha gets essential changes. But as I see, it
is still foolish enough to make possible to handle it with our
script. I will try.

It is amazing: with new changes our script still working in most
cases. Only problematic is case where captcha is (100+100)=? But it
is hard to catch this case in command line for debugging. I saw it
only in browser.

Vladimir Stavrinov

@privatesam
Copy link

Yes its not a strong captcha and also I've noticed you can simply keep requesting the page and it'll provide a new captcha that the script can use.

@vstavrinov
Copy link

On Mon, Oct 26, 2015 at 01:33:49PM +0300, Vladimir Stavrinov wrote:

Yes, this is true - chaptcha gets essential changes. But as I see, it
is still foolish enough to make possible to handle it with our
script. I will try.

Done. The only changes we need is to add single symbol in regex:

--- /opt/cgi/streamlive 2015-10-26 14:13:04.817826959 +0300
+++ streamlive 2015-10-26 14:11:59.417634823 +0300
@@ -59,7 +59,7 @@
[ -v debug ] && echo "$HTML" 1>&2
QUESTION=$(
echo "$HTML" |

  •           grep -Po '\bQuestion: (.*: )?\K[^<>]+'
    
  •           grep -Po '\bQuestion: (.*: )?\K[^<>=]+'
    )
    if [ $(($QUESTION)) -gt 0 ]; then
            CAPTCHA=$(($QUESTION))
    

Vladimir Stavrinov

@vstavrinov
Copy link

On Mon, Oct 26, 2015 at 04:11:09AM -0700, privatesam wrote:

Yes its not a strong captcha and also I've noticed you can simply keep
requesting the page and it'll provide a new captcha that the script can
use.

That is because I've wrote good regex: it catches answer after colon.
But I think the captcha is in development stage and gives us the
right answer for debugging purposes. So, unfortunately for us, most
likely it will be changed in the future.

Vladimir Stavrinov

@btpole
Copy link

btpole commented Nov 23, 2015

I have managed to parse any channel and play it via Roku, though it took many hours of testing and changing things around. As of now pretty much have it all being done in the box thru Brightscript. Had also done alot with php. My question is has any body figured out how the xs token string is generated? Would like to figure that one out.

@fragtion
Copy link

fragtion commented Sep 2, 2016

Hi guys. Bash script for streamlive.to does not seem to be working correctly, although it seems to be a minor issue. Does anyone have an updated script or livestreamer plugin for this?

Edit: Solution was to remove the following lines:
echo "$HTML" |
#the grep on the following line was hashed
grep -Po "'file': '\K[^']+"

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

No branches or pull requests

8 participants