title: How to get all <img> tags but exclude <img> tags under a <div> with an id of footer using xpath?
body: <p>Do you guys know how can I get all img tags but exclude img tags under a div with an id of footer using xpath?</p>
  
  <p>Currently to get all img tags on an html page I do this:
  <code>imgs = tree.xpath('//img')</code></p>
  
  <p>But I want to exclude all img tags under a div with an id of footer so I'm doing this one:</p>
  
  <p><code>imgs = tree.xpath('//*[not(div[@id="footer"])]//img')</code>        &lt;- BUT THIS DOESN'T WORK</p>