Ramis Ramis - 7 months ago 130
Python Question

Use IDM(Internet Download Manager) API with python

I am trying to use the IDM api through python but I'm completely lost on how i would do this.

Could someone please help me?
I don't even know if it is possible to do this with python.


The IDM api seems to be accessible from Visual Basic, which is good, because it means that it supports IDispatch and therefore Python. You want to use the comtypes library. Using the VB sample as a prototype:

import comtypes.client as cc
import comtypes

referrer = ""
cookie = ""
postData = ""
user = ""
password = ""
# not sure about the syntax here, but cc.GetModule will tell you the name of the wrapper it generated
import comtypes.gen.IDManLib as IDMan
idm1 = cc.CreateObject("IDMan.CIDMLinkTransmitter", None, None, IDMan.ICIDMLinkTransmitter2)
referrer, cookie, postData, user, password, r"C:\\", "idman401.exe", 0)