Commit 51afb909 authored by yPhil's avatar yPhil

WIP: All tests OK, no domain

parent e248ca29
Pipeline #104352 failed with stage
in 30 seconds
......@@ -29,16 +29,6 @@ module.exports = function(url, callback) {
if (p.host.endsWith('youtube.com') && p.path.startsWith('/channel') && p.path.split('/').length === 3)
return callback(null, videoPrefix + p.path.split('/')[2]);
// 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];
}
});
}
does_it_render(feed, function(err, renders) {
if (err) return callback(err);
if (renders) {
......@@ -68,6 +58,17 @@ module.exports = function(url, callback) {
});
});
// 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];
}
});
}
};
function does_it_render(url, callback) {
......
......@@ -19,6 +19,14 @@ describe('feedrat', function() {
});
});
// it('can find a feed from the usual suspects list ROOT', function(done) {
// feedrat('https://yphil.bitbucket.io/testing.html', function(err, url) {
// if (err) return done(err);
// url.should.eql('https://yphil.bitbucket.io/feed.xml');
// done();
// });
// });
// it('handles a website that has blocked us', function(done) {
// feedrat('http://www.leparisien.fr/', function(err, url) {
// if (err) return done(err);
......
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