If after a query two or more movies have the same title the line return {item['title']: item['id'] for item in results['items']} overwrites the values in the dict with the same title.
Example
just_watch = JustWatch(country='US')just_watch.search_title_id(query="oldboy")
return 10 values at search_for_item
but 9 after search_title_id
Possible Solution implemented PR #46 :
Invert key and value of dict
return {item['id']: item['title'] for item in results['items']}
If after a query two or more movies have the same title the line
return {item['title']: item['id'] for item in results['items']}
overwrites the values in the dict with the same title.Example
just_watch = JustWatch(country='US')
just_watch.search_title_id(query="oldboy")
return 10 values at search_for_item but 9 after search_title_idPossible Solution implemented PR #46 : Invert key and value of dict
return {item['id']: item['title'] for item in results['items']}