new imdb 404 message

This commit is contained in:
j 2012-05-22 11:22:08 +02:00
parent 1748484e05
commit 9ac7491e70

View file

@ -276,9 +276,11 @@ class Imdb(SiteParser):
super(Imdb, self).__init__(timeout)
url = self.baseUrl + 'combined'
if '<title>IMDb: Page not found</title>' in self.readUrlUnicode(url, timeout=-1):
page = self.readUrlUnicode(url, timeout=-1)
if '<title>IMDb: Page not found</title>' in page \
or 'The requested URL was not found on our server.' in page:
return
if "<p>We're sorry, something went wrong.</p>" in self.readUrlUnicode(url, timeout=-1):
if "<p>We're sorry, something went wrong.</p>" in page:
time.sleep(1)
super(Imdb, self).__init__(0)
@ -298,7 +300,6 @@ class Imdb(SiteParser):
ititle = filter(is_international_title, self.get('alternativeTitles', []))
if ititle:
self['englishTitle'] = ititle[0][0]
self['title'] = self.get('englishTitle', self['originalTitle'])
for t in ('title', 'englishTitle', 'originalTitle'):