擅长:python、mysql、java
<p>您确定值是unicode,而不是某个beauthulsoup内部表示形式吗?在python中将unicode转换为integer似乎没有问题。下面是Python解释器的输出。在</p>
<pre><code>In [2]: my_unicode = u'10'
In [3]: type(my_unicode)
Out[3]: unicode
In [4]: my_int = int(my_unicode)
In [5]: type(my_int)
Out[5]: int
In [6]: my_int > 2
Out[6]: True
In [7]: my_int > 10
Out[7]: False
</code></pre>
<p>可能您在将某些BeautifulGroup内部类型转换为integer时遇到问题。在</p>