Improve python script on selenium