title: Python 2.7 Beautiful Soup Img Src Extract
body: <pre><code>for imgsrc in Soup.findAll('img', {'class': 'sizedProdImage'}):
      if imgsrc:
          imgsrc = imgsrc
      else:
          imgsrc = "ERROR"
  
  patImgSrc = re.compile('src="(.*)".*/&gt;')
  findPatImgSrc = re.findall(patImgSrc, imgsrc)
  
  print findPatImgSrc
  
  '''
  &lt;img height="72" name="proimg" id="image" class="sizedProdImage" src="http://imagelocation" /&gt;
  </code></pre>
  
  <p>This is what I am trying to extract from and I am getting:</p>
  
  <pre><code>findimgsrcPat = re.findall(imgsrcPat, imgsrc)
  File "C:\Python27\lib\re.py", line 177, in findall
      return _compile(pattern, flags).findall(string)
  TypeError: expected string or buffer
  </code></pre>
  
  <p>'''</p>