the program should search for a image in the first loop and add it to a list, in the secon loop should he search till he find a image that isnt already in the list. PyCharm give me the errors that while search = True: and if pic == used is expected.
used = []
search = True
#First Loop
while True:
pic = driver.find_element(By.CSS_SELECTOR,value=".image-post img")
time.sleep(2)
pic_url = pic.get_attribute("src")
pic_title = pic.get_attribute("alt")
used.append(pic)
time.sleep(200)
#Second loop
while search = True:
pic = driver.find_element(By.CSS_SELECTOR, value=".image-post img")
if pic == used
search = True
else:
search = False
used.append(pic)
...