03-19-2024, 08:57 PM
Hello,
new release API's Gofile
I test this code and it seems to be OK
Link Alive:
https://gofile.io/d/ivAERd
Folder empty:
https://gofile.io/d/22n4sO
https://gofile.io/d/OqzfLj
Link Dead:
https://gofile.io/d/useLGB
https://gofile.io/d/udnsAs
Undefined:
https://gofile.io/d/MJjFB
Best regards
Bzh
new release API's Gofile
I test this code and it seems to be OK
Code:
function gofileBulkCheck()
{
var arr = this.links[0].split("\r\n");
var arrlen = arr.length;
var token;
GM_xmlhttpRequest
(
{
method: 'POST',
url: 'https://api.gofile.io/accounts',
headers: {
'User-agent': 'Mozilla/4.0 [en] (Windows NT 6.0; U)',
},
onload: function(result)
{
var resp = JSON.parse(result.responseText);
token = resp.data.token;
while(arrlen--)
{
postRequest(arr[arrlen], token);
}
}
}
);
function postRequest(gofileLink,token)
{
var linkId = gofileLink.match(/gofile\.io\/d\/(\w+)/)[1];
GM_xmlhttpRequest
(
{
method: "GET",
url: 'https://api.gofile.io/contents/' + linkId + '?wt=4fd6sg89d7s6',
headers: {
'User-agent': 'Mozilla/4.0 [en] (Windows NT 6.0; U)',
'Authorization': 'Bearer ' + token,
},
onload: function (result)
{
var res = JSON.parse(result.responseText);
if (res.status!=="ok" || res.status=='error-notFound' || res.data.totalSize=="0" || res.data.createTime==null)
{
DisplayTheCheckedLinks([gofileLink], 'adead_link');
return;
}
else
{
DisplayTheCheckedLinks([gofileLink], 'alive_link');
return;
}
}
}
);
}Link Alive:
https://gofile.io/d/ivAERd
Folder empty:
https://gofile.io/d/22n4sO
https://gofile.io/d/OqzfLj
Link Dead:
https://gofile.io/d/useLGB
https://gofile.io/d/udnsAs
Undefined:
https://gofile.io/d/MJjFB
Best regards
Bzh


![[Image: image.png]](https://i.postimg.cc/DygY8w1Z/image.png)