Audio/video stream recording forums (http://stream-recorder.com/forum/index.php)
-   rtmpdump (http://stream-recorder.com/forum/forumdisplay.php?f=54)
-   -  

telewizjada.net

(http://stream-recorder.com/forum/showthread.php?t=20497)

sargonax 12-03-2015 10:32 AM

telewizjada.net


 
i needs help to do rtmpdump this link
Code:

http://www.telewizjada.net/live.php?cid=44

Thx

CristianoA 12-03-2015 12:42 PM

Re: telewizjada.net


 
Code:

http://l130.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8

sargonax 12-03-2015 01:33 PM

Re: telewizjada.net


 
Quote:

Originally Posted by CristianoA (Post 81396)
Code:

http://l130.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8

Your link not working :( ffmpeg answer:

Code:

HTTP error 403 Forbidden
Code:

http://l130.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8: Input/output error

biezom 12-03-2015 03:33 PM

Re: telewizjada.net


 
Quote:

Originally Posted by sargonax (Post 81398)
Your link not working :( ffmpeg answer:

Code:

HTTP error 403 Forbidden
Code:

http://l130.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8: Input/output error

hi

need find your own Cookies

Code:

livestreamer --http-header "Cookie=msec=DG//IMy2clz7Rv5gDJsiuyDFV9bcF910PaR9iqRT43UBTegxS20YvNvzrooUyXMDfZvL3UyF8JZjmdVtQcJeVpe1m7Klo9vAlj7fzTY=; sessid=vaskg4d891tgbho4n81t0ia9g3"  "hlsvariant://http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8" best -o Polsat-Sport-Extra.ts


Code:

[cli][info] Found matching plugin stream for URL hlsvariant://http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8
[cli][info] Available streams: 576p (worst, best)
[cli][info] Opening stream: 576p (hls)
[download][Polsat-Sport-Extra.ts] Written 5.0 MB (36s @ 139.4 KB/s)


sargonax 12-07-2015 02:40 PM

Re: telewizjada.net


 
hi, thenk for replay
I use livestream according to your link and not working, what am I doing wrong?

Code:

livestreamer --http-header "Cookie=msec=DG//IMy2clz7Rv5gDJsiuyDFV9bcF910PaR9iqRT43UBTegxS20YvNvzrooUyXMDfZvL3UyF8JZjmdVtQcJeVpe1m7Klo9vAlj7fzTY=; sessid=vaskg4d891tgbho4n81t0ia9g3"  "hlsvariant://http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8" best -o Polsat-Sport-Extra.ts
[cli][info] Found matching plugin stream for URL hlsvariant://http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8
error: Unable to open URL: http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8 (403 Client Error: Forbidden for url: http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8)


biezom 12-07-2015 02:48 PM

Re: telewizjada.net


 
Quote:

Originally Posted by sargonax (Post 81478)
hi, thenk for replay
I use livestream according to your link and not working, what am I doing wrong?

Code:

livestreamer --http-header "Cookie=msec=DG//IMy2clz7Rv5gDJsiuyDFV9bcF910PaR9iqRT43UBTegxS20YvNvzrooUyXMDfZvL3UyF8JZjmdVtQcJeVpe1m7Klo9vAlj7fzTY=; sessid=vaskg4d891tgbho4n81t0ia9g3"  "hlsvariant://http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8" best -o Polsat-Sport-Extra.ts
[cli][info] Found matching plugin stream for URL hlsvariant://http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8
error: Unable to open URL: http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8 (403 Client Error: Forbidden for url: http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8)



i wrote "need find your own Cookies"

so you can't use the same code

Code:

livestreamer --http-header "Cookie=msec=YOUR-OWN-MSEC-COOKIE; sessid=YOUR-OWN-SESSID-COOKIE"  "hlsvariant://http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8" best -o Polsat-Sport-Extra.ts

sargonax 12-07-2015 02:52 PM

Re: telewizjada.net


 
How to read cookies for this server have only the shell console?

biezom 12-07-2015 02:56 PM

Re: telewizjada.net


 
Quote:

Originally Posted by sargonax (Post 81480)
How to read cookies for this server have only the shell console?

shell console on which system?

sargonax 12-07-2015 02:58 PM

Re: telewizjada.net


 
Debian 7 whezzy

biezom 12-07-2015 03:15 PM

Re: telewizjada.net


 
Quote:

Originally Posted by sargonax (Post 81482)
Debian 7 whezzy

perfect open source ;)

you can use ngrep and sniff traffic with "playlist.m3u8" filter

maybe need install it before



in root terminal

if wlan0 is your device connected

Code:

ngrep playlist.m3u8 -d wlan0
>>>>

Code:

GET /tw/2014tvpolsatsportextra/playlist.m3u8 HTTP/1.1..Host: l131.telewizja
  da.net:1935..User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac
  OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A3
  41 Safari/528.16..Accept: text/html,application/xhtml+xml,application/xml;q
  =0.9,*/*;q=0.8..Accept-Language: en,en-US;q=0.5..Accept-Encoding: gzip, def
  late..DNT: 1..Referer: http://releases.flowplayer.org/6.0.3/commercial/flow
  playerhls.swf..Cookie: sessid=693lbj1ei2jj7d63l9n6v2hsu7; msec=TDe%2FJ8noJw
  GrReBtWZd7vCLECJSaTNQ%2BL6B9iqRT43UBTegxS20YvNvzrooUyXMDfZvL3UyF8JZjmdVtQcJ
  eVpe1m7KhvdXcjjTfzD472Rk%3D
; statid=qc9sr85m075etqqgla0jf5hmu5..Connection:
  keep-alive....


sargonax 12-07-2015 03:35 PM

Re: telewizjada.net


 
How to use the command to see it?
ngrep its ready on eth0


Code:

GET /tw/2014tvpolsatsportextra/playlist.m3u8 HTTP/1.1..Host: l131.telewizja
  da.net:1935..User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac
  OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A3
  41 Safari/528.16..Accept: text/html,application/xhtml+xml,application/xml;q
  =0.9,*/*;q=0.8..Accept-Language: en,en-US;q=0.5..Accept-Encoding: gzip, def
  late..DNT: 1..Referer: http://releases.flowplayer.org/6.0.3/commercial/flow
  playerhls.swf..Cookie: sessid=693lbj1ei2jj7d63l9n6v2hsu7; msec=TDe%2FJ8noJw
  GrReBtWZd7vCLECJSaTNQ%2BL6B9iqRT43UBTegxS20YvNvzrooUyXMDfZvL3UyF8JZjmdVtQcJ
  eVpe1m7KhvdXcjjTfzD472Rk%3D; statid=qc9sr85m075etqqgla0jf5hmu5..Connection:
  keep-alive....


biezom 12-07-2015 03:50 PM

Re: telewizjada.net


 
Quote:

Originally Posted by sargonax (Post 81485)
How to use the command to see it?
ngrep its ready on eth0


Code:

GET /tw/2014tvpolsatsportextra/playlist.m3u8 HTTP/1.1..Host: l131.telewizja
  da.net:1935..User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac
  OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A3
  41 Safari/528.16..Accept: text/html,application/xhtml+xml,application/xml;q
  =0.9,*/*;q=0.8..Accept-Language: en,en-US;q=0.5..Accept-Encoding: gzip, def
  late..DNT: 1..Referer: http://releases.flowplayer.org/6.0.3/commercial/flow
  playerhls.swf..Cookie: sessid=693lbj1ei2jj7d63l9n6v2hsu7; msec=TDe%2FJ8noJw
  GrReBtWZd7vCLECJSaTNQ%2BL6B9iqRT43UBTegxS20YvNvzrooUyXMDfZvL3UyF8JZjmdVtQcJ
  eVpe1m7KhvdXcjjTfzD472Rk%3D; statid=qc9sr85m075etqqgla0jf5hmu5..Connection:
  keep-alive....



see your inbox i sent you a message

midi23 12-07-2015 05:31 PM

Re: telewizjada.net


 
hi

that is my cookies

Code:

livestreamer --http-header "Cookie=msec=T3q8OJ7mLlWoA7oxBpB4vCaZFsGJHNUjPKV9iqRT43UBTegxS20YvNvzrooUyXMDfZvL3UyF8JZjmdVtQcJeVpe1m7KkvMPAiz7fyign0ho%3D; sessid=5t0s5d81jt06hc53hdpcebinf2" "hlsvariant://http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8" "best"
but doesn't work with me

Code:

[cli][info] Found matching plugin stream for URL hlsvariant://http://l133.telewi
zjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8
error: Unable to open URL: http://l133.telewizjada.net:1935/tw/2014tvpolsatsport
extra/playlist.m3u8 (403 Client Error: Forbidden)


CristianoA 01-11-2016 12:53 PM

Re: telewizjada.net


 
Quote:

Originally Posted by biezom (Post 81400)
hi

need find your own Cookies

Code:

livestreamer --http-header "Cookie=msec=DG//IMy2clz7Rv5gDJsiuyDFV9bcF910PaR9iqRT43UBTegxS20YvNvzrooUyXMDfZvL3UyF8JZjmdVtQcJeVpe1m7Klo9vAlj7fzTY=; sessid=vaskg4d891tgbho4n81t0ia9g3"  "hlsvariant://http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8" best -o Polsat-Sport-Extra.ts


Code:

[cli][info] Found matching plugin stream for URL hlsvariant://http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8
[cli][info] Available streams: 576p (worst, best)
[cli][info] Opening stream: 576p (hls)
[download][Polsat-Sport-Extra.ts] Written 5.0 MB (36s @ 139.4 KB/s)


how to found cookies using windows ?

CristianoA 01-26-2016 11:46 AM

Re: telewizjada.net


 
anyone can help ?

http://www.telewizjada.net/live.php?cid=68

mleczan 02-03-2016 10:31 AM

Re: telewizjada.net


 
If you want to get those coockies you can use this python script:
https://drive.google.com/file/d/0B0d...ew?usp=sharing

Pass cid as argument and will get what you need.
Also can be simply edited to generate whole record command returning url and coockies in a format which fit livestreamer or whatever you use to record.

slihter 02-11-2016 02:04 AM

Re: telewizjada.net


 
Hey, i want to use Python to create a automatic generate m3u playlist from the website. To get the real playlist it need "cookies"

But with that form cannot build a m3u playlist.
I protably i need a livestreamer python module and use it.

HTML Code:

cId: 1
Url: http://l149.telewizjada.net:1935/tw/2014tvtvp1/playlist.m3u8
msec: GXries73egCrAb00XYAh632WF8vbHNY8KKZ9iqRT43UBTegxS2kBoJm9qpUF320ea5eRwh7fuNwz0IAqAIZAFZz0ja2n
sessid: ctn1euldiv733sld3kqi7bjqr1

That's why i need to insert into livestreamer with parameters in Python.

On Windows i send:
HTML Code:

livestreamer --stream-url --http-header "Cookie=msec=DD7jKsG2I1yrG%2BkyWMUh6H%2BeA5CGDch0P6V9iqRT43UBTegxS20YvNvzrooUyXMDfZvL3UyF8JZjmdVtQcJeVpe1m7KhvdTcijbB1j4hzxXW; sessid=v0oaj458ilc566lg1ce2jst9e2"  "hlsvariant://http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8" best
And i get what i need:
HTML Code:

http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/chunklist_w792338458.m3u8
But on linux i get:
HTML Code:

error: Unable to open URL: http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8 (403 Client Error: Forbidden for url: http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/p
laylist.m3u8)


Full Script:

HTML Code:

#!/usr/bin/env python

import urllib, urllib2, httplib, sys, StringIO, cookielib, re, socket
from xml.etree import ElementTree
import json
import threading
import time
import os
import subprocess
from livestreamer import Livestreamer

HOST      = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) Gecko/20121213 Firefox/19.0'


class Something:
    def logCall(self, message):
        print self.__class__.__name__ + ' ' + message

    def getJsonFromExtendedAPI(self, url, post_data = None, save_cookie = False, load_cookie = False, cookieFile = None, jsonLoadsResult = False):
        result_json = None
        customOpeners = []
        cj = cookielib.LWPCookieJar()

        def urlOpen(req, customOpeners):
            if len(customOpeners) > 0:
                opener = urllib2.build_opener( *customOpeners )
                response = opener.open(req, timeout = 4)
            else:
                response = urllib2.urlopen(req, timeout = 4)
            return response

        try:
            if cookieFile is not None:
                customOpeners.append( urllib2.HTTPCookieProcessor(cj) )
                if load_cookie == True:
                    cj.load(cookieFile, ignore_discard = True)

            headers = { 'User-Agent' : HOST }
            data = urllib.urlencode(post_data)
            reqUrl = urllib2.Request(url, data, headers)

            failedCounter = 0
            while failedCounter < 50:
                try:
                    raw_json = urlOpen(reqUrl, customOpeners)
                    result_json = raw_json.read()
                    if jsonLoadsResult == True:
                        result_json = json.loads(result_json)
                    break
                except (httplib.IncompleteRead, socket.timeout) as ex:
                    failedCounter = failedCounter + 1
                    self.logCall('getJsonFromExtendedAPI exception: %s - retrying failedCounter = %s' % (str(ex), failedCounter))
                    if xbmc.abortRequested:
                        break
                    time.sleep(.050)

            if cookieFile is not None and save_cookie == True:
                cj.save(cookieFile, ignore_discard = True)

        except (urllib2.URLError, NameError, ValueError, httplib.BadStatusLine) as ex:
            self.logCall('ShowList getJsonFromExtendedAPI exception: %s - aborting!' % str(ex))
            return None

        return result_json
   
    def getCookieItem(self, cookiefile, item):
        ret = ''
        if os.path.isfile(cookiefile):
            cj = cookielib.LWPCookieJar()
            cj.load(cookiefile, ignore_discard = True)
            for cookie in cj:
                if cookie.name == item:
                    ret = cookie.value
        return ret
   
sth = Something()
coockie = 'coockie.coock'

try:
    id = sys.argv[1]
except:
    id = raw_input()
if id == None or id == '':
    print "Forgot about cId?"
    quit()
print "cId: " + id

#id = 1
data = { 'cid': id}
output = sth.getJsonFromExtendedAPI('http://www.telewizjada.net/get_mainchannel.php', post_data = data, jsonLoadsResult = True)
data = { 'url': output['url'] }
sth.getJsonFromExtendedAPI('http://www.telewizjada.net/set_cookie.php', post_data = data, cookieFile = coockie, save_cookie = True)
data = { 'cid': id }
tmp_url = sth.getJsonFromExtendedAPI('http://www.telewizjada.net/get_channel_url.php', post_data = data, cookieFile = coockie, load_cookie = True, jsonLoadsResult = True)
tmp_url = tmp_url['url']


msec = sth.getCookieItem(coockie, 'msec')
sessid = sth.getCookieItem(coockie, 'sessid')
urlstream = tmp_url.split("?")[0]

subprocess.call(["livestreamer", "hls://hlsvariant://" + urlstream,"--stream-url --http-header Cookie=msec=" + msec + "; sessid=" + sessid])

print "Url: " + urlstream
print "msec: " + msec
print "sessid: " + sessid


biezom 02-11-2016 03:07 AM

Re: telewizjada.net


 
Quote:

Originally Posted by slihter (Post 82592)
Hey, i want to use Python to create a automatic generate m3u playlist from the website. To get the real playlist it need "cookies"

But with that form cannot build a m3u playlist.
I protably i need a livestreamer python module and use it.

HTML Code:

cId: 1
Url: http://l149.telewizjada.net:1935/tw/2014tvtvp1/playlist.m3u8
msec: GXries73egCrAb00XYAh632WF8vbHNY8KKZ9iqRT43UBTegxS2kBoJm9qpUF320ea5eRwh7fuNwz0IAqAIZAFZz0ja2n
sessid: ctn1euldiv733sld3kqi7bjqr1

That's why i need to insert into livestreamer with parameters in Python.

On Windows i send:
HTML Code:

livestreamer --stream-url --http-header "Cookie=msec=DD7jKsG2I1yrG%2BkyWMUh6H%2BeA5CGDch0P6V9iqRT43UBTegxS20YvNvzrooUyXMDfZvL3UyF8JZjmdVtQcJeVpe1m7KhvdTcijbB1j4hzxXW; sessid=v0oaj458ilc566lg1ce2jst9e2"  "hlsvariant://http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8" best
And i get what i need:
HTML Code:

http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/chunklist_w792338458.m3u8
But on linux i get:
HTML Code:

error: Unable to open URL: http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/playlist.m3u8 (403 Client Error: Forbidden for url: http://l133.telewizjada.net:1935/tw/2014tvpolsatsportextra/p
laylist.m3u8)


Full Script:

HTML Code:

#!/usr/bin/env python

import urllib, urllib2, httplib, sys, StringIO, cookielib, re, socket
from xml.etree import ElementTree
import json
import threading
import time
import os
import subprocess
from livestreamer import Livestreamer

HOST      = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) Gecko/20121213 Firefox/19.0'


class Something:
    def logCall(self, message):
        print self.__class__.__name__ + ' ' + message

    def getJsonFromExtendedAPI(self, url, post_data = None, save_cookie = False, load_cookie = False, cookieFile = None, jsonLoadsResult = False):
        result_json = None
        customOpeners = []
        cj = cookielib.LWPCookieJar()

        def urlOpen(req, customOpeners):
            if len(customOpeners) > 0:
                opener = urllib2.build_opener( *customOpeners )
                response = opener.open(req, timeout = 4)
            else:
                response = urllib2.urlopen(req, timeout = 4)
            return response

        try:
            if cookieFile is not None:
                customOpeners.append( urllib2.HTTPCookieProcessor(cj) )
                if load_cookie == True:
                    cj.load(cookieFile, ignore_discard = True)

            headers = { 'User-Agent' : HOST }
            data = urllib.urlencode(post_data)
            reqUrl = urllib2.Request(url, data, headers)

            failedCounter = 0
            while failedCounter < 50:
                try:
                    raw_json = urlOpen(reqUrl, customOpeners)
                    result_json = raw_json.read()
                    if jsonLoadsResult == True:
                        result_json = json.loads(result_json)
                    break
                except (httplib.IncompleteRead, socket.timeout) as ex:
                    failedCounter = failedCounter + 1
                    self.logCall('getJsonFromExtendedAPI exception: %s - retrying failedCounter = %s' % (str(ex), failedCounter))
                    if xbmc.abortRequested:
                        break
                    time.sleep(.050)

            if cookieFile is not None and save_cookie == True:
                cj.save(cookieFile, ignore_discard = True)

        except (urllib2.URLError, NameError, ValueError, httplib.BadStatusLine) as ex:
            self.logCall('ShowList getJsonFromExtendedAPI exception: %s - aborting!' % str(ex))
            return None

        return result_json
   
    def getCookieItem(self, cookiefile, item):
        ret = ''
        if os.path.isfile(cookiefile):
            cj = cookielib.LWPCookieJar()
            cj.load(cookiefile, ignore_discard = True)
            for cookie in cj:
                if cookie.name == item:
                    ret = cookie.value
        return ret
   
sth = Something()
coockie = 'coockie.coock'

try:
    id = sys.argv[1]
except:
    id = raw_input()
if id == None or id == '':
    print "Forgot about cId?"
    quit()
print "cId: " + id

#id = 1
data = { 'cid': id}
output = sth.getJsonFromExtendedAPI('http://www.telewizjada.net/get_mainchannel.php', post_data = data, jsonLoadsResult = True)
data = { 'url': output['url'] }
sth.getJsonFromExtendedAPI('http://www.telewizjada.net/set_cookie.php', post_data = data, cookieFile = coockie, save_cookie = True)
data = { 'cid': id }
tmp_url = sth.getJsonFromExtendedAPI('http://www.telewizjada.net/get_channel_url.php', post_data = data, cookieFile = coockie, load_cookie = True, jsonLoadsResult = True)
tmp_url = tmp_url['url']


msec = sth.getCookieItem(coockie, 'msec')
sessid = sth.getCookieItem(coockie, 'sessid')
urlstream = tmp_url.split("?")[0]

subprocess.call(["livestreamer", "hls://hlsvariant://" + urlstream,"--stream-url --http-header Cookie=msec=" + msec + "; sessid=" + sessid])

print "Url: " + urlstream
print "msec: " + msec
print "sessid: " + sessid



hi
try with this two lines instead of your subprocess.call line

Code:

command = 'livestreamer --http-header "Cookie=msec=' + msec + '; sessid=' + sessid + '" "hlsvariant://' + urlstream + '" best'



os.system(command)



All times are GMT -6. The time now is 02:56 PM.