How to use <DayNames> to get correct url for a Spanish grabber? (1 Viewer)

igalan

Retired Team Member
  • Premium Supporter
  • June 30, 2005
    406
    20
    Barcelona
    Home Country
    Spain Spain
    I'm updating some of the Spanish grabbers that no longer work. I'm having trouble to format the correct URL for one of them. I've searched up and down, read the Wiki, but I can't figure out how to get it working. It's a simple problem:

    Code:
    URL for Monday is: http://www.elpais.es/parrillatv/[ID]/lunes
    URL for Tuesday is: http://www.elpais.es/parrillatv/[ID]/martes
    URL for Wednesday is: http://www.elpais.es/parrillatv/[ID]/miercoles
    URL for Thursday is: http://www.elpais.es/parrillatv/[ID]/jueves
    URL for Friday is: http://www.elpais.es/parrillatv/[ID]/viernes
    URL for Saturday is: http://www.elpais.es/parrillatv/[ID]/sabado
    URL for Domingo is: http://www.elpais.es/parrillatv/[ID]/domingo

    The tag [WEEKDAY] doesn't work as I get the week day en English. But if it returned the weekday in Spanish it still wouldn't help, as some weekdays have letters with accents and the URLs don't have them.

    So I've tried:

    Code:
        <Site url="http://www.elpais.es/parrillatv/[ID]/[DAY_NAME]" post="" external="false" encoding="" />
        <Search startOffset="0" maxlistings="0" startPage="0">
          <DayNames>
            <Day>lunes</Day>
            <Day>martes</Day>
            <Day>miercoles</Day>
            <Day>jueves</Day>
            <Day>viernes</Day>
            <Day>sabado</Day>
            <Day>domingo</Day>
          </DayNames>
        </Search>

    But that doesn't work, because it starts counting the days from your current day, so if now is thursday WebEPG converts this current weekday to "lunes" (first in the list, instead of "jueves") and the next day "martes" (instead of "viernes").

    The Wiki doesn't explain much those <Search> and <DayNames> tags, can someone shed some light on this. Thanks :) .

    P.D.: Of course, once I update the grabbers I will send them so the new releases have working grabbers for Spanish users.
     

    James

    Retired Team Member
  • Premium Supporter
  • May 6, 2005
    1,385
    67
    Switzerland
    Day_Name was designed for cases like: Today, Tomorrow, +2, +3, ...

    Try setting the language for the WEEKDAY tag:

    <Search language="es">

    I'm not sure how the accents will be treated. So please provide feedback about your results.
     

    igalan

    Retired Team Member
  • Premium Supporter
  • June 30, 2005
    406
    20
    Barcelona
    Home Country
    Spain Spain
    Thanks, but that doesn't work. Or at least I can't make it work. I've tried:

    Code:
        <Site url="http://www.elpais.es/parrillatv/[ID]/[WEEKDAY]" post="" external="false" encoding="" />
        <Search startOffset="0" maxlistings="0" startPage="0" language="es">
          <DayNames>
            <Day>lunes</Day>
            <Day>martes</Day>
            <Day>miercoles</Day>
            <Day>jueves</Day>
            <Day>viernes</Day>
            <Day>sabado</Day>
            <Day>domingo</Day>
          </DayNames>
        </Search>

    It complains about the tag language="es", something about being "neutral and can't be used for formatting". It quits after that without further processing (skipping even the channels that don't use this grabber).

    So it seems that there isn't a way to create a template URL for WebEPG to grab from this website :( . Too bad, it's one of the most reliable EPG sources in Spain.

    James, do you have access to the SVN? I don't know if I have, but I don't want to mess it. If you do, I have an updated Spanish grabber (existing version wasn't working), and the one called www_elpais_es.xml has to be removed, as no longer works (that's the one I've tried to update).
     

    James

    Retired Team Member
  • Premium Supporter
  • May 6, 2005
    1,385
    67
    Switzerland
    Ok my mistake. It needs to be a specific language.

    When I use this:

    <Search language="es-ES">

    I get:

    Code:
    Reading http://www.elpais.es/parrillatv/1/domingo

    I will update the wiki documentation.
     

    igalan

    Retired Team Member
  • Premium Supporter
  • June 30, 2005
    406
    20
    Barcelona
    Home Country
    Spain Spain
    Ok, as I suspected it won't work. [WEEKDAY] returns the correct weekday now, but with accents where present, and the URL doesn't have them.

    Still I made an updated grabber for one day, which is better than nothing.

    Thanks anyway.
     

    Users who are viewing this thread

    Top Bottom