Skip to content

Python script, which empowers people with no programming background to generate robust leads on a mass scale. This repo will be compiled of various versatile techniques used in lead generation.

commentaries for webdriver added

Madi7e3df8d669d9
diff --git a/yellow-pages/extractor.py b/yellow-pages/extractor.py
index 9f48a35..6532f86 100644
--- a/yellow-pages/extractor.py
+++ b/yellow-pages/extractor.py
@@ -86,7 +86,7 @@ class Yelp(Webdriver):
sleep(3)
while True:
- await self._page.waitForXPath(places_xpath)
+ await self._page.waitForXPath(places_xpath, {'visible': True})
places = len(await self._page.xpath(places_xpath))
logger.debug('%s places found', places)
@@ -94,12 +94,12 @@ class Yelp(Webdriver):
place = (await self._page.xpath(places_xpath))[i]
await place.click()
- await self._page.waitForXPath(inner_xpath)
+ await self._page.waitForXPath(inner_xpath, {'visible': True})
parse(await self._page.content())
# await self._do_retry(self._page.goBack, results_xpath)
await self._page.goBack()
- await self._page.waitForXPath(results_xpath)
+ await self._page.waitForXPath(results_xpath, {'visible': True})
next_button = await self._page.xpath(next_xpath)