Skip to main content

A compact, multi-threaded web crawler for desktop (PansiluBot) and mobile (MethmiBot) modes

Project description

Crawlier — Alpha v0.0.0.1

A compact, friendly README for the Crawlier project (PansiluBot / MethmiBot).


What is Crawlier?

Crawlier is a Python web crawler that supports both a desktop mode (PansiluBot) and a mobile mode (MethmiBot). It focuses on practical, configurable crawling with useful data extraction features such as metadata, links, forms, images, files, technology detection, and optional CAPTCHA integration.

Features

  • Multi-threaded crawling
  • Configurable crawl depth and per-request delay
  • Optional respect for robots.txt (toggleable)
  • Keyword, metadata, images, videos, forms, files and social link extraction
  • Technology detection and basic SEO analysis
  • Outputs to JSON, CSV and an SQLite database
  • Optional CAPTCHA solver integration (requires external service)
  • Live logging support (suitable for UIs like Gradio)

Quick Install

Clone the repo and install dependencies:

git clone https://github.com/yourusername/crawlier.git
cd crawlier
pip install -r requirements.txt

Run tests (optional):

python -m unittest discover tests

Note: Python 3.10+ recommended.


CLI Usage

Run a basic crawl:

python -m crawlier -d example.com -m pc

Deep crawl (mobile UA, many threads):

python -m crawlier -d example.com -m mobile -t 20 --delay 0.5 --depth 5

Ignore robots.txt (only if you have permission):

python -m crawlier -d example.com -m pc --no-robots

CLI options summary:

  • -d, --domain : Target domain to crawl (required)
  • -m, --mode : Crawler mode (mobile / pc), default: pc
  • -t, --threads : Max concurrent threads (default: 10)
  • --delay : Delay between requests in seconds (default: 1.0)
  • --depth : Maximum crawl depth (default: 3)
  • --no-robots : Ignore robots.txt rules
  • --captcha-key : API key for CAPTCHA solving service
  • -o, --output : Output file (default: crawl_results.json)
  • --db : SQLite database file (default: crawl_data.db)

Python API (programmatic)

Use run_crawl() for live logs (generator style):

from crawlier import run_crawl

for log in run_crawl("https://example.com", mode="pc", max_threads=5, delay=1, max_depth=2):
	print(log)

Use the Crawlier class directly for fine-grained control:

from crawlier import Crawlier

crawler = Crawlier(
	target_domain="example.com",
	mode="pc",
	max_threads=5,
	delay=1,
	max_depth=2,
	respect_robots=True,
	captcha_solver=None,
	db_file="crawl_data.db"
)

crawler.start_crawl()
crawler.save_results("crawl_results.json")
crawler.close()

Output

Crawlier writes:

  • JSON output (default crawl_results.json)
  • CSV export of URL details
  • An SQLite DB (default crawl_data.db)
  • A human-friendly text report alongside JSON (if enabled)

Make sure the output/ directory exists before running, or provide a path that does.


Example: run_crawl() with mobile UA

for log in run_crawl(
	url="https://example.com",
	mode="mobile",
	max_threads=10,
	delay=0.5,
	max_depth=3,
	ignore_robots=False
):
	print(log)

Changelog — Alpha v0.0.0.1

  • Initial release
  • Supports PC (PansiluBot) and Mobile (MethmiBot) modes
  • Multi-threaded crawling with configurable depth/delay
  • Robots.txt respect toggle
  • Optional CAPTCHA solving (requires external service)
  • Live logging for UI integration (Gradio)

Notes & Tips

  • Use conservative max_threads / delay values on large sites to avoid rate-limiting.
  • Respect site terms of service and robots.txt unless you have permission to ignore it.
  • For CAPTCHA handling or browser-level JS challenges, integrate a headless browser or external solver.

If you'd like, I can also:

  • add badges (build / python version)
  • create a minimal setup.py / pyproject.toml
  • extract requirements.txt and validate imports

Enjoy!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crawlier-0.0.0.1.tar.gz (39.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crawlier-0.0.0.1-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file crawlier-0.0.0.1.tar.gz.

File metadata

  • Download URL: crawlier-0.0.0.1.tar.gz
  • Upload date:
  • Size: 39.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for crawlier-0.0.0.1.tar.gz
Algorithm Hash digest
SHA256 8cea92ce416a1f45d6f03371e75001f96232c3f2cd71aa6db61239a3e16c4bd1
MD5 c07da58cd0fbb9c89d5734fc2c00d7a9
BLAKE2b-256 a9ffc8036f89117df0540073d94c325f551cb7815638efcdd8b19ca93e79d1ab

See more details on using hashes here.

File details

Details for the file crawlier-0.0.0.1-py3-none-any.whl.

File metadata

  • Download URL: crawlier-0.0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for crawlier-0.0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fbaefd297c5f027044c2e2941232d3cf7c4aa57c2b8a722c99252dba0d0abfb3
MD5 64b4c8be11e0a4e4c0eaaef185e0254f
BLAKE2b-256 691d29750605d2f97e62f1ea4f29d59153264f8f63d770ea3621b20851a1fdb0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page