Dear Users! Please post bug reports about FDM here!

How to call FDM from python?

Moderators: Usher, Alex

pythomaniac

How to call FDM from python?

Postby pythomaniac » Sat Nov 25, 2023 3:22 pm

I want to download multiple files in a python script. I have the list of urls in the python script. How can I call FDM from python such that running that line adds the download in FDM in background?
Alex
FDM Team
Posts: 2851
Joined: Mon Jul 12, 2004 12:17 pm

Re: How to call FDM from python?

Postby Alex » Fri Dec 01, 2023 5:20 pm

Hello,
You can add a download using command line.
Unfortunately, there is no option to force the silent mode.
As a workaround, you can enable Preferences | Browser Integration | Start download without confirmation option.
Then, you can add a download using: fdm.exe "URL".
Alex,
FDM development team
sedsong

Re: How to call FDM from python?

Postby sedsong » Sun Feb 11, 2024 3:11 am

Hi, thanks for the response! Can you specify if there are other command line arguments that I can pass? I want to pass some extra parameters in the header/cookie without which the download is not authenticated. Directly downloading the link from the browser works well but not using the command line interface "fdm --url {url}".
sedsong

Re: How to call FDM from python?

Postby sedsong » Sun Feb 11, 2024 5:22 am

Hi again,

It seems like I mostly need to set the user-agent through the command line. I tried "--user-agent" but that doesn't seem to work. Could you please tell the correct argument?
Alex
FDM Team
Posts: 2851
Joined: Mon Jul 12, 2004 12:17 pm

Re: How to call FDM from python?

Postby Alex » Fri Mar 15, 2024 7:53 am

sedsong wrote:Hi again,

It seems like I mostly need to set the user-agent through the command line. I tried "--user-agent" but that doesn't seem to work. Could you please tell the correct argument?

Hello,
Sorry for the long response. There is no such a feature. We'll think about adding it in the future updates of FDM.
Alex,

FDM development team
Alex
FDM Team
Posts: 2851
Joined: Mon Jul 12, 2004 12:17 pm

Re: How to call FDM from python?

Postby Alex » Tue Apr 16, 2024 4:01 am

sedsong wrote:Hi again,

It seems like I mostly need to set the user-agent through the command line. I tried "--user-agent" but that doesn't seem to work. Could you please tell the correct argument?

Hello,
This option will be added in the next update. Other options available can be seen using "--help".
Alex,

FDM development team
FreeuSer
Posts: 2
Joined: Sun May 12, 2024 8:52 pm

Re: How to call FDM from python?

Postby FreeuSer » Sun May 12, 2024 8:58 pm

I'd like to know if FDM has added support for Command? For example, being able to download files to a specified folder using Command or PowerShell in Windows 10 with FDM.exe, or using Python to specify FDM.exe to download to a specific folder. I can find relevant command instructions in IDM (please see: https://www.internetdownloadmanager.com ... _line.html), but I can't find any similar instructions for FDM. I hope FDM can support Command, so that I can use Python to call

Code: Select all

await trio.run_process(command, ...)
to download files asynchronously with multiple threads.
Alex
FDM Team
Posts: 2851
Joined: Mon Jul 12, 2004 12:17 pm

Re: How to call FDM from python?

Postby Alex » Wed May 29, 2024 1:49 am

FreeuSer wrote:download files to a specified folder using Command or PowerShell in Windows 10 with FDM.exe

Hello,
There is no such a feature for now. We'll think about adding it.
You can see all the available options using fdm.exe --help command.
Alex,

FDM development team

Return to “General forum”

Who is online

Users browsing this forum: No registered users and 11 guests