Posted on 2012-08-29 21:48 
pts 阅读(762) 
评论(0)  编辑  收藏  所属分类: 
Python 
			 
			
		 
		pamie 中getElementsList方法对于查找tag的innertext属性是中文是会出错,需要修改pamie30文件的第959行,增加给出的属性是中文时的判断方式,不需要str(valText)方法检验:
if not isinstance(valText):
    valText = str(valText)
如此以来,比如查找innertext为“中文”的td list时,可使用如下方法:
1、val=u"中文"
2、td_list=ie.getElementsList("td","innertext="+val)