add AKATitles

This commit is contained in:
j 2009-08-02 18:23:17 +02:00
parent e11f98b676
commit e8e42401aa

View file

@ -236,6 +236,19 @@ def getMovieTitle(imdbId):
info = getMovieInfo(imdbId) info = getMovieInfo(imdbId)
return info['title'] return info['title']
def getMovieAKATitles(imdbId):
'''
>>> getMovieAKATitle('0040980')
[(u'Frauen der Nacht', u'Germany'),
(u'Les femmes de la nuit', u'France'),
(u'Women of the Night', u'(undefined)')]
'''
url = "%sreleaseinfo" % getUrlBase(imdbId)
data = getUrlUnicode(url)
titles = findRe(data, 'name="akas".*?<table.*?>(.*?)</table>')
titles = re.compile("td>(.*?)</td>\n\n<td>(.*)</td>").findall(titles)
return titles
def creditList(data, section=None): def creditList(data, section=None):
if section == 'cast': if section == 'cast':
credits_ = re.compile('''<tr .*?<td class="nm">(.*?)</td><td class="ddd">.*?</td><td class="char">(.*?)</td></tr>''').findall(data) credits_ = re.compile('''<tr .*?<td class="nm">(.*?)</td><td class="ddd">.*?</td><td class="char">(.*?)</td></tr>''').findall(data)