Re: HTML parsing
Re: HTML parsing
- Subject: Re: HTML parsing
- From: "Stockly, Ed" <email@hidden>
- Date: Thu, 09 Jun 2016 18:33:09 +0000
- Thread-topic: HTML parsing
Something like this will get you the dates. Is that what you're trying to
extract?
—————
set AppleScript's text item delimiters to {"<A href=\"#\"onclick=\""}
—Assumes the raw html text is in the variable "myText"
set myText to the rest of text items of myText
set listOfResults to {}
repeat with thisItem in myText
set AppleScript's text item delimiters to {"</a>"}
set insideTag to text item 1 of thisItem as text
set AppleScript's text item delimiters to {">"}
set the end of listOfResults to the last text item of insideTag
end repeat
Return listOfResults
On 6/9/16, 4:14 AM,
"applescript-users-bounces+ed.stockly=email@hidden on
behalf of William Dockery"
<applescript-users-bounces+ed.stockly=email@hidden on
behalf of email@hidden> wrote:
>
>Hello, I am an intermediate AppleScripter, and I am starting to use
>JavaScript to scrape websites for my personal use. I have learned how to
>select elements by element ID. But I have not yet learned how to select
>a list of HTML snippets that share a certain pattern of tags or tag
>values.
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden