Comments (7)
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.
Keeping it open for future.
from href-checker.
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.
- 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
- 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.
Thanks for the response, do you have an example of how link can be ignored using the node library? Thanks again!
from href-checker.
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.
Thank you, will play around with it
from href-checker.
- 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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from href-checker.