Get a specific string in a webpage

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
dsdsds

Get a specific string in a webpage

Post by dsdsds » Sat Oct 02, 2004 2:34 pm

Difficult question:

How can I get the travel time value (in the following example: "00h26") in the webpages of this site?

http://www.viamichelin.com/viamichelin/ ... =000000612

Thanks,
Dario Fo

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Sun Oct 03, 2004 1:42 pm

Unfortunately the travel time is not plain text so it cannot be gleaned from the source of the page. Looks like javascript. So doesn't look like it can be done.
MJT Net Support
[email protected]

Lumumba

Post by Lumumba » Sun Oct 03, 2004 3:59 pm

With a combo of CTRL+A and CTRL+C you'll be able to copy that kinda content to the clipboard.

I've not checked if the Clipboard var/content can be written to a file using
MSched's WLN> command. :!:

Afterwards parse/split (separator is the space character) the line which contains the word Sommario to get the time value.

Sommario 20 km in 00h26 11 km in 00h07 su strade a scorrimento veloce

:idea: There are several providers which offers route planning. Check if another one fits better.

dsdsds

Post by dsdsds » Sun Oct 03, 2004 7:54 pm

Thank you Lumumba for your valid solution.

Effectively, it would be better for me to find a different route planner site so that I can make a script that don't need the use of Internet Explorer.

D.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts