Skip to content

Upasanadhameliya/Advocate-Scrape-Selenium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scraping advocate websites using SELENIUM - PYTHON

Project contains source code for scraping two websites containing information about lawyers. Code uses Google Chrome driver and is made to run on Windows 10 OS.

Python version 3.8

To run the code locally:

  • IMP: You would need to install the web driver for your browser for selenium to work
  • Clone the repository
  • cd in the Advocate folder
  • Create a virtual environment using venv or conda
  • Activate your environment and do pip install -r requirements.txt
  • Change your driver path in the files
  • Line 60, 27: driver = webdriver.Chrome("D:\\your\\path\\to\\driver\\here\\chromedriver.exe")
  • cd in the respective directory and python <script_name>_scrape.py

Cyprus Website

https://www.cyprusbar.org/CypriotAdvocateMembersPage.aspx ezgif com-gif-maker

cd cyprus
python cyprus_scrape.py
Output

2021-08-27-11-31-43

Davac Website

http://vyhledavac.cak.cz ezgif com-gif-maker_davac

cd davac
python davac_scrape.py

NOTE: The scraping would be slow as there is a lot of intialisation for this website. So don't close the program and keep your patience. It would work. Only close if there is some error displayed :D

Output

2021-08-27-11-39-44