DEV Community

prempatel9224
prempatel9224

Posted on

How To Get IMDB ID Of Movies Using Python

How To Make a Python Script That Give Us IMDB ID Using Python

The Module We are Going To Use Is IMDbPY

pip install IMDbPY

use it in CMD or Shell

Document Of IMDbPY -https://imdbpy.readthedocs.io/en/latest/

The github is - https://github.com/prempatel9224/Get-Moives-IMDB-ID-using-python

import imdb
name = 'Go Goa Gone'
ia = imdb.IMDb()
search = ia.search_movie(name)
s = search
open('info.txt', 'w').write(str(search))
text = open('info.txt', 'r')
idn = text.read()
id = idn[11:18]
print(id)

Top comments (0)