Posts: 2
Threads: 1
Joined: Aug 2022
Reputation:
0
can you add https://gofile.io/
and a sample for the custom rule would be helpful. is a rule multiple command per line or all commands in a line
can you add gofile?
Code: https://gofile.io/d/KSdtm2
Posts: 1,126
Threads: 58
Joined: Feb 2016
Reputation:
358
i would need a sample live link, that one is dead
Posts: 2
Threads: 1
Joined: Aug 2022
Reputation:
0
Here
https://gofile.io/d/0soNmM
Also can i have a sample of what a custom rule looks like
Posts: 1,126
Threads: 58
Joined: Feb 2016
Reputation:
358
Sorry that host can not be added, the page source code for live links and dead links are the same.
to see how to make custom rules open the config page in the tampermonkey dropdown window or by hitting CTRL+ALT+C
goto the custom rules tab and click on "click here to show/hide the reference" and it shows how to make a custom rule.
@customrule = filehost name
@baseurl = the main address of the filehost
@alivematch = something in the download page source code that is unique to only live links
@deadmatch = something in the download page source code that is unique to only dead links
A example custom rule would look something like this...
@customrule k2s.cc
@baseurl k2s.cc
@alivematch View File
@deadmatch error 404
Posts: 17
Threads: 3
Joined: Jan 2023
Reputation:
16
Adding Domain
Api function
Code: if (GM_getValue("Check_gofile_dot_io_links", false))
{
addHost(
"gofile", //hostname
"gofile\\.io\/d\/\\w+", //linkregex
"//a[contains(@href,'gofile.io')]", //xpath
100000, //blocksize
null, //corrmatch
null, //corrreplwhat
null, //corrreplwith
null, //separator
null, //api url
null, //postdata
null, //linkregex
null, //liveregex
null, //deadregex
null, //unavaregex
gofileBulkCheck //function delegate
)
}
Bulk Check
Code: function bayfilesBulkCheck()
{
var arr = this.links[0].split("\r\n");
var i = arr.length;
while(i--)
{
postRequest(arr[i]);
}
function postRequest(bayfilesLink)
{
var id = bayfilesLink.match(/bayfiles\.(?:com|net)\/(?:p\/|)(\w+)/)[1];
GM_xmlhttpRequest(
{
method: "GET",
url: 'https://api.bayfiles.com/v2/file/' + id + "/info",
headers: {
'User-agent': rUA(),
'Content-type': 'application/json',
'Referer': ""
},
onload: function (result)
{
var res = $.parseJSON(result.responseText);
if (res.status == false)
{
DisplayTheCheckedLinks([id], 'adead_link');
return;
}
if (res.status == true)
{
DisplayTheCheckedLinks([id], 'alive_link');
}
}
});
}
}
Posts: 1,126
Threads: 58
Joined: Feb 2016
Reputation:
358
bayfiles bulk check code ?
Posts: 17
Threads: 3
Joined: Jan 2023
Reputation:
16
I notice after posting that I have copied wrong code. After that I need to wait for 24 hours to correct it. here it is
Code: function gofileBulkCheck()
{
var arr = this.links[0].split("\r\n");
var arrlen = arr.length;
var token;
GM_xmlhttpRequest
(
{
method: 'GET',
url: 'https://api.gofile.io/createAccount',
headers: {
'User-agent': 'Mozilla/4.0 [en] (Windows NT 6.0; U)',
'Content-type': 'application/x-www-form-urlencoded',
'Referer': ''
},
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/getContent?contentId=' + linkId + '&token=' + token + '&websiteToken=12345',
onload: function (result)
{
var res = JSON.parse(result.responseText);
if (res.status=="ok")
{
DisplayTheCheckedLinks([gofileLink], 'alive_link');
return;
}
if (res.status=='error-notFound')
{
DisplayTheCheckedLinks([gofileLink], 'adead_link');
return;
}
}
}
);
}
}
Posts: 1,126
Threads: 58
Joined: Feb 2016
Reputation:
358
Thanks again, I appreciate the help
Posts: 17
Threads: 3
Joined: Jan 2023
Reputation:
16
(03-05-2023, 04:32 AM)mental Wrote: Thanks again, I appreciate the help
You are welcome, anymore such hosts similar to gofile which are not added. May be I can have a crack
Posts: 1,126
Threads: 58
Joined: Feb 2016
Reputation:
358
none at the moment that i can think of, but i am sure there will be in the future.
|