I'm looking to scrape an image from a website into an excel file.
Below is a snippet of my code. This gets the SRC URL and put that into the excel sheet. Is it possible to turn that into the actual image?
if len(driver.find_elements(By.CSS_SELECTOR, '#FMP-target'))>0:
image = driver.find_element(By.CSS_SELECTOR, '#FMP-target').get_attribute('src')
print(image)
images.append(image)
else:
photo = "No photo"
print(photo)
images.append(photo)
driver.quit()
df = pd.DataFrame(zip(images,house_name,description_details,house_price,specs,ratings,cancellation_policy,urls),columns=['Photo','Property Name','Description','Price','Specifications','Ratings','Cancellation Policy','Link'])
df.to_excel(r{file},index=False)
This is the URL I'm testing with.
add_image
.