Playing a stream 'protected' by login/password
#1
Sad 
hi all !

i would like to get a stream from a commercial website. the stream looks like : mms://xxxxxxx.wma

the thing is : to access this url, one must authentificate on the website (with a post méthod, and a cookie stored in the browser). No

is there a way to do that in python for xbmc ?

i guess i can find a way to authentificate with the post méthod, then store the cookie in a file, and finally send this cookie to xbmc player (mplayer). Huh for example, in the linux version of mplayer, i found this in the man pages :
Quote:# man mplayer
[...]
-cookies-file <filename> (network only)
read http cookies from <filename> (default: ~/.mozilla/ and ~/.netscape/) and skip reading from default locations. the file is assumed to be in netscape format.
[...]

so here is the subsidiary question :lol: : with linux, to ask mplayer to search a file for cookies, i can run this command line :
Quote:# mplayer -cookie-file mycookie.txt mms://xxxxxx.wmv
how can i do that in xbmc ?
... found no argument in the xbmc.player command...
Reply
#2
hello everyones !
i would like to give some more infos about what he wants to do (and what i want to do as well)

we get a stream mms://.....wmv link on a website. but this website requires cookies for playing the streamfile....

if i catch this url using my python script and simply past it inside windowsmediaplayer on my pc, it says it can't play

if i go on the website where the video stream is embedded, and get the link and play it in my wmp, it plays good !

so we would like to know how to get this cookie, maybe storing it somewhere and say to xbmc player to use this cookie to enable the playing...

hope it make sense to you guys and that you can help us

see ya
Reply
#3
i think cachedhttp.py can do this.
it has cookie support and you can pass a postdata to urlretrieve.
you just have to rember to call savecookies on exit to preserve your cookies between script runs.

bernd
Reply
#4
bernd, thanks for the cachedhttp tip ! :bowdown:
i found a v1.3 version of cachedhttp, and downloaded it.
is this the most recent version ?

i am going to test this tonight.

i think this will deal with the login/password, and cookie "thing", but, the question remains : how do i ask mplayer in xbmc to read the stream using the cookie i just got with cachedhttp ?



Reply

Logout Mark Read Team Forum Stats Members Help
Playing a stream 'protected' by login/password0