how to automate browsing using python