Giter VIP home page Giter VIP logo

Comments (4)

matkoniecz avatar matkoniecz commented on July 17, 2024

Can you give specific examples?

from broken-link-checker.

banner-prog avatar banner-prog commented on July 17, 2024

Like, if I want to scan for broken links of facebook.com and github.com, I am meant to use the option includedKeywords. However, even if I use that, the tool will scan and give results of broken links such as example.com or instagram.com

from broken-link-checker.

matkoniecz avatar matkoniecz commented on July 17, 2024

please give exact runnable code/command that triggers this bug - it needs to be done as the first step of resolving this bug

from broken-link-checker.

banner-prog avatar banner-prog commented on July 17, 2024

Here is the code

var { SiteChecker } = require("broken-link-checker");
var URL = "https://www.github.com"
const siteChecker = new SiteChecker(
    { 
        excludeInternalLinks: true,
        excludeExternalLinks: false, 
        filterLevel: 1,
        acceptedSchemes: ["http", "https"],
        excludedKeywords: ["linkedin.com"],
        includedKeywords: ["facebook.com","instagram.com"],
       
    },
    {
        "error": (error) => {
            console.error(error);
        
        },

        "link": (result, customData) => {
            if(result.broken) {
                if(result.http.response && ![undefined, 200].includes(result.http.response.statusCode)) {
                    console.log(`${result.base.original} => ${result.url.original}`);
                }
            }            

        },

        "end": () => {
            console.log("COMPLETED!");
        }
    }
);


siteChecker.enqueue(URL);


from broken-link-checker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.