better little info but do not fail on imdbpro locked imdb pages

This commit is contained in:
j 2008-03-27 16:03:53 +00:00
parent 963d95ec0d
commit f24a6ae4e7

View file

@ -8,7 +8,6 @@ import re, time
import os import os
import time import time
from elementtree.ElementTree import parse, tostring
from BeautifulSoup import BeautifulSoup from BeautifulSoup import BeautifulSoup
from google import google from google import google
@ -412,7 +411,9 @@ class IMDb:
def parseReleaseinfo(self): def parseReleaseinfo(self):
soup = BeautifulSoup(self.getReleaseinfo()) soup = BeautifulSoup(self.getReleaseinfo())
for row in soup('table',{'border': '0', 'cellpadding':'2'})[0]('tr'): info = soup('table',{'border': '0', 'cellpadding':'2'})
if info:
for row in info[0]('tr'):
d = row('td', {'align':'right'}) d = row('td', {'align':'right'})
if d: if d:
try: try: