1

すべての俳優の名前をプルしたい場合は、これを試しましたが、1 つの名前しかプルしません。と言うすべてのタグを引っ張らせるためにできる繰り返しループや何か他のものはあります<span itemprop="name">か?

set astid to AppleScript's text item delimiters

set startHere to "<span itemprop=\"name\">"
set stopHere to "</span>"
set mysource_html to do shell script "curl https://play.google.com/store/movies/details?id=H9EKG4-JHSw"
set AppleScript's text item delimiters to startHere
set blurb1 to text item 2 of mysource_html
set AppleScript's text item delimiters to stopHere
set blurb2 to text item 1 of blurb1

set AppleScript's text item delimiters to astid
4

1 に答える 1

1

試す:

set {TID, text item delimiters} to {text item delimiters, {"<td class=\"credit-label\">Actors</td>", "<td class=\"credit-label\">Producers</td>"}}
set mysource_html to text item 2 of (do shell script "curl https://play.google.com/store/movies/details?id=H9EKG4-JHSw")
set text item delimiters to TID

set mysource_html to every paragraph of (do shell script "echo " & quoted form of mysource_html & " | grep -Eo '<span itemprop=\"name\">[^<]*' | sed 's/.*>//g'")
于 2012-11-21T00:21:24.533 に答える