Skip to main content

No project description provided

Project description

Crawl Bot

Crawl Bot is a Scrapy-based project for crawling one or more domains and extracting page metadata, headings, images, and links.

Table of Contents

Installation

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Usage

Command-Line Usage

scrapy crawl basic_spider -a start_urls=https://example.com -O output.json

Multiple start URLs (comma-separated or JSON list):

scrapy crawl basic_spider \
  -a start_urls=https://example.com,https://example.org \
  -O output.json

Spider Arguments

  • start_urls (required): Comma-separated URLs or a JSON list of URLs.
  • start_url (optional): Alias for a single start URL.
  • allowed_domains (optional): Comma-separated domains or JSON list. Defaults to domains derived from start_urls.
  • include_html (optional): Set to true to include raw HTML in items.
  • download_delay (optional): Override download delay for this run.
  • concurrent_requests (optional): Override global concurrency for this run.
  • concurrent_requests_per_domain (optional): Override per-domain concurrency.
  • autothrottle (optional): Enable or disable AutoThrottle for this run.
  • autothrottle_target_concurrency (optional): Override AutoThrottle target.

SEO Fields

Each item includes SEO-focused metadata such as title and description lengths, robots directives, canonical and AMP links, hreflang tags, Open Graph and Twitter card data, JSON-LD schema types, heading distribution, word counts, link classification, and image alt coverage.

Settings

  • SEO_REQUEST_HEADERS: Default headers injected by middleware.
  • SEO_PROXY_ENABLED, SEO_PROXY_LIST, SEO_PROXY_MODE: Optional proxy rotation.
  • SEO_REQUIRED_FIELDS, SEO_MIN_WORD_COUNT: Pipeline validation controls.
  • HTTPCACHE_ENABLED: Enable HTTP cache for faster development runs.
  • RETRY_HTTP_CODES, RETRY_BACKOFF_BASE, RETRY_BACKOFF_MAX: Retry policy.

Programmatic Usage

from scrapy.crawler import CrawlerProcess
from scrapy.utils.project import get_project_settings

from core.spiders.basic_spider import BasicSpider

process = CrawlerProcess(get_project_settings())
process.crawl(BasicSpider, start_urls=["https://example.com"])
process.start()

Testing

python -m unittest discover -s tests

Project Structure

  • scrapy.cfg: Scrapy configuration file.
  • core/: Scrapy project package.
    • items.py: Item definitions.
    • middlewares.py: Spider and downloader middlewares.
    • pipelines.py: Pipelines for processing scraped data.
    • settings.py: Scrapy configuration settings.
    • spiders/basic_spider.py: Basic spider implementation.
  • requirements.txt: Python dependencies.
  • setup.py: Setup script for installing the package.
  • MANIFEST.in: Files included in package builds.
  • README.md: Project documentation.

Contributing

We welcome contributions! If you have an idea for a new feature or have found a bug, please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

crawl_bot-0.2.1.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

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

crawl_bot-0.2.1-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file crawl_bot-0.2.1.tar.gz.

File metadata

  • Download URL: crawl_bot-0.2.1.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for crawl_bot-0.2.1.tar.gz
Algorithm Hash digest
SHA256 65d3b7b0d79ce12d3ecbd1f6331fb96f004b23614590defb47305b58bf4be09f
MD5 a347b3eaa5e86c9993554c49e2140741
BLAKE2b-256 87e85381ca26d6edf5b9b1de5869d29cba735fb08746134989f8a98e26216aae

See more details on using hashes here.

File details

Details for the file crawl_bot-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: crawl_bot-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for crawl_bot-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e313fd57253b45edf3ba1365cd34d00de03afef59f71e51019a10f96dcc61311
MD5 d3a98eeb246589f16d748c53653770e6
BLAKE2b-256 17cb7d779a738cce4a418ee547771a25735b18c5ee18fb7cae21766a66517c9f

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