1
我試圖從雅虎的API中獲取一些數據,並且遇到一些麻煩。使用JSON從雅虎的API中抓取數據
這裏是雅虎的JSON輸出
cbfunc({
"query": {
"count": 25,
"created": "2012-03-10T07:49:06Z",
"lang": "en-US",
"diagnostics": {
"publiclyCallable": "true",
"url": {
"execution-start-time": "2",
"execution-stop-time": "364",
"execution-time": "362",
"content": "http://us.music.yahooapis.com/track/v1/list/search/track/Madonna?start=1&count=25"
},
"user-time": "369",
"service-time": "362",
"build-version": "25587"
},
"results": {
"Track": [
{
"discNumber": "1",
"duration": "0",
"explicit": "0",
"flags": "0",
"id": "31884342",
"label": "Touch and Go Records",
"popularity": "3",
"rating": "-1",
"releaseYear": "2003",
"rights": "160",
"title": "Madonna",
"trackNumber": "10",
"url": "http://new.music.yahoo.com/cocorosie/tracks/madonna--31884342",
"Artist": {
"catzillaID": "1927768063",
"flags": "57859",
"hotzillaID": "1808720053",
"id": "23301762",
"name": "Cocorosie",
"rating": "-1",
"trackCount": "118",
"url": "http://new.music.yahoo.com/cocorosie/",
"website": "http://www.cocorosieland.com/"
},
"Album": {
"Release": {
"UPC": "036172095360",
"explicit": "0",
"flags": "2",
"id": "31881255",
"label": "Touch and Go Records",
"rating": "-1",
"releaseDate": "2003-09-20T07:00:00Z",
"releaseYear": "2003",
"rights": "160",
"title": "La Maison De Mon Rêve",
"typeID": "2",
"url": "http://new.music.yahoo.com/cocorosie/albums/maison-de-mon-reve--31881255",
"Image": [
{
"size": "40",
"url": "http://d.yimg.com/ec/image/v1/release/31881255?size=40"
},
{
"size": "65",
"url": "http://d.yimg.com/ec/image/v1/release/31881255?size=65"
},
{
"size": "75",
"url": "http://d.yimg.com/ec/image/v1/release/31881255?size=75"
},
{
"size": "80",
"url": "http://d.yimg.com/ec/image/v1/release/31881255?size=80"
},
{
"size": "110",
"url": "http://d.yimg.com/ec/image/v1/release/31881255?size=110"
},
{
"size": "135",
"url": "http://d.yimg.com/ec/image/v1/release/31881255?size=135"
},
{
"size": "200",
"url": "http://d.yimg.com/ec/image/v1/release/31881255?size=200"
},
{
"size": "300",
"url": "http://d.yimg.com/ec/image/v1/release/31881255?size=300"
},
{
"size": "654",
"url": "http://d.yimg.com/ec/image/v1/release/31881255?size=654"
},
{
"size": "800",
"url": "http://d.yimg.com/ec/image/v1/release/31881255?size=800"
}
]
}
},
我遇到了就是我只有在「軌道」能夠將數據的問題的一個片段。我想檢索更多數據。 「相冊」和「藝術家」下的數據。
任何幫助將不勝感激。
謝謝內。我早些時候嘗試過,但沒有奏效。我想我做錯了什麼。它的工作現在。謝謝! – user1210772 2012-03-10 08:07:30