G
G
GreenX52020-07-05 22:58:11
Python
GreenX5, 2020-07-05 22:58:11

Chrome driver how to click download file buttons?

I open the site, there are links like
href="/musicset/dl/5cf2b8284044956bbd5259057db10cb6/17858820.json"
for downloading music. files in tags
a class="musicset-track__download-link track-geo__button"
How to bypass them and click on download?

from selenium import webdriver

chrome_options = webdriver.ChromeOptions()
prefs = {'download.default_directory' : 'C:/download'}
chrome_options.add_experimental_option('prefs', prefs)
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.get('https://zaycev.net/')
html = driver.page_source

#print(html)

driver.quit()
driver = None

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2020-07-05
@GreenX5

Like a regular element, who are you bypassing?

driver.find_element_by_class_name('track-geo__button').click()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question