You are here

Sort problems with api.rtvslo.si

7 posts / 0 new
Last post
doglover
Offline
Joined: 11 years
Last seen: 3 years
Sort problems with api.rtvslo.si

I am trying to grab data (in Italian) from api.rtvslo.si  (for Slovenian, I could used the existing grabber)

Problem is the data on the website is not in chronological order.  I tried to sort the schedule ( there is a value: SORT_NUMBER="19" ).

This works if you only grab one day.  Grabbing more days result is errors like:

[  Debug ] Error while sorting index_showsplit !
[  Debug ] An element with Key =26 + already exists.
[  Debug ] value skipped!!
[  Debug ] Error while sorting index_showsplit !
[  Debug ] An element with Key =7 + already exists.
[  Debug ] value skipped!!

Problem is, I do not know how to proceed.

Willy

janKO
Offline
Donator
Joined: 10 years
Last seen: 1 hour

Some time ago i also try to make ini from this ... and i found just the same problem like you... I wrote e-mail to RTV Slovenija why not have normal time order... I also talk over telephon with some kind of chief but no success sad

WGMaker
Offline
WGMaker's picture
WG++ Team memberDonator
Joined: 12 years
Last seen: 6 min
Is the support helpful?
support us

Hi ,

there is a simple url that works :
url_index{url()|http://4d.rtvslo.si/helper/|urldate|}
urldate.format {datestring|yyyy-MM-dd}

​So in fact , no need for all the ?query and datetime stuff in the url.
 

The rest of the ini needs some completion

 

Jan

doglover
Offline
Joined: 11 years
Last seen: 3 years

Thanks for the help.

Problem:  I need the Italian schedule of TV Koper (TV Capodistria) and this is not in this page.  It is in the page: http://api.rtvslo.si/spored/getProvys/TVK/2016-03-15

 

Now with a combination of these pages I managed to grab the desired info in Italian. 

This probably only works for TV Capodistria (TV Koper)

<channel update="i" site="rtvslo.it" site_id="tvkp" xmltv_id="TVKP">TVKP</channel>

Willy

 

 

Attachments: 
WGMaker
Offline
WGMaker's picture
WG++ Team memberDonator
Joined: 12 years
Last seen: 6 min
Is the support helpful?
support us

Hi Willy,

 

I will have a look.

 

jAN

WGMaker
Offline
WGMaker's picture
WG++ Team memberDonator
Joined: 12 years
Last seen: 6 min
Is the support helpful?
support us

Hi Willy,

as promissed.
​The trick is to increase the sort_number by a fixed amount (e.g. 100) for every next index page. To do that a loop is needed that steps through list of index shows in which a page separator is kept (e.g <PROGRAMMES>). If such a page separator is detected the sort_number increment is increased by 100.

After that sort by integer does the trick.

I leave the rest of the ini to you, OK?

​saludos      Jan
 

Attachments: 
doglover
Offline
Joined: 11 years
Last seen: 3 years

Completed the Italian version (probably only TV-Capodistria is grabbeable)

I finished also the Slovenian version.

 

Willy

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl