Customize WebEPG for India HELP! (1 Viewer)

Dadeo

Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    HELP! I am trying to Customize the WebEPG for India. There is no central source of EPG data in India, so I have to go to the individual channel sites for the data. I have already done some channels in TVXB, so I know it works, but I cannot get WebEPG to work.

    Here is what I have done (after consulting the Wiki and every post I could find!)

    First I set up the WebEPG and XMLTV. My guide works properly using TVXB to output the data to TVguide.xml in the XMLTV folder in MP.

    Then I downloaded the WebDesigner tool. I entered one URL for AXN in India (http://www.axn-india.com/schedule/?[day=yyyy/mm/dd]/index.html) I entered the start and end text under Html Source. It found the data correctly. I then copied one entry from the Source box to the text box, specified T under tags and it parsed correctly as far as I can tell.

    Next I created a new folder under the WEBEPG\Grabbers for India (IN) and I created a grabber xml file called www_axn-india_com.xml (attached). I followed the instructions in the Wiki for creating a grabber file and copied the XML text from the WebDesigner Text box into the <TemplateText> section of the grabber file.

    Then I ran the WebEPG-conf.exe. My channels are listed correctly (I imported them previously for use with TVXB). But I cannot select a channel or grabber file.

    I realize I need to create a new channel ID in the channels.xml file in WebEPG\Channels, but I cannot find anywhere that tells me how to do that! I tried entering a section for India listing my AXN channel. But it still does not appear in the WebEPG configuration.

    Can anyone tell me where I can find instructions on adding a new channel id?

    If anyone is willing to check out the URL and my grabber file, I would really appreciate it. If I can get this to work, I will try and create a full listing for India in WebEPG. I will also try and improve the WIKI. It is very clear and thorough, but it assumes you know a lot. It needs more step by step instructions and examples.

    Thanks for any help you can give me!
     

    vuego

    Documentation Group
  • Team MediaPortal
  • August 5, 2006
    1,645
    776
    Göteborg
    Home Country
    Sweden Sweden
    WebEPG-conf will not show invalid xml files. If you open the xml file in Internet Explorer you can see the error.

    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


    --------------------------------------------------------------------------------

    The character '<' cannot be used in an attribute value. Error processing resource 'file:///www_axn-india_com.xml

    <Template name="default" start="<!-- CENTER COL -->" end="<!-- END CENTER COL -->">
    ---------------...

    The problem is that XML and HTML characters can't be used inside the quotes of the Start and End tag. You need to use the character entitle, just like you did in the TemplateText tag.
    http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references#Character_entities_in_HTML

    You should change your line to
    Code:
    <Template name="default" start="&lt;!-- CENTER COL --&gt;" end="&lt;!-- END CENTER COL --&gt;">


    And at row 20, & is not allowed (originally from the URL). Change to &amp;
    Code:
    &lt;td width="64"&gt;&lt;a href="/shows/0138,22,41,38800.html"&gt;&lt;img src="/shows/getpicture.php?id=41388&amp;type=1&amp;s=1" width="64" height="47" border="0"&gt;&lt;/a&gt;&lt;/td&gt;


    I agree that the wiki could be more user friendly. Your help will be appreciated :)
     

    James

    Retired Team Member
  • Premium Supporter
  • May 6, 2005
    1,385
    67
    Switzerland
    Hi Dadeo,

    It would be really great if you could add some extra information to the wiki. Maybe you could use your site as an exmaple and show step by step with screen shots. I think this would be very helpful to others.

    From the wiki ;)
    A basic test to see if the xml file has no error, is to load the file into a web browser. This will check to see if the xml is correct.

    Once it passes the basic XML test, run WebEPG and see if any errors are reported.

    This is a mistake that everyone makes.
     

    Dadeo

    Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    Vuego - Thanks for the help. I corrected my xml file and now I can configure WebEPG using WebEPG-conf.exe.

    My next problem is the template! When I run WebEPG I am not getting any program data in the Tvgude.xml file. Just the channel info appears. When I check the WebEPG log, it says it finds Listings but no Programs. I have tried two channels now, and get the same problem with both. So I must not be defining the template correctly!

    Can you take a look? I have tried an easier site, for Star World. The url is http://www.startv.com/schedules/IN/80d2cfa53741be232ced72165733a46d/?[day=yyyy/mm/dd]

    I have attached my xml file for this site. I hope you can tell me what I am doing wrong. Obviously I don't know xml!

    James: I have never posted to a wiki but I would be happy to try, once I have actually figured out the program! I do think the Web Designer should not have allowed the error in the start and end text or given me a message.

    Also, I thought I could just copy the XML text from the designer to the template section of the grabber file. But that didn't work! So now I have to learn XML! What would be great is if the WebDesigner could actually create the grabber file!

    I also wonder why you do not have the WebEPG as a plugin (only the scheduler is there). Only because it would be easier to access all the files in one place (i.e the WebEPG setup, Designer, Log files, etc.). At the moment I have about 10 windows open just to keep track of everything I need to do this!
     

    James

    Retired Team Member
  • Premium Supporter
  • May 6, 2005
    1,385
    67
    Switzerland
    You were not far off:

    1. The URL format you have is for tvxb.
    Code:
    http://www.startv.com/schedules/IN/80d2cfa53741be232ced72165733a46d/?[day=yyyy/mm/dd]
    it should look like this:
    Code:
    http://www.startv.com/schedules/IN/80d2cfa53741be232ced72165733a46d/[color=red][YYYY]/[MM]/[DD][/color]

    2. The template. Yours:
    Code:
    <tr>
    <td>
    <b>#START</b>
    </td>
    <td>
    <b>#TITLE</b>
    </td>

    The #START and #TITLE need to be enclosed with <, >.
    Code:
    <tr>
    <td>
    <b>[color=red]<[/color]#START[color=red]>[/color]</b>
    </td>
    <td>
    <b>[color=red]<[/color]#TITLE[color=red]>[/color]</b>
    </td>

    Then it should work :)

    I also adjusted the start and end points to these:

    START: schdlFeedHeader
    END: NAV BAR START
    (the end is the same as yours, I just removed the extra stuff that was causing you problems)

    Also, I thought I could just copy the XML text from the designer to the template section of the grabber file. But that didn't work! So now I have to learn XML!

    You can. You just need to click the little XML radio button under the template area.
    I don't have this option for the START and END points.

    What would be great is if the WebDesigner could actually create the grabber file!

    Yep, that would be really great. I have a goal to have a complete designer, tester and maintainer for the grabber files. However, I don't have the time to complete them at the moment. Also the number of people using these applications has until no been small. So it have justified the work required to improve it. Maybe another developer could step forward and help on this project? It would not be very difficult coding, but GUI work is very time consuming.

    I also wonder why you do not have the WebEPG as a plugin (only the scheduler is there). Only because it would be easier to access all the files in one place (i.e the WebEPG setup, Designer, Log files, etc.). At the moment I have about 10 windows open just to keep track of everything I need to do this!

    There is a plugin for WebEPG, but only for scheduling as you say. It is planned to have the confguration of WebEPG inside MP, but the designer will always be a separate program.

    Thanks very much for all your feedback and keep it coming.
     

    Dadeo

    Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    James: Thanks for the help. Those were silly errors I made! I am making good progress now! I got all my 8 channels working... MOSTLY.

    I only have one problem remaing and that is with POST. Three of my sites need to post data to select the date. One is HBO (http://www.hbosouthasia.com/southasia/schedule). In my grabber file I entered: post="schedule_date=[DD/MM/YYYY]" but it doesn't work. I couldn't find any documentation in the Wiki on entering Post data.

    The second site is Zee Cafe (http://www.zeecafe.tv/ProgrammeGuide.aspx?PageId=1). In my grabber I entered: post="ddDate=[WEEKDAY, D MONTH]". I could never get this postdata to work in TVXB either since it uses javascript (function __doPostBack) when you select the date. The third site is Zee Studio and it is the same as Zee Cafe, so if you can tell me how to do the post it should work for both sites.

    The most trouble I had creating the grabber files was entering the template text. In most cases I could not copy the XML text from the WebEPG designer Source box to the Text box. I did click the XML radio button under the template area BUT I had two problems. First, it does not convert '&' to '&amp;' which I think it should. Second, there is often variable text in the table tags which I had to remove before it would work correctly. For example, different td width, col span, aref. Once I deleted everything but the start and end tags it worked perfectly.

    I had one other problem along the way. On one site I had to enter a short WEEKDAY as part of the URL to get subsequent day data (http://www.pixtelevision.com/schedules/schedule_main.php?adate=[DD]&amp;aday=[WEEKDAY]) In the WIKI it says WEEKDAY will give you a long day (i.e Saturday) when I needed the short day (Sat). At first I tried entering <Search startOffset="" maxlistings="" startPage="" endPage="" language="" weekday="ddd" /> thinking I had to do that to change the weekday to a short day. But then WebEPGconf would not even find my grabber file! I removed the Search startOffset and it turned out it worked perfectly. So it is just the WIKI that needs clarification.

    I hope this feedback helps. If you ever write a complete designer I think my first choice would be balloon help over the fields you have to enter, something like the MP TV Series plugin does on the MediaPortal Display Contol tab.

    Now that I understand your program better, I am very impressed. It does a great job, but it is certainly not user friendly at the start! I have started documenting my experiences! Please let me know the best way to send it to you when I am done!

    I hope you will be able to help with my Post data problems, if you are not going away for the holiday season! Thanks for the Christmas Present!
     

    Dadeo

    Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    I guess you have been busy over the holidays, so I thought I would post my question about Post data in another thread to see if there is anyone who can help me.

    BTW I was wrong about WEEKDAY working for me. How do I enter a short Weekday (i.e Thu)? I managed a workaround, but it would still be good to know.

    I have some additions for the WIKI. Do you want to see them first? Being new to WEBEPG I'd like to check the accuracy before I load them.
     

    Dadeo

    Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    Short Weekday working

    I got the short Weekday (i.e Sat instead of Saturday) to work. I entered <Search weekday="ddd" /> after the Site URL and before the <html>. Before when I tried it I left in the startOffset="" maxlistings="" startPage="" endPage="" language="" without any parameters!

    So now it works perfectly.
     

    James

    Retired Team Member
  • Premium Supporter
  • May 6, 2005
    1,385
    67
    Switzerland
    Great work :)

    If you post a finished version I will add it to the SVN.

    About the wiki. You can just make the changes and I'll check over them in the wiki and correct if needed.
     

    Dadeo

    Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    I could post it now if you like, but I am hoping to put descriptions in, maybe just for the movie channels.

    Also, I think I want to test it for a few days first. It is India, so you can't really count on even the channel sites to update their data! Especially at the beginning of the year, or even month, sometimes it takes a couple of days before data is posted. Right now there is only a few days posted on one site, so I get a grabber error when it gets to the day where there no listings are available. It's fine though, the available data is entered into the EPG.

    I am also debating about whether or not to take on the 60+ channels in India. They change website formats so often and I would feel responsible for keeping them up to date!

    Either way, I will post for you in a few days.
     

    Users who are viewing this thread

    Top Bottom