title: Getting the content in body of a webpage using python
body: <p>I am trying to scan various websites using python. The following code works fine for me.</p>
  
  <pre><code>import urllib
  import re
  htmlfile =urllib.urlopen("http://google.com")
  htmltext=htmlfile.read()
  regex='&lt;title&gt;(.+?)&lt;/title&gt;'
  pattern=re.compile(regex)
  title= re.findall(pattern,htmltext)
  print title
  </code></pre>
  
  <p>To get the body content, I changed it as follows:</p>
  
  <pre><code>import urllib
  import re
  htmlfile =urllib.urlopen("http://google.com")
  htmltext=htmlfile.read()
  regex='&lt;body&gt;(.+?)&lt;/body&gt;'
  pattern=re.compile(regex)
  title= re.findall(pattern,htmltext)
  print title
  </code></pre>
  
  <p>The above code is giving me an empty box brackets. I don't know what I am doing wrong. Please help</p>