- Moderator
- #1
I'm trying to create a grabber for metro.se and need some help with dynamic tags. The template needs to work both with and without a Span tag in the html code.
Here's what the two different cases looks like:
Without End time:
Here's my grabber:
This works perfectly in WebEPG Designer. All programs are found and with the #END tag where available. But it won't work when running WebEPG.exe.
webEPG.log:
If I remove <z(></span> (<#END>)</z)?> from the template WebEPG finds all programs (that has no end time) with no errors in webEPG.log.
All help appreciated
Here's what the two different cases looks like:
Without End time:
With End time:<tr>
<td class="charttime" valign="top" width="40">05:15</td>
<td><img src="/shared/1x1blank.gif" width="6" height="1"></td>
<td valign="top" width="430" colspan="3">
<span class="charteventname">
Lättlagat
<br><span class="chartdescription">
Svenskt matprogram från 2003. Läcker och lättlagad vardagsmat är mottot för programmet. Kockarna Pelle Johansson, Kråke Lithander, Sacha Smederevac och bagaren Johan Sörberg alternerar bland grytorna och tillsammans med gäster bjuder de på enkla recept och ger handfasta tips som förenklar och underlättar i köket. 30/8. Producerat år 2003.
</span>
</td>
<td>
<img src="/shared/1x1blank.gif" width="4" height="1">
</td>
<td> </td>
</tr>
This looks fairly straight forward. I just need to make the </span> optional using WebEPG's Z tag but I can't get it to work<tr>
<td class="charttime" valign="top" width="40">05:50</td>
<td><img src="/shared/1x1blank.gif" width="6" height="1"></td>
<td valign="top" width="430" colspan="3">
<span class="charteventname">
Nyhetsmorgon</span> (10:00)
<br><span class="chartdescription">
Nyhetsmagasin. Nyheter, ekonominyheter, sport och väder varje halvtimme med start klockan 06.00 samt lokala nyheter. Dessutom aktuella gäster och musikunderhållning samt trisskrap.
</span>
</td>
<td>
<img src="/shared/1x1blank.gif" width="4" height="1">
</td>
<td> </td>
</tr>
Here's my grabber:
Code:
Start: <!-- Tabl
End: <!-- Flikmeny -->
Tags: BST
Template:
<td><#START></td>
<td></td>
<td>
<span>
<#TITLE><z(></span> (<#END>)</z)?>
<br><span>
<#DESCRIPTION>
</span>
</td>
This works perfectly in WebEPG Designer. All programs are found and with the #END tag where available. But it won't work when running WebEPG.exe.
webEPG.log:
2008-10-26 20:23:11.719911 [Info.][WebEPG-xmltv]: WebEPG: Getting Channel ID: tv4@tv4.se
2008-10-26 20:23:11.719911 [Info.][WebEPG-xmltv]: [1 of 1]
2008-10-26 20:23:11.723817 [Info.][WebEPG-xmltv]: WebEPG: Opening SE\metro_se.xml
2008-10-26 20:23:11.993331 [Info.][WebEPG-xmltv]: WebEPG: Version: 2.1.0
2008-10-26 20:23:11.993331 [Info.][WebEPG-xmltv]: WebEPG: TimeZone, Local: W. Europe Standard Time
2008-10-26 20:23:11.994308 [Info.][WebEPG-xmltv]: WebEPG: TimeZone, Site : W. Europe Standard Time
2008-10-26 20:23:12.039227 [Info.][WebEPG-xmltv]: WebEPG: ChannelId: tv4@tv4.se
2008-10-26 20:23:12.040203 [Debug][WebEPG-xmltv]: WebEPG: Grab Start 20:23 2008-10-26
2008-10-26 20:23:12.081216 [Info.][WebEPG-xmltv]: WebEPG: Reading DagensTv.com Standardguide POST:
2008-10-26 20:23:12.639774 [Info.][WebEPG-xmltv]: WebEPG: Listing Count 38
2008-10-26 20:23:12.659304 [Debug][WebEPG-xmltv]: WebEPG: Program Count (0), Listing Count (38), Discard Count (0)
2008-10-26 20:23:12.659304 [Warn.][WebEPG-xmltv]: WebEPG: Program Count (0) < Listing Count (38) - Discard Count (0), possible template error
2008-10-26 20:23:12.662234 [Info.][WebEPG-xmltv]: WebEPG: Reading DagensTv.com Standardguide POST:
2008-10-26 20:23:13.247157 [Info.][WebEPG-xmltv]: WebEPG: Listing Count 41
2008-10-26 20:23:13.252040 [Debug][WebEPG-xmltv]: WebEPG: Program Count (0), Listing Count (41), Discard Count (0)
2008-10-26 20:23:13.253016 [Warn.][WebEPG-xmltv]: WebEPG: Program Count (0) < Listing Count (41) - Discard Count (0), possible template error
2008-10-26 20:23:13.253993 [Info.][WebEPG-xmltv]: WebEPG: Writing Channel to XMLTV: TV4
2008-10-26 20:23:13.257899 [Info.][WebEPG-xmltv]: HTTP Statistics: Site metro.dagenstv.com : Pages 2 : Bytes 131946 : Total Time 00:00:01.1132100 : Av. Rate 118,5275 KBps
2008-10-26 20:23:13.258875 [Info.][WebEPG-xmltv]: WebEPG: Finished
If I remove <z(></span> (<#END>)</z)?> from the template WebEPG finds all programs (that has no end time) with no errors in webEPG.log.
All help appreciated