diff options
author | Luo Jinghua <sunmoon1997@gmail.com> | 2010-11-15 11:31:25 +0800 |
---|---|---|
committer | Luo Jinghua <sunmoon1997@gmail.com> | 2010-11-15 11:31:25 +0800 |
commit | 7054e0aed4b3db69b4355311381c6ad822f9b4d0 (patch) | |
tree | bfd4be3a12982e1648ad8a2d394dd188e8c51d62 | |
parent | 5a6879f942086bd95163d4fa6319d128746ff3d7 (diff) |
ppslist2: parse the online count
-rw-r--r-- | totem/plugin/ppslist2.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/totem/plugin/ppslist2.py b/totem/plugin/ppslist2.py index bfe15f1..f91128b 100644 --- a/totem/plugin/ppslist2.py +++ b/totem/plugin/ppslist2.py @@ -181,6 +181,7 @@ class PPSClass: self.order = '' self.seq = '' self.count = 0 + self.online = 0 self.score = 0 self.desc_url = '' self.meta_data = {} @@ -204,6 +205,7 @@ class PPSClass: d['orderid'] = self.orderid d['seq'] = self.seq d['count'] = self.count + d['online'] = self.online d['score'] = self.score d['desc_url'] = self.desc_url d['meta_data'] = self.meta_data @@ -232,6 +234,8 @@ class PPSClass: self.desc_url = vs[2] elif k == 'vm': self.score = float(v or '0.0') + elif k == 'on': + self.online = int(v or '0') return self def parseMetaData(self, s): @@ -303,7 +307,8 @@ class PPSClass: self.count = count class PPSMovie: - elements = [ 'id', 'title', 'director', 'actor', + elements = [ 'id', 'bkid', 'online', + 'title', 'director', 'actor', 'area', 'size', 'pubtime', 'length', 'lang', 'score', 'desc', 'image'] def __str__(self): @@ -328,6 +333,7 @@ class PPSMovie: def __init__ (self): self.id = 0 self.bkid = 0 + self.online = 0 self.title = '' self.order = '' self.director = '' @@ -371,6 +377,7 @@ class PPSMovie: urlnode = node.getElementsByTagName('URL')[0] nametext = findTexthildNode(namenode) urltext = findTexthildNode(urlnode) + self.online = int(node.getAttribute('ON') or '0') self.id = int(idnode.getAttribute('ID')) self.score = float(idnode.getAttribute('VM') or '0.0') self.bkid = int(idnode.getAttribute('BKID') or '0') |