Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

acribb

macrumors regular
Original poster
Nov 30, 2007
148
3
I'm looking for an applescript that searches a web page for a specific text string. So far, I have used curl to read in the webpage source, but now i'm not sure how to read that text into a variable to parse for the specific string.

Thanks for any help.

**edit** All I need to use is 'contains'
 
Last edited:

mwpeters8182

macrumors 6502
Apr 16, 2003
411
0
Boston, MA
If you're using curl, you might as well just use grep to search for the string.

curl | grep [string] That should return all instances of the string in the text.
 

jen234

macrumors newbie
Dec 1, 2010
4
0
You may also want to consider using Python, which these days seems to be the low-level language of choice or web based queries. Tons of libraries available.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.