Reputation: 384
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?
Upvotes: 0
Views: 68
Reputation: 451
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
.
Upvotes: 1