leave title alone
This commit is contained in:
parent
8b70307ec8
commit
ccc55e28f0
1 changed files with 4 additions and 0 deletions
|
@ -317,10 +317,13 @@ def getMoviePoster(imdbId):
|
||||||
|
|
||||||
def guess(title, director='', timeout=google.DEFAULT_TIMEOUT):
|
def guess(title, director='', timeout=google.DEFAULT_TIMEOUT):
|
||||||
#FIXME: proper file -> title
|
#FIXME: proper file -> title
|
||||||
|
'''
|
||||||
|
//this is not needed
|
||||||
title = title.split('-')[0]
|
title = title.split('-')[0]
|
||||||
title = title.split('(')[0]
|
title = title.split('(')[0]
|
||||||
title = title.split('.')[0]
|
title = title.split('.')[0]
|
||||||
title = title.strip()
|
title = title.strip()
|
||||||
|
'''
|
||||||
imdb_url = 'http://www.imdb.com/find?q=%s' % quote(title.encode('utf-8'))
|
imdb_url = 'http://www.imdb.com/find?q=%s' % quote(title.encode('utf-8'))
|
||||||
return_url = ''
|
return_url = ''
|
||||||
|
|
||||||
|
@ -330,6 +333,7 @@ def guess(title, director='', timeout=google.DEFAULT_TIMEOUT):
|
||||||
search = 'site:imdb.com %s "%s"' % (director, title)
|
search = 'site:imdb.com %s "%s"' % (director, title)
|
||||||
else:
|
else:
|
||||||
search = 'site:imdb.com "%s"' % title
|
search = 'site:imdb.com "%s"' % title
|
||||||
|
|
||||||
for (name, url, desc) in google.find(search, 2, timeout=timeout):
|
for (name, url, desc) in google.find(search, 2, timeout=timeout):
|
||||||
if url.startswith('http://www.imdb.com/title/tt'):
|
if url.startswith('http://www.imdb.com/title/tt'):
|
||||||
return normalizeImdbId(int(ox.intValue(url)))
|
return normalizeImdbId(int(ox.intValue(url)))
|
||||||
|
|
Loading…
Reference in a new issue