-1

Hi, Please how can i scrap the cover image of datasets from kaggle using python selenium ? or just get the value of "src" of the HTML

View img => image of inspect elem

davidism
  • 121,510
  • 29
  • 395
  • 339

1 Answers1

0

This code uses selenium to get the source of the cover image element and then download it using requests:

import requests
from selenium import webdriver

driver= webdriver.Chrome()
driver.get(kaggle_website)

cover_src = driver.find_element_by_xpath('xpath/to/image').get_attribute("src")
response = requests.get(cover_src)
ZhorGen
  • 41
  • 5