Return unique imdb list
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user