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
def grabimagetags():
import urllib2
from BeautifulSoup import BeautifulSoup
page = urllib2.urlopen('http://www.youtube.com/')
soup = BeautifulSoup(page)
tags = soup.findAll('img')
list.extend(set(tag['src'] for tag in tags))
return list
grabimagetags()
i would only make this change so that you can pass the list of img tags