right debug code commented

This commit is contained in:
mose 2019-09-16 08:39:16 +08:00
parent f7d026fe55
commit 134f5ca210

View file

@ -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('-----------------------------------');