pyquery乱码问题

#coding:utf-8
from pyquery import PyQuery as pq
pqObject=pq('http://www.baidu.com')
Title=pqObject('title').text().encode('latin1').decode('utf-8')
print(Title)

或者

Title=pqObject('title').text().encode('ISO-8859-1').decode('utf-8')

你可能感兴趣的:(pyquery乱码问题)