I haven't checked the code, but if you are actually searching and parsing IMDB.com then you are violating IMDB's user agreements. There are certain titles that are not available for you to use. However.. IMDB allows you to download and use most of it's contents: http://www.imdb.com/interfaces
Instead of downloading and parsing available data and reinventing the wheel, I would also recommend using 3rd party free APIs like http://www.omdbapi.com/
There are maybe one or two other tools that can do this, but they are insufficient for $reasons or were too slow for my taste. There is a brief comparison toward the bottom of goim's README.
I update goim in a cronjob every Saturday morning (new IMDb data is updated weekly on Friday, IIRC). It's been humming along without incident for a few years now. :-)
It's a wrapper on omdb module, but in this `imdb-search` module developer can use es6 promises to search and get result.
Result list of search have an id field as index, if we pass any of id to get method we can get all info about movie.(No need to use imdb specific long id on get movie)
This module use Javascript ES6 Promises for search on movies and get movie with just use a simple generated id with this module for each movie on list of movies on result of search,
also it's keep last result of get method.(last movie)
Instead of downloading and parsing available data and reinventing the wheel, I would also recommend using 3rd party free APIs like http://www.omdbapi.com/
Just a thought...