I am trying to scrape data from a website that loads the data via javascript and also the main url does not contain page number . The url is site link . To scrape the data i am using python programming langue & selenium. But I got only first page data I couldnt get the other page like page 1 , page 2 , page 3.
I have mention the code that's i am greeting the single page data.
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from bs4 import BeautifulSoup
from selenium import webdriver
url ='https://www.ikh.se/sv/kemikalier--smorjmedlar/fordon-kemikalier'
browser = webdriver.Chrome(ChromeDriverManager().install())
browser.get(url)
data = browser.find_element_by_id('dnsList')
dataList = data.find_elements_by_tag_name('a')
i = 1
for item in dataList:
productName = item.find_element_by_class_name('ProdName')
productPrice = item.find_element_by_class_name('ProdPrice')
productCode = item.find_element_by_class_name('ProdCode')
pName = productName.text
pPrice = productPrice.text
pCode = productCode.text
print( '#SL : ' + str(i) + ' Product Code : ' + pCode + '-->' + 'ProductName : ' + pName + ' Product Price : ' + pPrice)
i = i + 1