If you are new to PYTHON then first check the post on How to Install Python on windows and mac?, once installation is complete then only checkout the below Q&A
If you are preparing for Selenium-Python Interview then also check below Q&A:
Python Interview Question & Answers Set - 01
Python Interview Q&A Set - 02
How to auto save files using a custom Firefox profile?
The first step is to identify the type of file you want to auto save.
To identify the content type you want to download automatically, you can use curl:
Another way to find the content type is by using the requests module, you can use it like this:
Once the content type is identified, you can use it to set the firefox profile preference: browser.helperApps.neverAsk.saveToDisk
Here is an example:
In the above example, application/octet-stream
is used as the content type.
The browser.download.dir
option specify the directory where you want to download the files.
No comments:
Post a Comment