Commit 6c5bf64b authored by yPhil's avatar yPhil

WIP: All tests OK, no domain

parent 51afb909
Pipeline #104362 passed with stage
in 39 seconds
......@@ -32,10 +32,11 @@ module.exports = function(url, callback) {
does_it_render(feed, function(err, renders) {
if (err) return callback(err);
if (renders) {
console.log('renders: (%s)', renders);
return callback(null, feed);
}
console.log('feed: (%s)', feed);
request(feed, function(err, res, body) {
const $ = cheerio.load(body);
......@@ -49,6 +50,7 @@ module.exports = function(url, callback) {
}
if ($('a[href$=".xml"]').length > 0) {
// console.log('(%s) Found A: %s: (%s)',url, $('a[href$=".xml"]').attr('href'));
feed = $('a[href$=".xml"]').attr('href');
}
......@@ -56,18 +58,22 @@ module.exports = function(url, callback) {
return callback(null, feed);
});
});
// console.log('whoa: (%s)');
for (let i = 0; i < usualSuspects.length; i++) {
does_it_render(usualSuspects[i], function(err, renders) {
if (renders) {
console.log('dir: (%s)', usualSuspects[i]);
feed = usualSuspects[i];
}
});
}
// console.log('whoa: (%s)');
for (let i = 0; i < usualSuspects.length; i++) {
does_it_render(usualSuspects[i], function(err, renders) {
// if (err) return callback(err);
if (renders) {
// console.log('dir: (%s)', usualSuspects[i]);
feed = usualSuspects[i];
}
});
}
});
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment