Norwegian tv guide project...
#1
first of all! thanx to enderw for making this little tvguide! all fame to him! i've made a few changes in his script so it now reads one more channel (ztv)... the problem now is how to get it to read more! i need to put clientcookie inside the script so it will read all the channels instead of only six. can someone take a look and try to add cookie support? feel free to modify the code also because it's very buggy and takes alot of resources on the xbox!

thanx
Reply
#2
i forgot to post the script Blush

here u go: http://djmalo.starthotel.dk/tvguide_nor2.py

ps: i'm not posting the background pics and icons... so don't get upset about it!
Reply
#3
(dj_malo @ feb. 28 2005,19:56 Wrote:i forgot to post the script Blush

here u go: http://djmalo.starthotel.dk/tvguide_nor2.py

ps: i'm not posting the background pics and icons... so don't get upset about it!
i told you not to use this version, it is full of bugs Smile

i have fixed the reason of it being slow, there are some horrible coding in this one. you should be able to fix it easily by comparing the two. the most important difference lies in oncontrol, there are some really nasty coding there (i dunno what i were thinking when making it, really.. Wink )

thanks a lot for the work on it so far though!

-edit-

here is an image for ztv. put it along with the other images for use with this edited script.

http://ngc-scene.port5.com/ztv.png
xbmcscripts.com administrator
Reply
#4
ok... i'll change the code... thanx for the .png!
Reply
#5
ok... now i've zipped it all into a package. all i'm asking now is that someone implents cookie support to it! happy coding!

http://home.no/kebabja/tvguide_nor_v2_b1.zip
Reply
#6
i've now changed the script alittle. i've added abit of code and also changed some paths so it's much easier to install... still working on the cookies! enjoy

http://home.no/kebabja/tvguide_nor_v2_b2.zip
Reply
#7
thanx for a nice script,but is it possible to add more channels to it??i would like to see the guide for tv3se,tv3dk,ztv sverige,3+,svt1,svt2,dk1 and dk2
Reply
#8
i have png images for all the channels,exept some spesial ones for tv3dk and tv3se
Reply
#9
there is a tv.nu script which has more channels (the ones at tv.nu). you could check that out if you haven't already.

dj_malo is in process (?) of adding cookie support, but i dunno how well it is going :p

personally i don't have time. my intention was never to make a large script, and now the basics is already put in place so i feel that others can do the rest. i am working on updating two other scripts now so..

here are the channels which this script can possibly support:
http://fredag.dagbladet.no/tv/select_channels.html

dj_malo: just a tip if you haven't figured out already. you need to do an url encode on the send function on that page and pass on the channels to dagbladet (have a look at the login function in my nrkbrowser). then dagbladet sets an cookie and it will display the selected channels. good luck in making parsing functions that work for all the channels though...the script isn't really built for use with many different channels in mind, but i am sure you can find a regex which works on them all without way too much hassle.
xbmcscripts.com administrator
Reply
#10
hmm! this isn't going very well! what i did instead of trying to figure out the cookie thing was to write an email to the people behind dagbladet's tvguide. unfortinatly i got no response from them... but i'm still waiting! it's only bin 3 days or so since i sent the email so i'll wait! i've given up the cookie support... i don't understand anything about the cookie... i've looked into nrkbrowser.py but i don't understand the full pattern of how cookies work... so enderw if u got some spare time some day please get me started or something!

cheers
Reply
#11
well, the whole point with clientcookie is that you don't have to understand anything about cookies. it handles cookies automatically, like any web browser. when you send the data about what channels you want listed, the server returns a cookie which is stored automatically by clientcookie if you use it to open the url. when you then load the overview page, their server will query for a cookie which is then returned by clientcookie. the server then creates the page out from the data it got from the cookie.

what i meant that you should look at in the nrkbrowser script is how the data is sent to the server when selecting the channels. there is a way for encoding web forms automatically, as long as you provide it with the parameters. the cookies you don't have to worry about as long as you use clientcookie instead of urllib. i'm sorry if i wasn't clear about this before, but i thought it was pretty clear...
xbmcscripts.com administrator
Reply
#12
yes, i've looked into the cookie stuff and seen how the lines in form sends the values to the url. what i don't understand is how to make my own form+ that i don't know what code i need to use because the nrk script uses some stuff that i don't need. there are also some differeses in how the url is fetched to the xbox. the tvguide script uses raw = (get_data(self.programurl)) but nrk script doesn't. should i change the raw = (get_data(self.programurl)) to something with clientcookie.urlopen?

cheers
Reply
#13
ok, since i am stuck at the nrkbrowser update (code works on pc, but not on xbox so i got no idea how to fix it), i decided to add this cookie support.

http://enderw.emutalk.net/tvguide_cookied.rar

it is modified so that it can be run on pc. that means that the gui is removed etc, but you should be able to copy over the stuff you need. what is really a challenge for you now is to make a parse functions which works for all the channels and a way to list the correct buttons etc. i would suggest moving away from buttons and rather do a switch of channel when pressing left or right ala tv.nu browser. also you need to make a list of all the channels with the matching codes, but you could just make a script to do this automatically rather easy.

good luck Smile
xbmcscripts.com administrator
Reply
#14
really nice! i'll take a look! 10xthanx!
:bowdown:
Reply

Logout Mark Read Team Forum Stats Members Help
Norwegian tv guide project...0