Skip to content

yp-data/Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Justia Lawyer Scraper

This project is a web scraper that extracts lawyer information from Justia's directory of family law attorneys in Chicago, Illinois. The scraper uses Selenium to navigate through multiple pages and collect details such as names, profile links, phone numbers, images, descriptions, and consultation availability.

Features

  • Automated Pagination: Scrapes all available pages.
  • Data Extraction: Collects lawyer details (name, profile link, phone, website, etc.).
  • CSV Export: Saves the scraped data into justia_lawyers_selenium.csv.
  • Error Handling: Handles missing elements to avoid crashes.
  • Headless Mode: Runs without opening a browser window.

πŸ› οΈ Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/yourusername/justia-scraper.git
cd justia-scraper

2️⃣ Install Dependencies

Ensure you have Python 3.x installed. Then, install the required packages:

pip install selenium webdriver-manager pandas

3️⃣ Run the Scraper

python justia_scraper.py

πŸ“‚ Project Structure

justia-scraper/
│── justia_scraper.py      # Main scraping script
│── justia_lawyers_selenium.csv  # Output file (generated after running the script)
│── README.md              # Documentation
│── requirements.txt       # List of dependencies

πŸ“ Dependencies

  • selenium β†’ For browser automation
  • webdriver-manager β†’ Auto-downloads the correct ChromeDriver
  • pandas β†’ For saving scraped data in CSV format

To install dependencies manually, run:

pip install -r requirements.txt

Notes

  • This scraper runs in headless mode to improve efficiency.
  • Ensure that Google Chrome is installed on your system.
  • IP Blocking Warning: Running the scraper too frequently may lead to blocking. Consider using proxies if needed.

Future Enhancements

  • Add proxy rotation to avoid detection.
  • Improve error handling and logging.
  • Support other lawyer categories or cities.

Developed by Yuri P. πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages