Create a new virtual environment for your project: python3 -m venv env Activate the virtual environment: On macOS/Linux: source env/bin/activate On Windows: env\Scripts\activate.bat Install the required packages using pip: pip install requests beautifulsoup4
Create a new Python file scraper.py and copy the sample code into it.
python scraper.py