How can I get the download link which was caught by Chrome in Selenium Python3? I mean getting the link that I can get in the chrome://downloads page in which the link is displayed right under the download file name. My purpose is to get the download link in a page where it will redirect to the download link after clicking the submit button of a POST form. (I don't want to download the file).
Actually I've made a script to scrape the link in the chrome://downloads page and then cancel & remove the download. But it is totally useless when using it on an Ubuntu VPS where I have to enable headless mode, which make chrome://downloads inaccessible (is it? I requested the page with Selenium and it did not return anything but a blank page)
How can I get the direct download link as the page doesn't have any <a> tags with a href attribute to the download link, but it will redirect to the link after I clicked the submit button and Chrome will catch it?
Thank you very much for your time and efforts!