RT,网页代码如下:
<html>
<head>
<title>新浪通行证</title>
<meta http-equiv="refresh" content="0; url='http://weibo.com/p/aj/v6/mblog/mbloglist?page=1¤t_page=1&domain=100808&pre_page=1&page_bar=0&pl_name=Pl_Third_App__9&id=1008089f6e6800cfae7749eb6c486619254b9c&feed_type=1&retcode=6102'"/>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
</head>
<body bgcolor="#ffffff" text="#000000" link="#0000cc" vlink="#551a8b" alink="#ff0000">
<script type="text/javascript" language="javascript">
location.replace("http://weibo.com/p/aj/v6/mblog/mbloglist?page=1¤t_page=1&domain=100808&pre_page=1&page_bar=0&pl_name=Pl_Third_App__9&id=1008089f6e6800cfae7749eb6c486619254b9c&feed_type=1&retcode=6102");
</script>
</body>
</html>
我想在遇到这个页面的时候调用一个函数,于是就判断一下:
if unicode( bs_html.title.string ) == u"新浪通行证":
但是总是是False。请问是为什么呢?应该如何修改?
正好昨天用bs4