英語のウィキペディアの記事のタイトルである WikipediaAPI を考えると、JSON を返す URL があります。
var url = "http://en.wikipedia.org/w/api.php?action=query&prop=description&titles=Unicorn&prop=extracts&exsentences=10&explaintext&format=json";
応答は次のようになります。
{
"query": {
"pages": {
"ramdom_number_here": {
"pageid": ramdom_number_here,
"ns": 0,
"title": "Unicorn",
"extract": "The unicorn is a legendary animal that has been described since antiquity as a beast with a large, pointed, spiraling horn projecting from its forehead."
}
}
}
}
<ramdom_number_here>
記事ごとに変化することを考えると、予測不可能です。
extract
ortitle
の価値をどう捉えて再利用するか?