|
|
|
WebscrapeA Web 'Screen Scraper'To get the current Wind Speed in Auxerre Auxerre is a nice town in Burgundy with a medieval bit plus Cathedral, and apparently, at least one wind speed meter (anemometer!). This time we will use Lycos. pscrape -u"weather.lycos.com/?q=Auxerre%2C+France"
-e"Wind Speed.*(\d+)\D+mph" pscrape -u"weather.lycos.com/?q=Auxerre%2C+France"
-e"Wind Speed.*(\d+)\D+mph" -f"The wind speed in Auxerre is
\$1mph" Here, \$1 refers to the first Regular Expression buffer (which in this case is (\d+) ), it results in the contents of the buffer being inserted into the output string at this position, the result of the above should look something like the following: The wind speed in Auxerre is 7mph
|