0

I want to download a MP3 file, when I'm clicking on ID "imgAudioCaptcha" sound button. (python 2.7) - (My firefox ver: 43)

I want to save download, but the doesn't happen and without downloading the file, program is closed.

please help me. thanks a lot

Note: if you have IDM(Internet Download Manager) you can see the pop-uped file after clicking on sound button.

THe site: http://it.kntu.ac.ir/Dorsapax/signin.aspx

source:

from selenium import webdriver
import selenium, time, os

profile = webdriver.FirefoxProfile()
profile.set_preference('startup.homepage_welcome_url.additional', "http://it.kntu.ac.ir/Dorsapax/signin.aspx")
profile.set_preference('browser.download.hide_plugins_without_extensions', False)
profile.set_preference('extensions.mozilla_cc@internetdownloadmanager.com.install-event-fired', False)
profile.set_preference('browser.startup.page', "1")
profile.set_preference("browser.download.folderList", "2")
profile.set_preference("browser.download.dir", os.getcwd())
profile.set_preference("browser.helperApps.neverAsk.openFile", "audio/mpeg")
profile.set_preference("browser.helperApps.neverAsk.saveTsoDisk", "audio/mpeg")

driver = webdriver.Firefox(profile)
driver.implicitly_wait(30)
driver.set_window_size(850, 650)

cap_audio = driver.find_element_by_id("imgAudioCaptcha").click()

driver.close()
Rashwan L
  • 38,237
  • 7
  • 103
  • 107
ali reza
  • 141
  • 3
  • 13
  • Possible duplicate of [downloading file using selenium](http://stackoverflow.com/questions/18439851/downloading-file-using-selenium) – Dušan Maďar Dec 08 '15 at 21:42
  • tnx; but ,my problem is not related to your link. I have problem in downloading the MP3 file after clicking on Audio-Captcha-Button. – ali reza Dec 09 '15 at 05:55

0 Answers0