def omdb(title, year):
    params = {'t': title.encode('ascii', 'ignore'),
              'plot': 'full',
              'type': 'movie',
              'tomatoes': 'true'}

    if year:
        params['y'] = year

    url = OMDB_URL + urlencode(params)
    return json.loads(requests.get(url).text)
Fetch data from OMDB API.
dataset/ETHPy150Open iCHAIT/moviemon/moviemon/moviemon.py/omdb