mirror of
https://github.com/tiennm99/crawl-prime.git
synced 2026-06-08 10:12:37 +00:00
main
crawl-prime
Crawl all prime numbers available on http://compoasso.free.fr/primelistweb/page/prime/liste_online_en.php
In 2025, I rewrote this project using Go. The Python version of this project can be found at feature/python branch.
Requirements
- Go 1.18 or higher
- Internet connection to access the prime list website
- Write permissions in the current directory (for
primes.txt)
Installation
-
Clone this repository:
git clone https://github.com/tiennm99/crawl-prime.git cd crawl-prime -
Install Go (if not already installed):
# Download and install Go from https://golang.org/dl/ # Or use your package manager: # Ubuntu/Debian: sudo apt install golang # macOS: brew install go # Windows: Download from official website -
Install dependencies:
go mod tidy -
Run the script:
go run main.go
Usage
The program will automatically:
- Start crawling from prime number 1
- Process pages in batches of 600 primes each
- Write all found primes to
primes.txt - Display progress information during execution
- Stop when it reaches 1,000,000 primes or encounters an error
Output
primes.txt- Contains all crawled prime numbers, one per line
License
This project is for educational purposes. Please respect the terms of service of the prime list website.
Description
Crawl all prime available on http://compoasso.free.fr/primelistweb/page/prime/liste_online_en.php
Languages
Go
100%