0

I have Hive installed in my home and I'm trying to control the system using my computer. They have an app but that's only for phones. You can control the system on the web from their website as well however, so I'm trying to create a python script which automatically logs in and clicks the right stuff based on user input.

The problem is I have no idea how to do this. I considered selenium but I want the whole process to happen in the background, no windows popping up or anything (Don't know if that's possible with selenium). I also heard about requests but I don't understand the documentation (Or even if it's the right tool for the job).

Can someone point me in the right direction? How do I go about doing this?

El-Chief
  • 383
  • 3
  • 15
  • This may be useful: https://stackoverflow.com/questions/16180428/can-selenium-webdriver-open-browser-windows-silently-in-background#23447450 – Sumner Evans Aug 16 '17 at 22:14
  • Thanks for that, unfortunately it doesn't work with windows. I think however I can run chrome headless with selenium so that's what I'm using. – El-Chief Aug 16 '17 at 22:34

1 Answers1

1

I used in the past twill with python. Here is a quick example how it looks like

from twill.commands import *
go("http://www.google.com/")
fv("1", "username", "testuser")
fv("1", "password", "testpass")
showforms()
submit('0')

Another thing you could do, is intercept the http requests and just simulate them with a python script. With for instance indeed with requests.

Mitta
  • 443
  • 4
  • 12