You are here

Preload and read site before url_index?

9 posts / 0 new
Last post
Netuddki
Offline
Joined: 3 years
Last seen: 8 months
Preload and read site before url_index?

Is it possible to load a site and read some info and save it in an index_variable, before calling the index_url?

The preload function in the manual doesn't seem to do that what I need.

Netuddki
Offline
Joined: 3 years
Last seen: 8 months

The problem is, that the site changed it's structure and uses a changing variable which will be put before the channel number in the link.

This prefix is given on another site as part of the java script which generates the links.

The prefix contains a date (not the actual date!) and a random(?) number.

This almost works:

url_index {url|http://www.tring.al/guide/index.php?size=1}
*
index_variable_element.scrub {regex||name = "epg(.*?)"||}
index_variable_element.modify {addend|'config_site_id'}
*
url_index.modify {replace('index_variable_element' not "")|index.php?size=1|epgs/epg##prefix##.xml}
url_index.modify {replace|##prefix##|'index_variable_element'}

Netuddki
Offline
Joined: 3 years
Last seen: 8 months

Good idea!

I have to remember this :-)

Thanks!

yangyanch
Offline
Joined: 7 months
Last seen: 4 months

where is the answer???

yangyanch
Offline
Joined: 7 months
Last seen: 4 months

where is the answer???

Blackbear199
Offline
Donator
Joined: 4 years
Last seen: 14 min

the answer is...
its not possible with webgrab directly.

u cannot read the url_index page and then decide to change the url.

yangyanch
Offline
Joined: 7 months
Last seen: 4 months

but why Netuddki said "Good idea"??I have the same problem with him

Blackbear199
Offline
Donator
Joined: 4 years
Last seen: 14 min

you have to use another method like set(type=run)(see the manual) or use php to get the current epg date string for the url_index before you can grab the data.

webgrab cannot do this directly.

yangyanch
Offline
Joined: 7 months
Last seen: 4 months

Thanks a lot

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