If I want an article, which exactly match the page query (e.g. if it's "dog"), then there's no problem, however, if it doesn't match exactly (e.g. "red dog"), then I see: "Red dog or Red Dog may refer to:" and nothing after this sentence. There's no article with references. I'm not so sure where's the problem, or how to fix it.
$.ajax({
url: urls,
data: {
format: "json",
action: "parse",
page: match[1],
prop:"text",
section:0,
},
dataType: 'jsonp',
headers: {
'Api-User-Agent': 'Example/1.1 (https://www.example.tech/;
admin@example.tech) BasedOnUnisoftdevScipt/1.0'
},
success: function (data) {
console.log(data)
var markup = data.parse.text["*"];
var i = $('<div></div>').html(markup);
i.find('a').each(function() {
$(this).replaceWith($(this).html()); });
i.find('sup').remove();
i.find('.mw-ext-cite-error').remove();
var rplo ='<p>~ Chatbot wrote: <q id="writeajaxed"></q></p>';
$('#context').html(youwrote + message + '</q></p>' + rplo);
$('#writeajaxed').html($(i).find('p'));
}
});
Thnx