Hello there…
Working on a tiny application that searches youtube for infomation, but im a bit stuck
set searchUrl to "http://www.youtube.com/results?search_query=comedy+fightclub"
try
set searchResult to do shell script "curl " & "" & searchUrl & " | grep -i \"i.ytimg.com\""
end try
set video_Title to parseCurlData(searchResult, "title=\"", "\" alt")
set video_Url to parseCurlData(searchResult, "<img src=\"http://i.ytimg.com/vi/", "/default.jpg\" class=\"vimg120\" title=\"")
set video_Poster to "http://i.ytimg.com/vi/" & video_Url & "/default.jpg"
display dialog video_Title & " " & video_Url & " " & video_Poster
to parseCurlData(SearchText, startText, endText)
set tid to AppleScript's text item delimiters
set AppleScript's text item delimiters to startText
set endItems to text of text item -1 of SearchText
set AppleScript's text item delimiters to endText
set beginningToEnd to text of text item 1 of endItems
set AppleScript's text item delimiters to tid
return beginningToEnd
end parseCurlData
all this is working fine, but im only getting the last line of info, i need to put it all i a list or something,
i need infomation from ALL the lines, pt the dialog only shows the last line, and i just dont know how
to get this to list the all…
any help would be great…