Permalink
Browse files

fix " ' bug in xunlei

  • Loading branch information...
1 parent 3937bd9 commit d33064a6d3e61e892528e1ebfc4de9e522929503 Binux committed Feb 23, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 libs/lixian_api.py
View
@@ -128,9 +128,11 @@ def _get_task_list(self, pagenum, st):
input_value = each.get("value", "")
tmp[input_attr] = input_value
assert tmp["input"]
+ assert tmp["taskname"]
process = task.find("em", **{"class": "loadnum"})
assert process.string
tmp["process"] = float(process.string.rstrip("%"))
+ tmp["taskname"] = tmp["taskname"].replace('\\"', '"').replace("\\'", "'")
result.append(tmp)
DEBUG(pformat(result))
return result

0 comments on commit d33064a

Please sign in to comment.