Forums

Can't see downloaded files - selenium

''' from pyvirtualdisplay import Display

from selenium import webdriver

display = Display(visible=0, size=(800, 600))

display.start()

driver = webdriver.Firefox()

driver.get('https://www.adviserinfo.sec.gov/IAPD/InvestmentAdviserData.aspx')

driver.find_element_by_id("ctl00_cphMain_lnkSECReport").click()

display.stop() '''

From the code above: A file named "IA_FIRM_SEC_Fedd_#date#" is supposed to be downloaded. This is from the first download link on that webpage. The script runs very well without an error but I check in the /tmp but I cant see any files.... Please help me source that download

PS: The page is on the whitelist

There's no code there for doing the download or for specifying /tmp as the download location. Have a look at this for some more details.

Hello guys, Special thanks to glenn for answering my query satisfactorily and promptly.

The files now download after the adjustments but :

The files download with a '.part' extension. This happens even when i set the sleep time to 120 for a 893 Kb file. I'm please requesting for a solution to this.

You could look at the directory periodically until the .part file is gone and use that as a way to determine when the file has downloaded.