http request

Post your questions and help other users.

Moderator: Martin

Post Reply
rsegoly
Posts: 46
Joined: 14 Jun 2013 15:30

http request

Post by rsegoly » 26 May 2014 05:47

Can I get the return data with the html code?
http://m.ontime3g.com/?route=149&stop=37040&dir=1

I need just the number of word after the word בעוד

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: http request

Post by Martin » 26 May 2014 17:21

Hi,

It should be possible to extract the text using an action Script and functions substring and indexOf.
Something like this might work (I'm not sure since the page contains left-to-right and right-to-left text):

Code: Select all

// find the start index of בעוד
start = indexOf(response, "בעוד");

// add 5 to skip the characters of the word plus the subsequent space
start = start + 5;

// find the space after the number
end = indexOf(response, " ", start);

//extract the text between the two positions
number = substring(response, start, end);
Regards,
Martin

rsegoly
Posts: 46
Joined: 14 Jun 2013 15:30

Re: http request

Post by rsegoly » 26 May 2014 17:27

thanks
I managed using split

Post Reply