In Safari go to Develop > Allow Remote Automation. Run with python main.py Look at amazing output in console.