==========================
Hi I have the following piece of code working at beginning but after a while giving errors:
Spoiler
Code: Select all
local function callWikipedia(search)
if search then
minetest.log("calling wikipedia with "..search)
local url = vikidia.composeUrl %
{ site = vikidia.site,
title = urlencode(search)
}
local handle = vikidia.api.fetch_async({url = url, timeout = 10})
local result
repeat
result = vikidia.api.fetch_async_get(handle)
until (result.completed)
if(result.code~=200) then
minetest.log("Not found")
return ""
end
return result.data
end
I starts again working perfectly for some time if server reboots. Is there something I need to close for having the behaviour keep on working for long time?2021-11-24 14:44:24: [Server]: calling wikipedia with mucca
2021-11-24 14:44:25: ERROR[CurlFetch]: https://it.vikidia.org/w/api.php?format ... tles=mucca not found (SSL connect error) (response code 0)
2021-11-24 14:44:25: [Server]: Not found