댓글 검색 목록

[html] linkinator - 매우 간단한 사이트 크롤러 및 깨진 링크 검사기.

페이지 정보

작성자 운영자 작성일 20-08-16 16:41 조회 689 댓글 0

? 사이트를 돌아 다니며 깨진 링크를 모두 찾으십시오.


저의 최신 정보를 보십시오! 링키네이터는 웹 사이트를 크롤링하고 링크를 확인하기 위한 API 및 CLI를 제공합니다. 다양한 기능이 있습니다.


https://github.com/JustinBeckwith/linkinator 


  • ?원격 사이트 또는 로컬 파일에서 쉽게 스캔 수행
  • ?<a href>뿐만 아니라 링크가 포함 된 모든 요소를 ​​스캔합니다.
  • ?리디렉션, 절대 링크, 상대 링크 등 모든 것을 지원합니다.
  • ?건너 뛸 특정 정규식 패턴 구성

설치 


$ npm install linkinator


명령 사용법 


이를 라이브러리 또는 CLI로 사용할 수 있습니다. CLI를 보자!


$ linkinator LOCATION [ --arguments ]

  Positional arguments

    LOCATION
      Required. Either the URL or the path on disk to check for broken links.

  Flags

    --config
        Path to the config file to use. Looks for `linkinator.config.json` by default.

    --concurrency
          The number of connections to make simultaneously. Defaults to 100.

    --recurse, -r
        Recursively follow links on the same root domain.

    --skip, -s
        List of urls in regexy form to not include in the check.

    --include, -i
        List of urls in regexy form to include.  The opposite of --skip.

    --format, -f
        Return the data in CSV or JSON format.

    --silent
        Only output broken links.

    --timeout
        Request timeout in ms.  Defaults to 0 (no timeout).

    --help
        Show this command.


명령 예 


끊어진 링크에 대한 웹 사이트의 얕은 스캔을 실행할 수 있습니다.


$ npx linkinator http://jbeckwith.com


재미 있었어요. 로컬 파일은 어떻습니까? 링키 네이터는 yinz에 대한 정적 웹 서버를 설정합니다.


$ npx linkinator ./docs


그러나 그것은 최상위 수준의 링크만을 얻습니다. 더 깊이 들어가서 전체 재귀 스캔을 해봅시다!


$ npx linkinator ./docs --recurse


앗, 이런. 나는 그 링크를 확인하고 싶지 않았습니다. 그들을 건너 뛰자 :


$ npx linkinator ./docs --skip www.googleapis.com


--skip 매개 변수는 모든 정규식을 허용합니다! 더 복잡한 일치를 수행하거나 지정된 도메인의 링크 만 스캔하도록 지정할 수도 있습니다.


$ linkinator http://jbeckwith.com --skip '^(?!http://jbeckwith.com)'


출력을 다른 프로그램으로 파이프 할 수 있습니다. --format 옵션을 사용하여 JSON 또는 CSV를 얻으십시오!


$ linkinator ./docs --format CSV


구성 파일 


옵션을 링키 네이터 CLI에 직접 전달하거나 구성 파일을 정의 할 수 있습니다. 기본적으로 linkinator는 현재 작업 디렉토리에서 linkinator.config.json 파일을 찾습니다.


모든 옵션은 선택 사항입니다. 다음과 같아야 합니다.


{
  "format": "json",
  "recurse": true,
  "silent": true,
  "concurrency": 100,
  "timeout": 0,
  "skip": "www.googleapis.com"
}


CWD 외부에서 구성 설정을 로드 하려면 --config 플래그를 linkinator CLI에 전달할 수 있습니다.


$ linkinator --config /some/path/your-config.json



댓글목록 0

등록된 댓글이 없습니다.

웹학교 로고

온라인 코딩학교

코리아뉴스 2001 - , All right reserved.