Giter Site home page Giter Site logo

Comments (7)

sidvishnoi avatar sidvishnoi commented on June 4, 2024 1

Not as of now, but it's something I want to support. Both ignoring errors/warnings and ability to not test specific link/patterns. Will need some time and energy for that. PRs welcome.

BTW, you can ignore the result by using the node library (instead of CLI).

(This project is unmaintained as of now)

from href-checker.

sidvishnoi avatar sidvishnoi commented on June 4, 2024 1

Keeping it open for future.

from href-checker.

DawidOskwarek avatar DawidOskwarek commented on June 4, 2024 1

@sidvishnoi

I was playing around with the tool and found few issues which make it not reliable. Not sure if this tool will be supported in the future but I'm just leaving the two main issues here if anyone wants to ever look into it.

  1. Sometimes the tool doesn't scan the website at all, it will run the command and return nothing. The scan did not occur and there is no error code. Basically it returns as success without a scan. It will usually happen twice for every 10 tries/scans for me
  2. When you set concurrency option to 1 then it will not scan all the pages on the website, but if you set it to 2 or higher then it will scan everything

Great tool overall, I think it would be useful for a lot of people but at the moment I believe it needs few fixes. Thanks for your help

from href-checker.

DawidOskwarek avatar DawidOskwarek commented on June 4, 2024

Thanks for the response, do you have an example of how link can be ignored using the node library? Thanks again!

from href-checker.

sidvishnoi avatar sidvishnoi commented on June 4, 2024

From the README, something like following:

const { checkLinks } = require("href-checker");

for await (const result of checkLinks(url, options)) {
	console.log(result.type);
	// -> "samePage", "sameSite", "offSite"

	console.log(result.input);
	// -> {
	//     "link": string,           // URL of page being visited.
	//     "count": number,          // Number of occurences of URL.
	// }

	console.log(result.output);
	// -> {
	//     "pageExists": boolean,   // Page resolved with HTTP 20* code.
	//     "status": number,        // HTTP status code.
	//     "fragExists": boolean,   // Element corresponding to fragment exists.
	//     "error": Error,          // Error, if any.
	// }

        if (!result.output.pageExists) {
                if (result.output.link === SOME_LINK) {
                        // do nothing
                } else {
                        // log warning/error
                }
        }
}

You can also check how the CLI does it: https://github.com/sidvishnoi/href-checker/blob/main/cli.ts

from href-checker.

DawidOskwarek avatar DawidOskwarek commented on June 4, 2024

Thank you, will play around with it

from href-checker.

sidvishnoi avatar sidvishnoi commented on June 4, 2024
  1. Sometimes the tool doesn't scan the website at all, it will run the command and return nothing. The scan did not occur and there is no error code. Basically it returns as success without a scan. It will usually happen twice for every 10 tries/scans for me

Can you share the URL? Or does it happen with almost every URL?

Can you file separate issues for above? Thanks!

from href-checker.

Related Issues (1)

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.