title: regex or way to get urls for images only
body: <p>I want to download images from the following page <a href="http://wordpandit.com/learning-bin/visual-vocabulary/page/2/" rel="nofollow">http://wordpandit.com/learning-bin/visual-vocabulary/page/2/</a>
  I downloaded it using urllib and have parsed using BeautifulSoup. It contains many urls, I want only those urls that end with .jpg, they also have rel="prettyPhoto[gallery]" tag.
  How to do this using Beautifulsoup? 
  Eg of the link <a href="http://wordpandit.com/wp-content/uploads/2013/02/Obliterate.jpg" rel="nofollow">http://wordpandit.com/wp-content/uploads/2013/02/Obliterate.jpg</a></p>
  
  <pre><code>#http://wordpandit.com/learning-bin/visual-vocabulary/page/2/
  import urllib
  import BeautifulSoup
  import lxml
  baseurl='http://wordpandit.com/learning-bin/visual-vocabulary/page/'
  count=2
  
  
  for count in range(1,2):
      url=baseurl+count+'/'
      soup1=BeautifulSoup.BeautifulSoup(urllib2.urlopen(url))#read will not be needed
      #find all links to imgs
      atag=soup.findAll(rel="prettyPhoto[gallery]")
      for tag in atag:
          soup2=BeautifulSoup.BeautifulSoup(tag)
          imgurl=soup2.find(href).value
          urllib2.urlopen(imgurl)
  </code></pre>