use main page for series creator, fixes #3046
This commit is contained in:
parent
3e589c454a
commit
8aef76e7cd
1 changed files with 8 additions and 7 deletions
|
@ -87,10 +87,11 @@ class Imdb(SiteParser):
|
||||||
'type': 'list'
|
'type': 'list'
|
||||||
},
|
},
|
||||||
'creator': {
|
'creator': {
|
||||||
'page': 'combined',
|
'page': '',
|
||||||
're': [
|
're': [
|
||||||
'<h5>Creator.?:</h5>.*?<div class="info-content">(.*?)</div>',
|
'<div class="credit_summary_item">.*?<h4.*?>Creator.?:</h4>(.*?)</div>',
|
||||||
'<a href="/name/.*?>(.*?)</a>'
|
'<a href="/name/.*?>(.*?)</a>',
|
||||||
|
lambda ll: strip_tags(ll)
|
||||||
],
|
],
|
||||||
'type': 'list'
|
'type': 'list'
|
||||||
},
|
},
|
||||||
|
@ -564,7 +565,7 @@ class Imdb(SiteParser):
|
||||||
if 'director' in self:
|
if 'director' in self:
|
||||||
self['episodeDirector'] = self['director']
|
self['episodeDirector'] = self['director']
|
||||||
|
|
||||||
if not 'creator' in series and 'director' in series:
|
if 'creator' not in series and 'director' in series:
|
||||||
series['creator'] = series['director']
|
series['creator'] = series['director']
|
||||||
if len(series['creator']) > 10:
|
if len(series['creator']) > 10:
|
||||||
series['creator'] = series['director'][:1]
|
series['creator'] = series['director'][:1]
|
||||||
|
@ -767,7 +768,7 @@ def get_movie_id(title, director='', year='', timeout=-1):
|
||||||
}.get((title, director), None)
|
}.get((title, director), None)
|
||||||
if imdbId:
|
if imdbId:
|
||||||
return imdbId
|
return imdbId
|
||||||
params = {'s':'tt','q': title}
|
params = {'s': 'tt', 'q': title}
|
||||||
if director:
|
if director:
|
||||||
params['q'] = u'"%s" %s' % (title, director)
|
params['q'] = u'"%s" %s' % (title, director)
|
||||||
if year:
|
if year:
|
||||||
|
@ -794,8 +795,8 @@ def get_movie_id(title, director='', year='', timeout=-1):
|
||||||
if results:
|
if results:
|
||||||
return results[0]
|
return results[0]
|
||||||
|
|
||||||
#print (title, director), ": '',"
|
#print((title, director), ": '',")
|
||||||
#print google_query
|
#print(google_query)
|
||||||
#results = google.find(google_query, timeout=timeout)
|
#results = google.find(google_query, timeout=timeout)
|
||||||
results = duckduckgo.find(google_query, timeout=timeout)
|
results = duckduckgo.find(google_query, timeout=timeout)
|
||||||
if results:
|
if results:
|
||||||
|
|
Loading…
Reference in a new issue