SKY Italia has recently changed their online programming guide, and there are no available scripts to download data for xmltv or media center. MegaEPG seems to be the perfect utility for getting this data.
I'm not familiar with programming, but have had a look at the HTML source, and challenge anyone capable of making a script for SKY Italia!
SKY Italia EPG
--------------
Here is a challenge, creating a script to parse the new online EPG of Sky Italia.
This is the breakdown of the HTML after javascript has loaded the current day's listings for one bouquet of channels (Entertainment category):
Entertainment channels ("Intrattenimento"), category "3":
URL:
http://guidatv.sky.it/guida_tv/selecttimeline.do?category=3
The listings are loaded by the page via javascript.
List of channels starts at "<DIV class=lineatitles>", and are listed like this:
<DIV class=canale channelId="513">
<IMG title="SKY Vivo" alt="SKY Vivo" src="http://guidatv.sky.it/static/epg/timeline/channel_icon/513.gif"></DIV>
These are the channels in the Entertainment bouquet:
513 SKY Vivo
474 Fox
133 Fox Life
139 Fox Crime
950 FX
111 E! Entertaiment
318 Comedy Central
120 SKY Show
304 Discovery RT
457 Raisat Extra
458 Raisat Premium
974 ALL Music
636 Fantasy
443 AXN
473 Hallmark Channel
517 BBC Prime
530 Jimmy
137 Cult
635 Fox +1
529 FoxLife +1
588 Fox Crime +1
899 Rai Uno
898 Rai Due
897 Rai Tre
892 Rete 4
893 Canale 5
894 Italia 1
733 La7
The listings are downloaded for one day (24 hrs) at a time, starting from 00:00 to 24:00 of the current date.
Programme listings for each channel start at "<DIV class=linea channelId="513">"
(this is the <DIV> tag for channel 513 Sky Vivo, giving in succession the programmes for this channel from 0:00 to 24:00)
The start and length of each programme is not given with a time, but is programmed into the HTML as pixels (to indicate the distance on a time scale), for instance, if the width of the <div> tag is 120 it indicates 30 minutes running time. Every 10 minutes equals 40px. The starting time of each programme has to be calculated based on the accumulated running time of the previous programmes, starting from 00:00 hrs)
Each programme listing is contained within these tags:
<DIV class=XX style="WIDTH: XXXpx">
</DIV>
The width variable indicates the length of the programme, eg. 120px means 30 minutes, or 240px means 60 minutes.
The tag can be empty, with no programme information, for instance:
<DIV class=p2 style="WIDTH: 120px">
</DIV>
Or the tag can contain spacer and the programme title (in this case the title is "Le ragazze di...", for instance:
<DIV class=p2 style="WIDTH: 120px">
<DIV>
<DIV class=b>
</DIV>
</DIV>
<A class=jTip id=12018583 href="javascript:void(0)" path="c3/d1">
Le ragazze di P...
</A>
</DIV>
Detailed programme information is downloaded by the jTip javascript, which I haven't been able to locate.
Channel numbers
Btw, the channel numbers in the HTML do not match the channel numbers on the set-top box, so they would have to be matched. I'll do that as soon as someone is willing to make the parsing script.
Full overview of bouquets
The single bouquets offered by SKY Italia are as follows:
Cinema (films): http://guidatv.sky.it/guida_tv/selecttimeline.do?category=1
Mondi e culture (nature and culture): http://guidatv.sky.it/guida_tv/selecttimeline.do?category=2
Intrattenimento (entertainment): http://guidatv.sky.it/guida_tv/selecttimeline.do?category=3
Ragazzi e musica (kids and music): http://guidatv.sky.it/guida_tv/selecttimeline.do?category=4
News: http://guidatv.sky.it/guida_tv/selecttimeline.do?category=5
Sport: http://guidatv.sky.it/guida_tv/selecttimeline.do?category=6
Prima fila (premium films): http://guidatv.sky.it/guida_tv/selecttimeline.do?category=8
SKY HD (high definition programming): http://guidatv.sky.it/guida_tv/selecttimeline.do?category=9
Load more than one day
It is possible to load more than the current date by executing the following javascript from the IE address bar after the page has loaded (http://guidatv.sky.it/guida_tv/selecttimeline.do?category=3):
javascript:initTimeline(n)
where n is the number of days from today (today=1, up to 7).
I am not sure whether this can be incorporated in a grabber script.
Great! A perfect
Great! A perfect information to write a script, thanks!
Big demand for Sky Italia script
If you are willing to write a script, just let me know if you need any other information. I know a lot of italians would love to use MegaEPG if a Sky Italia script is included! Thanks.
Yes I'll write the script.
Yes I'll write the script.
Detailed show information
Detailed information about each show is available through the following URL:
http://guidatv.sky.it/guida_tv/evdetail.do?id=12018583
The 8-digit show-id is found in the same EPG tag as the name of the show:
<A class=jTip id=12018583 href="javascript:void(0)" path="c3/d1">
Le ragazze di P...
</A>
It would probably be too cumbersome and time-consuming to load this information into MegaEPG, but if it is possible to add a link from within Media Center, this is how to do it!
Brief show description downloaded by jQuery tool
The show id mentioned in my previous comment is also linked to a jTip script which pulls up a brief description of each show by clicking on its title.
The script is based on jTip created by Cody Lindley (http://codylindley.com/Javascript/264/jtip-a-jquery-tool-tip), and he describes the tool like this: "jTip, a jQuery tool tip solution, pulls data from the server using a hidden http request".
I don't know how this information can be pulled out to be used in MegaEPG, but for those who know more about javascript and coding than I do, the jQuery script on the Sky Italia website is contained in:
http://guidatv.sky.it/static/epg/timeline/js/jquery-latest.js
XML data available
Igor, thanks for making a script. Using an HTTP sniffer I have also found the XML data supplied to the Sky Italia online EPG, which is pulled up using hidden http requests. I'm not sure whether this data is protected in any way:
Detailed show information, using the variables contained in the show listings tag (eg. id=12181569 href="javascript:void(0)" path="c9/d1"):
http://guidatv.sky.it/static/epg/timeline/data/c9/d1/12181569.xml
The full program listing, as described in my first comment, but in raw XML format:
http://guidatv.sky.it/static/epg/timeline/data/intrattenimento_1.xml
http://guidatv.sky.it/static/epg/timeline/data/sport_6.xml
http://guidatv.sky.it/static/epg/timeline/data/cinema_6.xml
http://guidatv.sky.it/static/epg/timeline/data/mondo_1.xml
http://guidatv.sky.it/static/epg/timeline/data/news_1.xml
http://guidatv.sky.it/static/epg/timeline/data/ragazzi_6.xml
http://guidatv.sky.it/static/epg/timeline/data/primafila_6.xml
http://guidatv.sky.it/static/epg/timeline/data/hd_7.xml
XML data
Program listing:
http://guidatv.sky.it/static/epg/timeline/data/intrattenimento_1.xml
http://guidatv.sky.it/static/epg/timeline/data/intrattenimento_2.xml
etc.
"intrattenimento" is category 3, the number 1 denotes today, change to 2 for tomorrow and so on up to 7. for each category:
Category 1 = cinema
Category 2= mondo
Category 3= intrattenimento
Category 4= ragazzi
Category 5 = news
Category 6 = sport
Category 7 = [does not exist]
Category 8 = primafila
Category 9 = hd
Show detail:
http://guidatv.sky.it/static/epg/timeline/data/c9/d1/12181569.xml
c9 = category
d1 = day (1=today)
12181569=show id
Result extracted from XML:
Channel name: SKY Sport HD1
Show time: Sabato 16 ore 10.15
Show type: Sport Basket
Show title: Basket: L. F. Bologna - Air AV
Description: "Incontro di Coppa Italia, finale - Nel 2007 Benetton Treviso ha vinto la finale contro VidiVici Bologna per 67-65. Spencer Nelson e' stato il miglior giocatore."
Link to detail: evdetail.do?id=12181569"