I have a url which points to .xml file.
https://nsearchives.nseindia.com/corporate/xbrl/JAIPURKURT_06052024233313_PRIOR_INTIMATION_23606_1116535_06052024113313_WEB.xml
I want to download .xml file instead of parsing it, using selenium in python.
This is what I tried but no luck. pdfs get downloaded, but not .xml.
chrome_options = uc.ChromeOptions()
chrome_options.add_argument('--headless')
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--disable-dev-shm-usage")
chrome_options.add_argument('log-level=3')
chrome_options.add_argument("--disable-gpu")
chrome_options.add_argument("--disable-webgl")
chrome_options.add_experimental_option('prefs', {
"download.default_directory": download_directory,
"download.prompt_for_download": False,
"download.directory_upgrade": True,
"download.extensions_to_open": 'xml',
"plugins.always_open_pdf_externally": True
})
d1 = uc.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options)
d1.execute_cdp_cmd('Network.setUserAgentOverride', {'userAgent': user_agent})
wait = WebDriverWait(d1, 10)
it had no effect at all. any suggestions?