GithubHelp home page GithubHelp logo

urlint / urlint Goto Github PK

View Code? Open in Web Editor NEW
110.0 3.0 3.0 1.02 MB

Checking the availability of links from your CLI

Home Page: https://urlint.co

License: MIT License

JavaScript 100.00%
urls linter ping

urlint's Introduction

urlint

Last version Coverage Status NPM Status

Features

  • Collect all the links behind a URL.
  • Get HTTP status code and group (2xx, 3xx, etc) per every link.
  • HTML & XML (RSS/Atom/Feed/Sitemap) markup supported.
  • Universal UNIX interface, easy to integrate with any existence system or tooling.

Usage

as CLI

The nature of the program is to be used as CLI:

$ npx urlint

We recommend execute it using npx over install it globally to have the benefits of the latest version.

Also, the CLI supports load the configuration via:

  • A .urlintrc file, written in YAML or JSON, with optional extensions: .yaml/.yml/.json/.js.
  • A urlint.config.js file that exports an object.
  • A urlint key in your package.json file.

See options to know what kind of settings can be place there.

as Node.js module

Alternatively you can use it from Node.js.

See @urlint/core to know more.

License

urlint © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.

kikobeats.com · GitHub @Kiko Beats · Twitter @Kikobeats

urlint's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar kikobeats avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

urlint's Issues

An in-range update of @urlint/core is breaking the build 🚨

Version 1.4.3 of @urlint/core was just published.

Branch Build failing 🚨
Dependency @urlint/core
Current Version 1.4.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

@urlint/core is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Install on MacOS High Sierra 10.13.3

Hello

After installation # npm insall urlint-cli, this message display :

$ npm install urlint-cli
npm WARN temp No description
npm WARN temp No repository field.
npm WARN temp No license field.


But when you want tu use :

$ urlint
zsh: command not found: urlint

Seb

Error: Chromium revision is not downloaded

I just came across this package and decided to give it a go. Seems like there is an issue following the bump of Puppeteer in adblocker@1.4.0. Reproduction steps on macOS (Node 12):

npm install urlint -g

/usr/local/bin/urlint -> /usr/local/lib/node_modules/urlint/bin/cli/index.js
npm WARN @cliqz/[email protected] requires a peer of puppeteer@^2.0.0 but none is installed. You must install peer dependencies yourself.

+ [email protected]
urlint example.com
42.4s ⠹  ← timer keeps ticking forever

ctrl+c ↓

Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
    at Launcher.launch (/usr/local/lib/node_modules/urlint/node_modules/puppeteer-core/lib/Launcher.js:119:15)
    at async pRetry.onFailedAttempt.debug.attemptNumber (/usr/local/lib/node_modules/urlint/node_modules/browserless/src/index.js:35:26)
    at async RetryOperation._fn (/usr/local/lib/node_modules/urlint/node_modules/p-retry/index.js:41:12)
Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
    at Launcher.launch (/usr/local/lib/node_modules/urlint/node_modules/puppeteer-core/lib/Launcher.js:119:15)
    at async pRetry.onFailedAttempt.debug.attemptNumber (/usr/local/lib/node_modules/urlint/node_modules/browserless/src/index.js:35:26)
    at async RetryOperation._fn (/usr/local/lib/node_modules/urlint/node_modules/p-retry/index.js:41:12)
Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
    at Launcher.launch (/usr/local/lib/node_modules/urlint/node_modules/puppeteer-core/lib/Launcher.js:119:15)
    at async pRetry.onFailedAttempt.debug.attemptNumber (/usr/local/lib/node_modules/urlint/node_modules/browserless/src/index.js:35:26)
    at async RetryOperation._fn (/usr/local/lib/node_modules/urlint/node_modules/p-retry/index.js:41:12)
Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
    at Launcher.launch (/usr/local/lib/node_modules/urlint/node_modules/puppeteer-core/lib/Launcher.js:119:15)
    at async pRetry.onFailedAttempt.debug.attemptNumber (/usr/local/lib/node_modules/urlint/node_modules/browserless/src/index.js:35:26)
    at async RetryOperation._fn (/usr/local/lib/node_modules/urlint/node_modules/p-retry/index.js:41:12)
Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
    at Launcher.launch (/usr/local/lib/node_modules/urlint/node_modules/puppeteer-core/lib/Launcher.js:119:15)
    at async pRetry.onFailedAttempt.debug.attemptNumber (/usr/local/lib/node_modules/urlint/node_modules/browserless/src/index.js:35:26)
    at async RetryOperation._fn (/usr/local/lib/node_modules/urlint/node_modules/p-retry/index.js:41:12)

An in-range update of @urlint/core is breaking the build 🚨

Version 1.3.4 of @urlint/core was just published.

Branch Build failing 🚨
Dependency @urlint/core
Current Version 1.3.3
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

@urlint/core is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of beauty-error is breaking the build 🚨

The dependency beauty-error was updated from 1.0.0 to 1.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

beauty-error is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v1.0.1

Bug Fixes

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Cannot read property 'toString' of undefined

When I try to run on http://www.rdias.com.br I get the following error, after it verified some of the urls:

