new WebEPG grabber for IT tv -> error (1 Viewer)

BertTRP

Portal Member
June 11, 2010
40
1
Home Country
Italy Italy
I'm trying to create a new grabber for RAI (italian TV). Hereby a simplified code of the grabber (even the channel ID and date are hardcoded):

Code:
<?xml version="1.0" encoding="utf-8"?>
<Grabber>
  <Info availableDays="1" timezone="W. Europe Standard Time" version="2.1.0" />
  <Channels>
    <Channel id="Rai Uno" siteId="RaiUno" />
    <Channel id="Rai Due" siteId="RaiDue" />
  </Channels>
  <Listing type="Html">
<Search language="it-IT" />
    <Site url="http://www.rai.it/dl/portale/GuidaProgrammiAcc.html?RaiUno_2010_08_02" post="" external="false" encoding="" delay="10000"/>
    <Html>
      <Template name="default">
        <SectionTemplate tags="SA">
          <TemplateText>
		&lt;span class="ora"&gt;&lt;#START&gt;&lt;/span&gt; &lt;span class="info"&gt;&lt;a&gt;&lt;#TITLE&gt;&lt;/a&gt;&lt;/span&gt;&lt;</TemplateText>
        </SectionTemplate>
      </Template>
    </Html>
  </Listing>
</Grabber>

The WebEPG engine fails reporting the error:

Code:
2010-08-02 18:15:25.218750 [WebEPGImporter(6)]: plugin:webepg import failed
2010-08-02 18:15:25.234375 [WebEPGImporter(6)]: Exception   :System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at MediaPortal.Utils.Web.HtmlString.GetTagLength(String strSource, Int32 StartPos)
   at MediaPortal.Utils.Web.HtmlString.TagList(String source)
   at MediaPortal.Utils.Web.HtmlProfiler.BuildProfile(String source)
   at MediaPortal.Utils.Web.HtmlProfiler..ctor(HtmlSectionTemplate template)
   at MediaPortal.Utils.Web.HtmlParser..ctor(HtmlParserTemplate template, Type parserDataType, Object[] parserDataArgs)
   at MediaPortal.WebEPG.Parser.WebParser..ctor(WebParserTemplate webTemplate)
   at MediaPortal.WebEPG.WebListingGrabber.Initalise(String File, Int32 maxGrabDays)
   at MediaPortal.EPG.WebEPG.Import()
   at TvEngine.WebEPGImport.ThreadFunctionImportTVGuide(Object aparam)

Anybody has any idea why?

Thank you in advance.
 

Attachments

  • rai.xml
    785 bytes

benjerry

MP Donator
  • Premium Supporter
  • September 26, 2007
    167
    10
    Home Country
    Netherlands Netherlands
    Like this it worked for me without errors:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <Grabber>
      <Info availableDays="1" timezone="W. Europe Standard Time" version="2.1.0" />
      <Channels>
        <Channel id="Rai Uno" siteId="RaiUno" />
        <Channel id="Rai Due" siteId="RaiDue" />
      </Channels>
      <Listing type="Html">
        <Site url="http://www.rai.it/dl/portale/GuidaProgrammiAcc.html?RaiUno_2010_08_02" post="" external="false" encoding="" delay="10000"/>
        <Search language="it-IT" />
        <Html>
          <Template name="default">
            <SectionTemplate tags="SA">
              <TemplateText>
    &lt;span class="ora"&gt;&lt;#START&gt;&lt;/span&gt; &lt;span class="info"&gt;&lt;a&gt;&lt;#TITLE&gt;&lt;/a&gt;&lt;/span&gt;&lt;
              </TemplateText>
            </SectionTemplate>
          </Template>
        </Html>
      </Listing>
    </Grabber>
     

    BertTRP

    Portal Member
    June 11, 2010
    40
    1
    Home Country
    Italy Italy
    Thanks a lot, it worked perfectly!

    Finalized grabber can be now found here for testing and eventual acceptance.

    Cheers!
     

    Users who are viewing this thread

    Top Bottom