I am using beautifulsoup to parse all img tags which is present in \'www.youtube.com\'
The code is
import urllib2 from BeautifulSoup import Beautiful
in my case some images didn't contain src.
src
so i did this to avoid keyError exception:
keyError
art_imgs = set(img['src'] for img in article.find_all('img') if img.has_attr('src'))