Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function verifyLinks(url) {
- request(url, function (error, response, body) {
- if (!error) {
- console.log(response.statusCode);
- var $ = cheerio.load(body);
- links = $('a');
- $(links).each(function (i, link) {
- verifyLinks($(link).attr('href'));
- });
- } else {
- console.log("Error occurred: " + error);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement