This project contains a simple web spider written in Python. It uses venv
for environment management.
- Python 3.10.13
- pip
- Clone the repository:
git clone https://github.com/blackg33/python-spider-boilerplate.git
cd python-spider-boilerplate
- Create a virtual environment
python3 -m venv venv
- Activate the virtual environment: On Unix or MacOS, run:
source venv/bin/activate
On Windows, run:
.\venv\Scripts\activate
- Install the required packages:
pip install -r requirements.txt
Running the Spider To run the spider, use the following command:
scrapy runspider spider.py
Replace spider.py with the name of your spider script.
Deactivating the Virtual Environment When you're done, you can deactivate the virtual environment by running:
deactivate
This will stop the shell session from using the virtual environment and return to using the system-wide Python interpreter and packages.