我尝试使用BS4
Python来刮取HTML表,但是对于HTML中的247 759 384
(read as 247759384
)格式的数字,Python中的显示方式不同。我想输出他们,因为他们在表中
temp = []
a = soup.findAll('tr')[1]
for td in a.find_all("td"):
temp.append(str(td.text))
#print(str(td.text))
a.findAll('td')[10].text
给我一个
'24\xa0081\xa0728'
而不是
24081728
Tags:
只需使用
isnumeric()
检查您的字符是否是数字相关问题 更多 >
编程相关推荐