TypeError: Cannot read property 'toString' of undefined
at getStatusCodeId (/home/paulo/.npm-packages/lib/node_modules/urlint/bin/view/colorize.js:13:50)
at getStatusCodeColor (/home/paulo/.npm-packages/lib/node_modules/urlint/bin/view/colorize.js:16:14)
at byStatusCode (/home/paulo/.npm-packages/lib/node_modules/urlint/bin/view/colorize.js:21:17)
at renderLink (/home/paulo/.npm-packages/lib/node_modules/urlint/bin/view/render.js:29:44)
at /home/paulo/.npm-packages/lib/node_modules/urlint/bin/view/render.js:48:19
at arrayMap (/home/paulo/.npm-packages/lib/node_modules/urlint/node_modules/lodash/lodash.js:639:23)
at map (/home/paulo/.npm-packages/lib/node_modules/urlint/node_modules/lodash/lodash.js:9554:14)
at /home/paulo/.npm-packages/lib/node_modules/urlint/bin/view/render.js:36:18
at /home/paulo/.npm-packages/lib/node_modules/urlint/node_modules/lodash/lodash.js:3543:27
at /home/paulo/.npm-packages/lib/node_modules/urlint/node_modules/lodash/lodash.js:4905:15

An in-range update of html-get is breaking the build 🚨

Version 1.0.3 of html-get was just published.

Branch Build failing 🚨
Dependency html-get
Current Version 1.0.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

html-get is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 2 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @urlint/core is breaking the build 🚨

Version 1.4.1 of @urlint/core was just published.

Branch Build failing 🚨
Dependency @urlint/core
Current Version 1.4.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

@urlint/core is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of html-get is breaking the build 🚨

Version 1.0.2 of html-get was just published.

Branch Build failing 🚨
Dependency html-get
Current Version 1.0.1
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

html-get is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 3 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Add follow urls

Currently, the only way to follow more than one URL is providing a sitemap URL.

The problem is, if your site doesn't have a sitemap, then you need to provide one by one URL ¯_(ツ)_/¯

Two ideas to avoid that situation could be:

Discover URLs dynamically

Be possible lint new URLs at the moment you expand the initial set of URLs.

For leveraging the feature, it should be limit the deep to avoid an infinite process that never ends.

Example

# Default value. The initial url of sets detected is not expanded.
$ urlint https://kikobeats.com --deep-level=0

# After the initial set of urls detected
# the urls will be expanded an added in the process 
$ urlint https://kikobeats.com --deep-level=1

More than one URL as input

Currently just is possible provide one url, so let make possible provide more than one.

Then unify all the urls detected for avoid analyze the same url more than once.

The URLs could be provided from different ways, for example, using a JSON, CSV, Text plain.

An in-range update of reachable-url is breaking the build 🚨

Version 1.1.3 of reachable-url was just published.

Branch Build failing 🚨
Dependency reachable-url
Current Version 1.1.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

reachable-url is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 2 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Install on MacOS High Sierra 10.13.3 - With Install Global

Hello

I have also test with install on global, but i have this error.

$ urlint
/usr/local/lib/node_modules/urlint-cli/bin/cli/index.js:67
;(async () => {
^

SyntaxError: Unexpected token (
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)

Sébastien

An in-range update of @urlint/core is breaking the build 🚨

Version 1.4.2 of @urlint/core was just published.

Branch Build failing 🚨
Dependency @urlint/core
Current Version 1.4.1
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

@urlint/core is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

[Question] Does urlint account for broken anchor links (website.com/link#anchor)?

Quickly glancing at the source code it wasn't clear whether or not this library accounts for checking whether anchor links are broken or not. In other words, does urlint check to see if the link's resolved content has an associated id element with a value of anchor in its markup, for the hypothetical link of link.com/page#achor?

Base64 images reported as 404

When running npx urlint our-test-domain.com, it gives a 404 status on a bunch of base64 images. Perhaps it should not try to follow base64 uri's, or data-uri's in general?

2xx 270
3xx 6

4xx 14

404 data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAlgCWAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQ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AAAAAEBAQQIY0MCBjrI/YkGAQQWl/zKJgEFWubyYAECIbOmDyHt3DcHVu/5dgIDDUDauRgEDi683ToBBg0hlv3+piYLAQYMGm706mMXCQMFChVN4bgxEAUBAwkSM8P0dhoKAwIHDiGbzDwRBgICBgsVFwoDAQMFBAFixcEVAAAACXBIWXMAABcRAAAXEQHKJvM/AAAAB3RJTUUH5AMDBzYLD5V4cgAAANtJREFUGBmNwbFKQmEcxuH316fH4HgmCxok0itoaWhyLZy6gUAMnB1aihxqESoaGhpqafBC6gKChKaGdjG0xUqC/H+f52Bjz6N/cwpYib9+lUHGlTCDH6WWJOXXoihq58uVSHNIVcyB4Ja3b3ksV4AG3vQenmXYhAYZ3fDyKbFFCyYxqSv6E7ENzZiFLjxSA/aq/HGKG24497q6Xlh4yKE6XofUMUbFXbwTgg6elOzEmCPMGaaHTHEfc8g55u5DyEtaZK7HEgqSNsHlSMYpmD7VcuZiJA9lStK75mZu0ijisbffhQAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAASUVORK5CYII= +1ms

... more

HTTP Code error not correct

Hello

I have make a test :

capture d ecran 2018-04-23 a 21 07 19

When i see the scan result, you delete "www."

capture d ecran 2018-04-23 a 21 07 29

And you can see lot of 500, but it is not 500 but 301 :)

Have a good day :)

Detect dynamic urls from scripts

Dynamic urls create for scripts are not detected, for example:

	<script>
		(function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){
		(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
		m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
	})(window,document,"script","//www.google-analytics.com/analytics.js","ga");
		ga("create", "UA-34372837-2", "auto");
		ga("send", "pageview");
	</script>

Related:

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.