File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,15 @@ soup = BeautifulSoup(fd.read(),'html5lib')
3535# Updated from td tag to h3 tag
3636for div in soup.findAll('h3', {'class': 'lister-item-header'}, limit=1):
3737 a = div.findAll('a')[0]
38- hht = 'http://www.imdb.com'+ a.attrs['href']
38+ hht = 'http://www.imdb.com' + a.attrs['href']
3939 print(hht)
4040 page = urllib2.urlopen(hht)
4141 soup2 = BeautifulSoup(page.read(),'html.parser')
4242 find = soup2.find
4343
44- print("title of the movie: " + find(itemprop='name').get_text().strip())
45- print("timerun: " + find(itemprop='duration').get_text().strip())
46- print("genre: " + find(itemprop='genre').get_text().strip())
44+ print("Title: " + find(itemprop='name').get_text().strip())
45+ print("Duration: " + find(itemprop='duration').get_text().strip())
46+ print("Director: " + find(itemprop='director').get_text().strip())
47+ print("Genre: " + find(itemprop='genre').get_text().strip())
4748 print("IMDB rating: " + find(itemprop='ratingValue').get_text().strip())
48- print("summary : " + find(itemprop='description').get_text().strip())
49+ print("Summary : " + find(itemprop='description').get_text().strip())
You can’t perform that action at this time.
0 commit comments