Updated grabber for dagenstv.com in Sweden (1 Viewer)

petsa

MP Donator
  • Premium Supporter
  • January 23, 2007
    588
    15
    Stockholm
    Home Country
    Sweden Sweden
    Hello!

    I realized this morning that dagenstv.com changed their web layout and the grabber no longer works.

    I've made a first attempt to update it and as far as I can see it now works again.

    Please let me know if you find any issues.

    James: can we add this to the stream?

    /Peter
     

    Attachments

    • www_dagenstv_com.xml
      30.6 KB

    petsa

    MP Donator
  • Premium Supporter
  • January 23, 2007
    588
    15
    Stockholm
    Home Country
    Sweden Sweden
    Hi again,

    I just realized I had not counted for some variations to the layout. Here is a new version of the grabber that picks up all shows, but not yet the descriptions...

    I need to work on this or get some help from someone.

    Here is the problem:

    - Some shows have additional information in their section of the page. Some voting buttons...
    - I've tried to use conditional statements to take this into account and filter this away
    - Now I can pick-up the Title, Start, and End times for the show but not the description
    - I believe this has to do with the fact that there is no Tag following the #Description
    - The Tag comes after the conditional statement

    Here is the template:

    <div>
    <div><#START>(<#END>)</div>
    <div><#TITLE></div>
    <div><#DESCRIPTION> <------------ No Tag here
    <z(><div><div></div><div></div></div></z)?> <------------ Here is the conditional statement
    </div> <------------ And here comes the closing Tag
    <div></div>
    </div>

    I can't figure out any other way of doing this so all help is very mucb appreciated! :D

    /Peter
     

    Attachments

    • www_dagenstv_com.xml
      30.6 KB

    Jucky

    New Member
    October 10, 2006
    4
    0
    Highly appreciated!

    Hey dude, just wanted you to know that all the work you do is highly appreciated, keep em coming!
     

    vuego

    Documentation Group
  • Team MediaPortal
  • August 5, 2006
    1,639
    764
    Göteborg
    Home Country
    Sweden Sweden
    I've also looked into this and fail using the Z tag too.
    I don't really understand why it's supposed to be <z(><td><#DESCRIPTION></td></z)?> and not <z>(<td><#DESCRIPTION></td>)?</z>.

    I've come up with two different templates. One that gets all normal shows:
    Code:
    Start: <!-- Start
    End: <div class="dm">
    Tags: D
    
    Text:
    <div>
    <div><#START>(<#END>)</div>
    <div><#TITLE></div>
    <div><#DESCRIPTION></div>


    And one that gets the shows with voting buttons:
    Code:
    Start: <!-- Start
    End: <div class="dm">
    Tags: DF
    
    Text:
    <div>
    <div><#START>(<#END>)</div>
    <div><#TITLE></div>
    <div><#DESCRIPTION><form><div>


    Now to the question: How do we combine those two?
     

    petsa

    MP Donator
  • Premium Supporter
  • January 23, 2007
    588
    15
    Stockholm
    Home Country
    Sweden Sweden
    You got me there... I also had two different templates that I could not combine.

    Actually, in the end I gave up and started to use "xmltv.exe tv_grab_se_swedb". This one works really well, and it also syncs with TVScheduler through the TV3E plugin.

    With xmltv I can get both descriptions and start/end time for each show. No fancy vote buttons to take care of ;)

    /Peter
     

    vuego

    Documentation Group
  • Team MediaPortal
  • August 5, 2006
    1,639
    764
    Göteborg
    Home Country
    Sweden Sweden
    There's only one problem with tv_grab_se_swedb. It supports less than half the amount of channels as dagenstv.com does.

    James can you confirm that a tag always needs a start and end tag like <div><#DESCRIPTION></div> and cannot have an optional end tag? Or is there a workaround?
     

    James

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

    petsa's template was correct but there was a bug with the Z tags which was stopping it from working.

    vuego, think of the everything around the Z tag being removed and the regex command staying. So <z(> .... </z)?> becomes ( ... )?. The Z tags are needed to tell the parsing engine that these are regex commands. If you put them in without the Z tags, the parsing engine treats them as string matches. Like around the #END in this case.

    I've made some corrections and both of the following should work:
    Code:
    <div>
    <div><#START>(<#END>)</div>
    <div><#TITLE></div>
    <div><#DESCRIPTION>

    Code:
    <div>
    <div><#START>(<#END>)</div>
    <div><#TITLE></div>
    <div><#DESCRIPTION><z(><div><z)*></div>

    I would use the first.
     

    petsa

    MP Donator
  • Premium Supporter
  • January 23, 2007
    588
    15
    Stockholm
    Home Country
    Sweden Sweden
    Thanks James! Now it works again.

    Can you please add the updated grabber file to the SVN stream?

    /Peter
     

    vuego

    Documentation Group
  • Team MediaPortal
  • August 5, 2006
    1,639
    764
    Göteborg
    Home Country
    Sweden Sweden
    James please add this version to SVN since it also includes the new channels described in post #34 of the same thread.

    BTW I think that the WebEPG Designer also needs to be updated to handle the new Z tag.

    :D
     

    Users who are viewing this thread

    Top Bottom