No project description provided
Project description
Crawl
Crawl 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 fromstart_urls.include_html(optional): Set totrueto 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crawl_bot-0.2.0.tar.gz.
File metadata
- Download URL: crawl_bot-0.2.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff418fe3cc5039d0129345077b811f2d96e377dde56592b2253def8862918111
|
|
| MD5 |
a5d5e73edb5bec70c1ec525c41b4b124
|
|
| BLAKE2b-256 |
3112a9af2f30f9cb5eaa3a61e1f51f6196cedf854e153e2545f0d13363bed439
|
File details
Details for the file crawl_bot-0.2.0-py3-none-any.whl.
File metadata
- Download URL: crawl_bot-0.2.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc7a00ae75460293a7da5007445217564e65d665e3720b1d1b5d09e5ba11545d
|
|
| MD5 |
d1592a3bd3a8aca283276defcf7ebfe3
|
|
| BLAKE2b-256 |
81d3ad9eff4f35d0860d08767e934dd574791fd3e2cc944fe4653020e30cbc24
|