【发布时间】:2020-04-10 22:05:49
【问题描述】:
我希望从表格中抓取通过 TSA 安检通道的乘客的数据,但我不断收到此错误。
UnicodeEncodeError: 'charmap' codec can't encode character '\u2713' in position 33780: character maps to <undefined>
从此代码
url = "https://www.tsa.gov/coronavirus/passenger-throughput"
page = requests.get(url).content
soup = BeautifulSoup(page, features = 'lxml')
text = soup.get_text()
soup.prettify()
print(soup)
有什么建议吗?
【问题讨论】:
-
您使用的是 Windows 吗?
-
@snakecharmerb 100% 他正在使用窗户。
标签: python python-3.x beautifulsoup