I'm very new to programming and to stackoverflow rules in particular.
Please let me know if I missed any important information to indicate in my question.
I'm looking for a simple solution to parallel my get requests using selenium module on Python.
I have a list of 10,000 web links of restaurants on tripadvisor.com. I want my script to get html data from each link and find a text under a certain html class name. In the end my script should take each text grabbed and put it in a dictionary next to the link from the list.
Sending get requests sequentially link by link will take crazy amount of time.
How can I parallel these requests to minimize timing?
Now my code looks like this:
from selenium import webdriver
# PATH = 'path to driver'
driver = webdriver.Chrome(executable_path=PATH)
nans_dict = {}
for i in nans_list:
a = []
driver.get('https://www.tripadvisor.com' + i)
for element in driver.find_elements_by_class_name('drUyy'):
a.append(element.text + ' ')
nans_dict[i] = a
Thank you for the comprehensive answers in advance.