I want to for loop at specific point.
I know the method range() but this doesn´t help me because I am iterating in a list. Either it doesnt Work with range() or I just dont know.Globally I save this Variable.:
productAmount = 4
Below is the method:
def amazonChecker(keyword):
driver = webdriver.Chrome('./driver/chromedriver.exe')
driver.get(url)
titels = driver.find_elements_by_tag_name('h2')
for titel in titels:
counter =+ 1
if counter < productAmount:
print(titel.text)
sleep(5)
driver.close