Return unique imdb list

This commit is contained in:
Ruud
2013-08-24 12:14:15 +02:00
parent 7e44af936d
commit cef5b04eb1
+1 -1
View File
@@ -128,7 +128,7 @@ def getImdb(txt, check_inside = True, multiple = False):
try: try:
ids = re.findall('(tt\d{7})', txt) ids = re.findall('(tt\d{7})', txt)
if multiple: if multiple:
return ids if len(ids) > 0 else [] return list(set(ids)) if len(ids) > 0 else []
return ids[0] return ids[0]
except IndexError: except IndexError:
pass pass