Skip to content

Commit 1749ecc

Browse files
committed
feat: Added movie generator program
1 parent a6ec4d1 commit 1749ecc

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Random Movie Selector/main.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from imdb import IMDb
2+
import random
3+
4+
5+
class ChooseMovie(object):
6+
def __init__(self):
7+
self.cursor = IMDb()
8+
self.top250 = self.cursor.get_top250_movies()
9+
10+
def __repr__(self):
11+
num = int(random.randint(0, 249))
12+
return str(f"\n\n\t{num}: {self.top250[num]}\n\n")
13+
14+
15+
if __name__ == '__main__':
16+
print(ChooseMovie())

0 commit comments

Comments
 (0)