A lightweight and efficient web crawler written in Go. This tool crawls a given website, extracts internal links, and generates a report of all discovered pages.
- Crawls web pages starting from a given base URL.
- Extracts and resolves internal links.
- Limits the number of concurrent crawling tasks to avoid overwhelming servers.
- Generates a detailed report of all crawled pages, sorted by the number of links pointing to each page.
-
Clone this repository:
git clone https://github.com/MrKuros/go-crawler.git cd go-crawler -
Build the project
go build
-
Run the script
./crawler <baseURL> <maxConcurrentPages> <maxPages>
./go-crawler "https://example.com" 3 25
=============================
REPORT for https://example.com
=============================
Found 3 internal links to https://example.com/page1
Found 2 internal links to https://example.com/page2golang.org/x/net/html for parsing HTML.
Contributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License. See the LICENSE file for details.