[UK] Sky Guide Grabber - Need help (1 Viewer)

yousufza

New Member
January 9, 2012
3
0
Hi All,
I am new to this forum. I have been trying to get EPG data for some channels that are streamed live from the UK (I am in Canada). The data is only found on Sky Guide. So I have been trying to write a grabber for it but I am running into some problems. Again I am kind of new to this and would greatly appreciate any guidance.

Here is a link to the actual Sky Guide: Sky Guide TV Listings - Sky
Now you can't see the any epg data by looking at the page source this page. However, I happened to find it using another method.
Using URL Snooper, I found the url for individual channel data. For example here is the url for Discovery HD (520) for January 22, 2011 (My channels of interest is not Discovery HD, I am just using it as an example)

12am-6am http://tv.sky.com/programme/channel/4003/2012-01-22/0
6am-12pm http://tv.sky.com/programme/channel/4003/2012-01-22/1
12pm-6pm http://tv.sky.com/programme/channel/4003/2012-01-22/2
6pm-12am http://tv.sky.com/programme/channel/4003/2012-01-22/3

Here 4003 is the site id for Discovery HD and the 0-3 at the end are pages over which the data is spread out

The data for 12am-6am looks like this:
{"listings":{"4003":[{"d":"Kimberleys: Bear Grylls demonstrates how to survive the harsh Australian outback by showing where to find food, and avoid sunstroke and saltwater crocodiles.","m":[501,3600,3,0,"--"],"rr":"S","s":1327190400,"sid":41500,"t":"Bear Grylls: Born Survivor","url":"http://sky.tv/ps7q4s"},{"d":"President's Challenge: In this extra special episode, Adam and Jamie tackle a viewer request from the highest ranking viewer of all, the US President, Barack Obama.","m":[502,3600,3,1,"--"],"rr":"S","s":1327194000,"sid":58968,"t":"Mythbusters","url":"http://sky.tv/btj65x"},{"d":"Walking on Water: In this martial arts special, Jamie and Adam find out if Ninjas can run on water, as they join a Ninjitsu master and try their luck at aquatic agility.","m":[504,3600,3,1,"--"],"rr":"S","s":1327197600,"sid":58968,"t":"Mythbusters","url":"http://sky.tv/btjzxn"},{"d":"Adam and Jamie face off with a myth of misdirection and Kari, Grant and Tory go ballistic with two filmic firearms fables.","m":[507,3000,3,1,"--"],"rr":"S","s":1327201200,"sid":58968,"t":"Mythbusters","url":"http://sky.tv/btj663"},{"d":"Adam and Jamie test if they can walk on water, and Kari, Grant, and Tory test if common things can be bombproof.","m":[510,3000,3,1,"--"],"rr":"S","s":1327204200,"sid":58968,"t":"Mythbusters","url":"http://sky.tv/btjzys"},{"d":"Hindenburg Mystery: Adam and Jamie turn detective to solve one of aviation's biggest puzzles, while Kari and company come face-to-face with nature's natural-born killers.","m":[515,3000,3,0,"--"],"rr":"S","s":1327207200,"sid":58968,"t":"Mythbusters","url":"http://sky.tv/btj677"},{"d":"A military jet breaks apart and crashes, a man survives being run over by a tractor trailer, and the safety capsule flies open during a dragboat crash.","m":[518,1800,3,0,"--"],"rr":"S","s":1327210200,"sid":46290,"t":"Destroyed in Seconds","url":"http://sky.tv/btjzzx"},{"d":"Part 1: Explore Mexico's thriving cities and stunning beaches in this look at ancient and modern Mexican culture, from religious festivals to Independence Day celebrations.","m":[523,3600,3,1,"--"],"rr":"S","s":1327212000,"sid":37223,"t":"Discovery Atlas: Mexico Revealed","url":"http://sky.tv/btjz23"}]}}

It looks the format for the epg data is as follows
{"d":"Kimberleys: Bear Grylls demonstrates how to survive the harsh Australian outback by showing where to find food, and avoid sunstroke and saltwater crocodiles.","m":[501,3600,3,0,"--"],"rr":"S","s":1327190400,"sid":41500,"t":"Bear Grylls: Born Survivor","url":"http://sky.tv/ps7q4s"},

