alc/links-checker

检查文件中的URL / 爬取sitemap.xml并查找损坏的链接

v1.1.1 2016-12-07 16:57 UTC

This package is auto-updated.

Last update: 2024-09-19 02:36:32 UTC


README

全局安装

composer global require alc/links-checker

# Make sure you have export PATH in your ~/bashrc
export PATH=~/.config/composer/vendor/bin:$PATH

用法

check:file 命令

# Check urls contained in file (one per line)
phplchk check:file tests/input.txt

# Check urls and write results in csv file
phplchk check:file tests/input.txt -o tests/output.csv

# Check urls from remote file
phplchk check:file https://raw.githubusercontent.com/chemel/links-checker/master/tests/input.txt

# Show help
phplchk check:file --help

check:sitemap 命令

# Check sitemap.xml
phplchk check:sitemap http://blog.chemel.fr/sitemap.xml

# Check sitemap.xml and write results in csv file
phplchk check:sitemap http://blog.chemel.fr/sitemap.xml -o output.csv

# Crawl sitemap.xml and check links on each pages
phplchk check:sitemap http://blog.chemel.fr/sitemap.xml --level=2 
phplchk check:sitemap http://blog.chemel.fr/sitemap.xml -o output.csv --level=2 

# Show help
phplchk check:sitemap --help

sitemap:crawl 命令

# Dump sitemap urls
phplchk sitemap:crawl http://blog.chemel.fr/sitemap.xml > sitemap.txt

check:seo 命令

# Check + extract meta title, description, keywords, canonical url
phplchk check:seo tests/seo-input.txt tests/seo-output.csv

url:generator 命令

phplchk url:generator 'http://blog.chemel.fr/page/{1-10}/' > check-me.txt