summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--totem/plugin/ppslist.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/totem/plugin/ppslist.py b/totem/plugin/ppslist.py
index 6096fba..322a0a4 100644
--- a/totem/plugin/ppslist.py
+++ b/totem/plugin/ppslist.py
@@ -241,9 +241,16 @@ class PPSMovie:
self.playerurl = KANPPS + extractString(dt.find('a')['href'])
li = node.findAll('li')
span = li[0].find('span')
- if span.contents[-1]:
- self.area = self.parse_area(span.contents[-1])
- self.pubtime = extractString(li[0].contents[-1].contents[-1])
+ if span:
+ href = span.find('a')
+ if href:
+ self.area = self.parse_area(span.contents[-1])
+ else:
+ self.area = self.parse_area(span)
+ if type(li[0].contents[-1]) == BeautifulSoup.NavigableString:
+ self.pubtime = extractString(li[0].contents[-1])
+ else:
+ self.pubtime = extractString(li[0].contents[-1].contents[-1])
self.actor = ', '.join(self.parse_actors(li[1]))
self.desc = extractString(li[2].contents[-1])
self.id = self.parseid(self.playerurl)