{"d":"#DESCRIPTION","m":[501,3600,3,0,"--"],"rr":"S","s":#START,"sid":41500,"t":"#TITLE","url":"http://sky.tv/ps7q4s"},

Questions:
1. The data for an each day is spread out over 4 webpages (each providing data for 6 hours). How can I indicate this in the grabber file to ensure that it checks all 4 of them for each day.

2. I believe the start time is provided in a unix timestamp. For example "1327190400" from the above indicates a start time of Sunday 22nd January 2012 12:00:00 AM. How do I indicate this in grabber file to so that it converts it to the regular XMLTV start time when it grabs.

Below is the grabber file I put together using some of the examples and the wiki. I have attached it as well:

<?xml version="1.0" encoding="utf-8"?>
<Grabber>
<Info availableDays="0" timezone="GMT Standard Time" version="2.1.0" />
<Channels>
<Channel id="Discovery HD" siteId="" />
</Channels>
<Listing type="Data">
<Site url="http://tv.sky.com/programme/channel/4003/[YYYY]-[MM]-[DD]/[LIST_OFFSET]" post="" external="false" encoding="" />
<Data rowDelimitor="
" dataDelimitor="~">{"d":"#DESCRIPTION.","m":[499,1800,1,0,"--"],"rr":"R","s":#START,"t":"#TITLE","url":"http://sky.tv/mvwwc7"}
</Data>
</Listing>
</Grabber>

Again I am totally new so my grabber file might be way off. I would really appreciate anyone's help.

:D
 

porky996t

MP Donator
  • Premium Supporter
  • May 21, 2008
    1,016
    81
    Bolton, Lancashire, England
    Home Country
    England England
    Hi yousufza,

    I think you may be replicating work that has already been done - although yours is a web based grabber and these noted are transmission based grabbers.

    I successfully use a Sky UK EPG grabber with series link etc developed by Miroslav, which you will find on this thread - >>HERE<<

    There is also another, more detailed Sky UK grabber that sort channels into Sky groupings etc and this can be found on this thread >>HERE<<

    Both these grabbers are constantly being developed. I use the one by Miroslav as I don't need the bells and whistles the "Custom Data Grabber" provides. Please note that the Miroslav one will overwrite your original MP Client and TV Server files (it will make backups of the originals) and I have found it best to have all plugins you need installed first or you will get a compatibility dialog box popping up if you try to install some plugins afterwards.

    Both these grabbers are a 'try at your own risk' type of thing - hence both threads are in the General Development area of the forum. Whilst they will not mess up MP, a good working knowledge of installing and tinkering with MP is useful.


    HTH,



    M.
     

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,780
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    porky,

    If I was a guessing man....Yousufza is not getting the actual satellitte signal... I am speculating someone/thing in the UK is streaming the content over the internet, hence no EPG data.

    Please correct me if I'm wrong... (I normally am!) ;)

    J.
     

    yousufza

    New Member
    January 9, 2012
    3
    0
    Hi porky and jay,

    Thank you for your reply!

    You are absolutely right porky and jay. I am not getting the actual satellite signals as I am in Canada. It is a free to air religious channel called Peace TV Urdu that is broadcast in the UK as well as streamed online by the station. The channel provider also provides schedule data and I have been able to grab using WebEPG. But the provided schedule is only for primetime (UK time) which means early afternoon in Canada due to the timezone difference. I found that Sky Guide has the data for the entire day. I couldn't find it on any of the other WebEPG built-in UK providers like RadioTimes, MyDigiGuide, or Bleb. I mean I can check the schedule by going to the Sky Guide webpage but it would be so much cooler to use the power of MP to just have the EPG right there in the program rather than having to check the webpage everytime :D

    So what do you guys think of the grabber file. What am I doing wrong?

    :D
     

    porky996t

    MP Donator
  • Premium Supporter
  • May 21, 2008
    1,016
    81
    Bolton, Lancashire, England
    Home Country
    England England
    Hi yousufza,

    I think a Sky UK, webased grabber would be a great idea. Well done for getting cracking with it.

    As regards the grabber file and what you may be doing wrong I cannot say - well beyond my knowledge I'm afraid; I struggle walking and chewing gum at the same time. Maybe Jay could help, he is far smarter than I am.

    There are some good (coding etc) UK based people on here - you may want to see if they have the time to spare to help out.



    M
     

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,780
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Hi there,

    If you have a subscription to digiguide, I thought you could request "missing" channels to be added??

    Porky - Thanks for the compliment - I would love to give time to develop MePo, but like most, personal life comes first (partner is not well).

    I think you might struggle with the native grabber due to the complex way that Sky offer their EPG (assuming you want to grab all channels - and not your specific one)

    J.
     

    yousufza

    New Member
    January 9, 2012
    3
    0
    Thanks for your feedback guys. I will keep tinkering around with the grabber file and hopefully some of the coders will come across this thread and can help me out.

    Cheers :D
     

    Users who are viewing this thread

    Top Bottom