summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuo Jinghua <sunmoon1997@gmail.com>2010-11-14 20:42:24 +0800
committerLuo Jinghua <sunmoon1997@gmail.com>2010-11-14 20:42:24 +0800
commit5ccb496fd1d6c97eb369e8904d5b8209ae02d548 (patch)
tree9592e3e56aba0577791f544a47cd7cf8487e9304
parent32edebfc373bd47875ed4a665c03a7299473fbe2 (diff)
ppslist2: validate the array index
-rw-r--r--totem/plugin/ppslist2.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/totem/plugin/ppslist2.py b/totem/plugin/ppslist2.py
index 1956cef..93807fe 100644
--- a/totem/plugin/ppslist2.py
+++ b/totem/plugin/ppslist2.py
@@ -149,10 +149,12 @@ def parseBKMetaDataNode(node):
tfile = details.find('div', { 'class': 'tfile'})
li = tfile.findAll('li')
actors = extractNavigableStrings(li[0])
+ pubtime = ''
if len(li) > 3:
- pubtime = extractString(li[3].contents[-1]).split(':')[1].strip()
- else:
- pubtime = ''
+ ss = extractString(li[3].contents[-1]).split(':')
+ if len(ss) > 1:
+ pubtime = ss[1].strip()
+
if len(li) > 4:
areas = extractNavigableStrings(li[4].find('span'))
areas = (''.join(areas[1:])).split(':')[1].strip()