Skip to content
Advertisement

Selenium taking a lot of time to find element by XPATH

I am trying to scraping name and email of agents from this site. The code firstly captures link to every profile on first page and then visits each profile to get name and email. But the problem is that it is taking alot of time to get anchor tag having name of agent in it. Here’s the code:

JavaScript

Is there any way I can scrape name in lesser time?

Advertisement

Answer

I have change the xpath to identify the anchor tag and remove the new window open in each iteration. hope this will reduce some time.

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement