I'm connecting to Zabbix, but since it doesn't provide an API for one of the resources I want, I had to use wget
to get the job done.
Which python library would allow me to perform a "complex" wget
operation?
By "complex," I mean:
# Logging in to Zabbix
wget -4 --no-check-certificate --save-cookies=z.coo -4 --keep-session-cookies -O - -S --post-data='name=username&password=somepassword&enter=Sign in&autologin=1&request=' 'https://some.zabbix-site.com:50100/index.php?login=1'
# Grabbing the network image
wget -4 --no-check-certificate --load-cookies=z.coo -O result.png 'https://some.zabbix-site.com:50100/map.php?sysmapid=5&severity_min=0'
Not sure if requests would get the job done? I need to 1) login and save the returned cookies, 2) use the returned cookie to authenticate and retrieve the image.