Posts

Post not yet marked as solved
1 Replies
338 Views
Hi There I'm trying to create a basic script that extracts some text from a webpage, but when I save I'm getting a Syntax error that I don't understand... ... please see screenshot. The second Set (Role1Result) is working fine. I'm a bit of a newbie at this, so any help really appreciated. Here's the relevant bit of code pasted: set tid to AppleScript's text item delimiters -- save them for later. set AppleScript's text item delimiters to startText -- find the first one. set liste to text items of SearchText set AppleScript's text item delimiters to endText -- find the end one. set extracts to {} repeat with subText in liste if subText contains endText then copy text item 1 of subText to end of extracts end if end repeat set AppleScript's text item delimiters to tid -- back to original values. return extracts end extractText --- roles --- set role0Result to extractText(input0, " <dd class="result-lockup__highlight-keyword"> <span data-anonymize="job-title" class="t-14 t-bold">", "</span> <span> at ") set role1Result to extractText(input1, " <dd class=\"result-lockup__highlight-keyword\"> <span class=\"t-14 t-bold\">", "</span> <span> ")
Posted Last updated
.