Open ta2edchimp opened 8 years ago
Do you mean when querying Wiki, the names must be TitleCased
?
There's a difference between "Max von Sydow", "Max Von Sydow" and "max von sydow" for example.
An API request to the API:Opensearch
endpoint, prior to fetching the content, should do it.
Successful esponses look like this:
[ "search_query", [ "matching", "result", "titles" ], [ "result", "titles'", "summaries" ], [ "the", "results'", "urls" ]
/w/api.php?action=opensearch&format=json&search=max+Von+sydow returns:
[
"max Von sydow",
[
"Max von Sydow"
],
[
"Carl Adolf \"Max\" von Sydow (/v\u0252n \u02c8si\u02d0do\u028a/; Swedish: [f\u0254n \u02c8sy\u02d0d\u0254v]; born 10 April 1929) is a Swedish actor who became a French citizen in 2002. He has appeared in many films, in many languages, including Swedish, Norwegian, Danish, German, English, French, Italian and Spanish."
],
[
"https://en.wikipedia.org/wiki/Max_von_Sydow"
]
]
Because — paired with the idea of displaying a photo of a person — there would now be up to three requests to be made, I think about only displaying the web site's skeleton on initial page request and load the "is xy still alive?" response deferred, by an additional ajax request ...
What do you think?
... or by keeping the connection open and simply injecting a script in the web page's bottom to fill in the details, when successfully fetched from wiki.
Atm. names are case sensitive ... that could be improved.