right debug code commented
This commit is contained in:
parent
f7d026fe55
commit
134f5ca210
1 changed files with 2 additions and 2 deletions
|
@ -14,8 +14,8 @@ bot.global.text(/(https?:\/\/[^ ,\)"]*)/ig, (b) => {
|
|||
if (!/(coa|pad)\.crapaud-fou\.org/.test(url)) {
|
||||
request_options.url = url;
|
||||
request(request_options, (err, res, body) => {
|
||||
// console.log(JSON.stringify(res, null, 2));
|
||||
if (!err && res.statusCode === 200) {
|
||||
// console.log(JSON.stringify(res.statusCode, null, 2));
|
||||
var re = /<title[^>]*>([^<]*)<\/title>/gi;
|
||||
var match = re.exec(body);
|
||||
if (match && match[1]) {
|
||||
|
@ -28,7 +28,7 @@ bot.global.text(/(https?:\/\/[^ ,\)"]*)/ig, (b) => {
|
|||
extra += " - [invidious](https://invidio.us/watch?v=" + t[1] + ")";
|
||||
}
|
||||
}
|
||||
b.respond("[:link:](" + link + ") _" + match[1] + "_" + extra);
|
||||
b.respond("[>>>](" + link + ") _" + match[1] + "_" + extra);
|
||||
}
|
||||
} else {
|
||||
console.log('-----------------------------------');
|
||||
|
|
Loading…
Reference in a new issue