Muối Travels - Những chuyến đi và dòng thời gian của Muối
How to check broken links with 404 error on your website using Crawl-404 python tool

How to check broken links with 404 error on your website using Crawl-404 python tool

Broken link(s) or death link(s) is a term that describes links to the hypertext that no longer exist on the Internet for some reason or other🙂. And most of us usually call it "404".

404 can be appear for many reasons but most commonly is webmasters forget to update links again when they change the address of hypertext. This is really not good for seo at all and search engines don't like it. 

Check broken links with 404 error using Python tool

To check broken links with 404 error, you can use many different tools, but if you love python and terminal, you can try reading this article😋.

First, you must need install beautifulsoup4 python package:

pip install beautifulsoup4 -y

If you receive a error like this -bash: pip: command not found , you can run sudo apt install python-pip to fix it.

Now, run the following commands:

git clone https://github.com/yushulx/crawl-404
cd crawl-404
nano broken_links.py

Right now, you will be in text editor. Find text string like this:

request = build_request("http://kb.dynamsoft.com/sitemap.xml")
and replace "http://kb.dynamsoft.com/sitemap.xml" with your sitemap address.
How to check broken links with 404 error on your website using Crawl-404 python tool

Pressing Ctrl + O ,next Enter and next Ctrl + X to exit the text editor. After all, if you do not encounter any problems. Congratulations, you have completed 99% of the work. Now, run this command and Crawl-404 python tool will find all broken links for you. 

python broken_links.py

If you want to stop, use Ctrl+c

Những bài viết tương tự
Chủ đề công nghệ và máy tính

Những bài viết có nội dung liên quan mấy máy tính và lập trình được tớ viết lại thông qua những trải nghiệm và học hỏi của mìnhp

Những bài viết của tớ
Chủ đề remember time
Những kỉ niệm khó quên của tớ được gợi lại thông qua một sự tình cờ và được trình bày dưới góc nhìn của một người thứ ba
Những bài viết của tớ