Skip to content

Commit 58e3cae

Browse files
author
Aaron
committed
Updated movie_details
1 parent c3f4391 commit 58e3cae

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

movie_details

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,15 @@ soup = BeautifulSoup(fd.read(),'html5lib')
3535
# Updated from td tag to h3 tag
3636
for 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())

0 commit comments

Comments
 (0)