Edit a web page with Python
<p>I asked a <a href="http://stackoverflow.com/questions/39283333/python-to-view-and-manipulate-web-page?noredirect=1#comment65902596_39283333">similar question</a> about how to edit a web page with Python before using selenium, but since that didn't get anywhere (I want to be able to do it in a browser that still has all of the saved cookies, passwords, bookmarks, etc) I want to broaden the scope.  Using any modules you know of, how can I open a website in my browser, and edit an element using a Python script?</p>

<p>For instance I'd like my script to do something like this...</p>

<pre><code>open google.com
find the element that corresponds to the google logo
hide the element
</code></pre>

<p>If it helps, I'm on a Macbook, using Google Chrome</p>

<p>You can still do that via <code>selenium</code>, locate the element and edit the <code>style</code> via "execute script":</p>

<pre><code>elm = driver.find_element_by_id("myid")
driver.execute_script("arguments[0].style.display = 'none';", elm)
</code></pre>

python python-2.7 google-chrome