Вот сам скрипт:
- Код: Выделить всё
On Error resume Next
With CreateObject("MSXML2.DOMDocument.6.0")
.async = false
.load("http://developer.echonest.com/api/v4/artist/biographies?api_key=PKDMY7Z0SGFBW" & UCase(Right("denial", 4)) & "&license=cc-by-sa&format=xml&name=" & UTF8Encode(WScript.Arguments.Item(0)))
WScript.Echo Replace(Replace(.selectSingleNode("/response/biographies/biography/text[../site='last.fm']").text, ". ", "." & vbCrLf & vbCrLf), ". ", "." & vbCrLf & vbCrLf)
End With
Function UTF8Encode(s)
With CreateObject("ADODB.Stream")
.Open
.Type = 2
.Charset = "utf-8"
.WriteText s
.Flush
.Position = 0
.Type = 1
.Read = 3
For i = 1 To .Size-3
UTF8Encode = UTF8Encode & "%" & Hex(AscB(.Read(1)))
Next
.Close
End With
End Function