This project is a Python script that scrapes a website for HTML, CSS, and JavaScript files. The script uses requests and BeautifulSoup for scraping static content.
Ensure you have Python 3 installed on your system. You will also need to install the necessary libraries listed in requirements.txt.
-
Clone this repository to your local machine.
-
Navigate to the project directory.
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On macOS and Linux:
source venv/bin/activate
-
-
Install the required Python packages using pip:
pip install -r requirements.txt
-
Run the script using Python:
python scrape_website.py
-
When prompted, enter the URL of the website you want to scrape.
Please enter the URL of the website you want to scrape: https://example.com -
The script will output the CSS and JS file links found on the page and save the HTML content to a file named
scraped_page.html. -
CSS and JS files will be downloaded and saved in
cssandjsdirectories respectively.
scrape_website.py: The main script to run the scraper.requirements.txt: The list of Python libraries required to run the script.README.md: This readme file.
This project is licensed under the MIT License. See the LICENSE file for details.