# Webcrawlers

> Source: HTB Academy

## Scrapy

Scrapy is a versatile and scalable Python framework for building custom web crawlers. It provides rich features for extracting structured data from websites, handling complex crawling scenarios, and automating data processing. Its flexibility makes it ideal for tailored reconnaissance tasks.

```bash
# Install if you want to use it alone
sudo apt install python3-scrapy
# To use it with ReconSpider
mkdir webcrawlers
cd webcrawlers
python3 -m venv .
source bin/activate
pip3 install scrapy
```

## ReconSpider

> Below is usage of HTB version

* The spider will crawl the target and collect valuable information. After running ReconSpider.py, the data will be saved in a JSON file, results.json. This file can be explored using any text editor.
* Original ReconSpider [here](https://github.com/bhavsec/reconspider)
* Hackthebox version of reconspider [here](https://academy.hackthebox.com/storage/modules/144/ReconSpider.v1.2.zip)

```bash
# Usage
python3 ReconSpider.py http://website.com
```

![](https://1679624655-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEkk28J0B2BeDMuesRMr1%2Fuploads%2Fgit-blob-3057215c8d40f24b2ca5a39b4554675be27b1936%2F2024-10-17-11-07-12.png?alt=media)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://csbygb.gitbook.io/pentips/tools/web-crawlers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
