home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
Electronic Program Guide
WebEPG
Attempting new grabber for ontv.dk
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="thomas.p" data-source="post: 415451" data-attributes="member: 88481"><p>Out of pure ignorance I decided to try out the task of writing a new WebEPG grabber for ontv.dk since the old one is defunct and ontv.dk seems to be one of the most comprehensive TV-guides in DK.</p><p></p><p>So far I got the basics going mostly thanks to the guides on the site and snooping in working grabber files. However I need some help to make this work as well as intended.</p><p></p><p>This is what my xml file looks like so far (the file is attatched!):</p><p></p><p>[CODE]<?xml version="1.0" encoding="utf-8"?></p><p></p><p><Grabber></p><p></p><p> <Info language="da" availableDays="14" timezone="W. Europe Standard Time" version="0.0.3" /></p><p></p><p> <Channels></p><p> <Channel id="dr2@dr.dk" siteId="2" /> </p><p> </Channels></p><p></p><p> <Listing type="Html"></p><p></p><p> <Site url="http://ontv.dk/tv/[ID]/[YYYY]-[MM]-[DD]" post="" external="false" encoding="" /></p><p></p><p> <Html></p><p></p><p> <Template name="default" start="&lt;div class=&quot;content&quot; id=&quot;content&quot;&gt;" end="&lt;tr class=&quot;bottom&quot;&gt;"></p><p> <SectionTemplate tags="TPA"></p><p> <TemplateText></p><p> &lt;td&gt;&lt;p&gt;&lt;#START&gt;&lt;/p&gt;&lt;/td&gt;</p><p>&lt;td&gt;&lt;p&gt;&lt;a&gt;&lt;#TITLE&gt;&lt;/a&gt;&lt;/p&gt;&lt;/td&gt;</p><p> </TemplateText></p><p> </SectionTemplate></p><p> </Template></p><p> </p><p> <Template name="end" start="&lt;div class=&quot;content&quot; id=&quot;content&quot;&gt;" end="&lt;tr class=&quot;function&quot;&gt;"></p><p> <SectionTemplate tags="THP"></p><p> <TemplateText></p><p> &lt;td&gt;&lt;h1&gt;&lt;/h1&gt;&lt;p&gt; - &lt;#END&gt; på &lt;br/&gt;&lt;/p&gt;</p><p> </TemplateText></p><p> </SectionTemplate></p><p> </Template></p><p> </p><p> <Template name="subtitle+description+genre" start="&lt;div class=&quot;content&quot; id=&quot;content&quot;&gt;" end="&lt;tr class=&quot;function&quot;&gt;"></p><p> <SectionTemplate tags="HP"></p><p> <TemplateText></p><p> &lt;h2&gt;&lt;/h2&gt;&lt;h3&gt;&lt;/h3&gt;&lt;p&gt;&lt;br/&gt;&lt;br/&gt;(&lt;#SUBTITLE&gt;)&lt;br/&gt;&lt;br/&gt;&lt;#DESCRIPTION&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;br/&gt;Type:&lt;/strong&gt; &lt;#GENRE&gt;&lt;/p&gt;</p><p> </TemplateText></p><p> </SectionTemplate></p><p> </Template></p><p></p><p> <Sublinks></p><p> <Sublink search="programinfo" template="end"></p><p> <Link url="http://ontv.dk/[1]" post="" external="false" encoding="" /></p><p> </Sublink></p><p> <Sublink search="programinfo" template="subtitle+description+genre"></p><p> <Link url="http://ontv.dk/[1]" post="" external="false" encoding="" /></p><p> </Sublink></p><p> </Sublinks></p><p></p><p> </Html></p><p></p><p> </Listing></p><p></p><p></Grabber>[/CODE]</p><p></p><p>Getting WebEPG to grab TITLE and START time from the main page was easy pie, but moving on from there turned out to be more confusing.</p><p></p><p>Each program listed on the main page links to a sub-page with descriptions and other stuff - the contents depends on the type of program (this is a problem in itself that I will get back to later). As I tried to add more stuff my grabber somehow lost the ability to grab stuff from the sub-page. This is the problem I am working on right now, but if anybody sees the glaring error in the xml file please feel free to give me a tip <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /></p><p></p><p>Due to the diversity of content on the sub-pages I am confused whether it makes more sense to use several templates to look for different info under different circumstances or whether it is possible to do much the same by use of the Searches/Search stuff that can be added after Sublinks. Either way I have not been able to figure out if it is even possible to have several (as in >2) templates grabbing info from the web pages. Anybody with any experience in this field please tip me off, send me a file with an obscure example .. anything please!</p><p></p><p>While trying to figure out how grabber files work I've been using WebEPG Designer, which helps a lot, but some concepts elude me. The start and end conditions of the templates are confusing me since WebEPG Designer accepts HTML tags whereas the final xml file reports an error in my browser if I copy them directly. Transforming them into the same gibberish used in TemplateText makes the xml file acceptable, but leaves me with no way of testing whether the start and end conditions are actually working...</p><p></p><p>I will probably uncover many more problems as I move along, but these are the most annoying issues for now. Hope somebody can lend a hand testing or point me to solutions for some of my problems <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="thomas.p, post: 415451, member: 88481"] Out of pure ignorance I decided to try out the task of writing a new WebEPG grabber for ontv.dk since the old one is defunct and ontv.dk seems to be one of the most comprehensive TV-guides in DK. So far I got the basics going mostly thanks to the guides on the site and snooping in working grabber files. However I need some help to make this work as well as intended. This is what my xml file looks like so far (the file is attatched!): [CODE]<?xml version="1.0" encoding="utf-8"?> <Grabber> <Info language="da" availableDays="14" timezone="W. Europe Standard Time" version="0.0.3" /> <Channels> <Channel id="dr2@dr.dk" siteId="2" /> </Channels> <Listing type="Html"> <Site url="http://ontv.dk/tv/[ID]/[YYYY]-[MM]-[DD]" post="" external="false" encoding="" /> <Html> <Template name="default" start="<div class="content" id="content">" end="<tr class="bottom">"> <SectionTemplate tags="TPA"> <TemplateText> <td><p><#START></p></td> <td><p><a><#TITLE></a></p></td> </TemplateText> </SectionTemplate> </Template> <Template name="end" start="<div class="content" id="content">" end="<tr class="function">"> <SectionTemplate tags="THP"> <TemplateText> <td><h1></h1><p> - <#END> på <br/></p> </TemplateText> </SectionTemplate> </Template> <Template name="subtitle+description+genre" start="<div class="content" id="content">" end="<tr class="function">"> <SectionTemplate tags="HP"> <TemplateText> <h2></h2><h3></h3><p><br/><br/>(<#SUBTITLE>)<br/><br/><#DESCRIPTION></p><p><br/><br/>Type:</strong> <#GENRE></p> </TemplateText> </SectionTemplate> </Template> <Sublinks> <Sublink search="programinfo" template="end"> <Link url="http://ontv.dk/[1]" post="" external="false" encoding="" /> </Sublink> <Sublink search="programinfo" template="subtitle+description+genre"> <Link url="http://ontv.dk/[1]" post="" external="false" encoding="" /> </Sublink> </Sublinks> </Html> </Listing> </Grabber>[/CODE] Getting WebEPG to grab TITLE and START time from the main page was easy pie, but moving on from there turned out to be more confusing. Each program listed on the main page links to a sub-page with descriptions and other stuff - the contents depends on the type of program (this is a problem in itself that I will get back to later). As I tried to add more stuff my grabber somehow lost the ability to grab stuff from the sub-page. This is the problem I am working on right now, but if anybody sees the glaring error in the xml file please feel free to give me a tip :thx: Due to the diversity of content on the sub-pages I am confused whether it makes more sense to use several templates to look for different info under different circumstances or whether it is possible to do much the same by use of the Searches/Search stuff that can be added after Sublinks. Either way I have not been able to figure out if it is even possible to have several (as in >2) templates grabbing info from the web pages. Anybody with any experience in this field please tip me off, send me a file with an obscure example .. anything please! While trying to figure out how grabber files work I've been using WebEPG Designer, which helps a lot, but some concepts elude me. The start and end conditions of the templates are confusing me since WebEPG Designer accepts HTML tags whereas the final xml file reports an error in my browser if I copy them directly. Transforming them into the same gibberish used in TemplateText makes the xml file acceptable, but leaves me with no way of testing whether the start and end conditions are actually working... I will probably uncover many more problems as I move along, but these are the most annoying issues for now. Hope somebody can lend a hand testing or point me to solutions for some of my problems :) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
Electronic Program Guide
WebEPG
Attempting new grabber for ontv.dk
Contact us
RSS
Top
Bottom