def PID():
record=[]
for page in range(1,10):
    path=get_link('sugar')
    driver.get(path)
    driver.get(path.format(page))
    id=driver.find_elements_by_tag_name('div')
    for i in id:
        results=i.get_attribute('data-id')
        print(results)
I would like get the value of data-id in this div class as shown in the image, the written code prints the data-id along with None Values.
 
     
     
    