Skip to content

armgit / mwmbl

Public Imported from GitHub
0

An open source, non-profit web search engine

docs: add initial README for mwmbl crawler

thiswillbeyourgithub (aider)5d25317116b2
diff --git a/README.md b/README.md
index 3f793da..288e980 100644
--- a/README.md
+++ b/README.md
@@ -52,6 +52,7 @@ If you have spare computer power and bandwidth, the best way you can help is
by running our [command line
crawler](https://github.com/mwmbl/crawler-script) with as many threads
as you can spare.
+Some documentation about the new crawler can be found in its [README.md](./mwmbl/crawler/README.md).
If you have Firefox you can help out by [installing our
extension](https://addons.mozilla.org/en-GB/firefox/addon/mwmbl-web-crawler/). This
diff --git a/mwmbl/crawler/README.md b/mwmbl/crawler/README.md
new file mode 100644
index 0000000..8677454
--- /dev/null
+++ b/mwmbl/crawler/README.md
@@ -0,0 +1,32 @@
+# Mwmbl Crawler
+
+This module handles the distributed crawling functionality for Mwmbl. The crawler allows community members to crawl web pages and submit the results to build Mwmbl's search index.
+
+## Environment Variables
+
+The crawler can be configured using the following environment variables:
+
+### Crawling Assignment
+- `REASSIGN_MIN_HOURS` (default: 5) - Hours before a URL assigned to a client is reassigned if not crawled
+- `BATCH_SIZE` (default: 100) - Number of URLs in each crawling batch
+- `MAX_URLS_PER_TOP_DOMAIN` (default: 100) - Maximum URLs per top domain (for example wikipedia, reddit, etc)
+- `MAX_TOP_DOMAINS` (default: 500) - Maximum number of top domains to process
+- `MAX_OTHER_DOMAINS` (default: 50000) - Maximum number of other domains to process
+
+### URL Retrieval Configuration
+- `TIMEOUT_SECONDS` (default: 3) - Timeout for fetching individual URLs
+- `MAX_FETCH_SIZE` (default: 1048576) - Maximum size in bytes to fetch per URL (1MB)
+- `MAX_NEW_LINKS` (default: 50) - Maximum new links to extract from good content paragraphs
+- `MAX_EXTRA_LINKS` (default: 50) - Maximum extra links to extract from non-good paragraphs
+- `MAX_SITE_URLS` (default: 100) - TODO: clarify usage of this variable
+
+### Redis Configuration
+- `REDIS_URL` (default: 'redis://127.0.0.1:6379') - Redis connection URL for URL queues and stats
+
+## Setup
+
+For development setup and deployment configuration, see `./docker-compose.yml` at the root of the repository.
+
+## How It Works
+
+The crawler is part of Mwmbl's distributed approach where community members contribute to building the search index by crawling web pages. See the main [README](../../README.md) for more context on Mwmbl's community-driven approach.