This project is a multi URL scraper designed to extract specific information from multiple web pages. It uses XPath for parsing HTML and fuzzy matching to find relevant text. The results are stored in a structured format (Excel) for easy analysis. The scraper is secure and handles storage of credentials securely. The project is easy to configure and use, making it a versatile tool for web scraping tasks.
- Multi-URL Scraping: Scrape multiple URLs in a single run.
- XPath Parsing: Use XPath to accurately parse HTML content.
- Fuzzy Matching: Implement fuzzy matching to find relevant text even if it is not an exact match.
- Structured Results: Store results in a structured format (Excel) for easy analysis.
- Secure Storage: Handle storage of credentials securely.
-
Clone the repository:
git clone https://github.com/Abinet508/multi-url-scraper.git cd multi-url-scraper -
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Install the dependencies:
pip install -r requirements.txt
-
Configure the scraper:
- Update the
config.jsonfile with the URLs and keywords you want to scrape.
- Update the
-
Run the scraper:
python main_modified.py
-
View the results:
- The results will be stored in the
resultsdirectory in XLSX format.
- The results will be stored in the
- URLs: List of URLs to scrape.
- Keywords: List of keywords for fuzzy matching.
- Storage Path: Directory where credentials and results will be stored.
- Python 3.7+
requestslxmlfuzzywuzzypandasplaywright