腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
3
回答
ANSI、ASCII、Unicode
和
编码与
Python
混淆
、
、
我很高兴地
使用
了
BeautifulSoup
,我还
使用
了一个文本文件作为我
的
Python
脚本
的
输入参数。ASCII
和
这些有什么关系?在我
的
文本编辑器(Notepad++)上
使用
什么编码?安西?UTF-8?将字符串解码为ASCII码似乎并不总是有效
的</em
浏览 2
提问于2010-07-24
得票数 0
1
回答
UnicodeEncodeError
与
BeautifulSoup
3.1.0.1
和
Python
2.5.2
、
、
、
使用
BeautifulSoup
3.1.0.1
和
Python
2.5.2,并尝试用法语解析网页。但是,只要调用findAll,就会得到以下错误:下面是我目前正在运行
的
代码:from
BeautifulSoup
import
BeautifulSoup
page = urllib2
浏览 0
提问于2009-01-20
得票数 5
回答已采纳
3
回答
为什么我得到"
UnicodeEncodeError
:'charmap‘编解码器不能编码字符'\u25b2’在位置84811:字符映射到<undefined>“错误?
、
、
、
我得到了
UnicodeEncodeError
:'charmap‘编解码器无法在756位置对字符'\u200b’进行编码:运行以下代码时,字符映射到错误::r = requests.get('https://stackoverflow.com').textprintst.py", line 5, i
浏览 1
提问于2020-06-30
得票数 14
回答已采纳
1
回答
字符编码错误:
UnicodeEncodeError
:'charmap‘编解码器无法编码位置Y中
的
字符X:字符映射到<undefined>
、
、
、
我正在尝试用
Python
3.3、httplib2
和
beautifulsoup
4抓取雅虎财经网页以获取股票价格数据。+ '&g=' + period response, content = h.request(url) print(soup.prettify()) 我得到以下错误跟踪: File "
浏览 3
提问于2013-03-03
得票数 4
2
回答
坚持
使用
python
中
的
编码
和
BeautifulSoup
、
、
、
页面是用UTF-8编码
的
,
使用
python
的
HTMLParser可以很好地工作,没有UnicodeDecodeError,但是当我尝试用
BeautifulSoup
解析它时,我确实得到了一个错误。我已经尝试了_*_编码:utf-8 _*_,.encode('utf-8'),到处都是,但仍然收到错误from
BeautifulSoup
import
BeautifulSoup
urllib.urlencode({'k
浏览 2
提问于2011-12-31
得票数 2
回答已采纳
1
回答
如何解决编写
python
文件
的
问题
在
python
中生成解析器有问题。from urllib.request import urlopensoup =
BeautifulSoup
(html_doc) print(im
浏览 1
提问于2020-09-06
得票数 0
回答已采纳
1
回答
美丽汤中
的
UnicodeEncodeError
(
Python
2.7.1)
、
、
、
在这里,我在
python
2.7.1上
使用
了Beautiful Soup 3.2。我最近一直在尝试让一些简单
的
东西工作,但它似乎相当棘手:temp=
BeautifulSoup
(urllib2.urlopen(urlList[1], None,15))position 4: ordinal not in range(128)File "/home/foo/k&
浏览 4
提问于2012-01-24
得票数 2
回答已采纳
2
回答
BeautifulSoup
find_all
UnicodeEncodeError
、
、
我有以下代码,它是我从这个中获得
的
:import requestsdata=req.textletters=soup.find_all\scr3.py", line 7, in <m
浏览 1
提问于2015-12-16
得票数 2
1
回答
Python
2.7.13
UnicodeEncodeError
和
特殊字符
、
、
、
我正在编写一个简单
的
python
程序,它从网站中检索信息,问题是有些单词包含特殊
的
字符,如"°“、"Ψ”等等。这是我
的
代码:from bs4 import
BeautifulSoup
r = urllib.urlopen('http://www.samplepage.sample').read() soup =
BeautifulSoup
(r, &qu
浏览 3
提问于2017-08-05
得票数 0
回答已采纳
1
回答
使用
python
2.7
的
漂亮()错误
、
、
代码:from bs4 import
BeautifulSoup
soup =
BeautifulSoup
(page1) 错误: Traceback (most recentFile "C:\Users\sony\Desktop\Trash\Crawl
浏览 0
提问于2015-01-07
得票数 0
回答已采纳
11
回答
UnicodeEncodeError
:“charmap”编解码器不能编码字符
、
、
我
使用
以下代码:from bs4 import
BeautifulSoup
html = get.read() 我得到了以下错误: File "C:\
Python
34\lib\encodingscp1252.py"
浏览 19
提问于2014-11-23
得票数 443
回答已采纳
4
回答
python
>如何才能简单地删除麻烦
的
UnicodeEncodeError
字符?
、
、
、
这就是我所做
的
。>>> soup =
BeautifulSoup
(html)Traceback (most recent call last):
UnicodeEncodeError
: 'ascii' codec can't encode character u'\xae' in position 96953: ord
浏览 2
提问于2011-03-09
得票数 6
回答已采纳
1
回答
尝试通过
UnicodeEncodeError
库获取
BeautifulSoup
标记时出错
、
当我试图从
UnicodeEncodeError
库执行‘漂亮’函数时,我得到了
BeautifulSoup
。下面是发生
的
错误:下面是我试图执行
的
代码块。import urllib2history = urllib2.urlopen(link) from
浏览 2
提问于2017-07-03
得票数 0
回答已采纳
2
回答
如何
使用
PythonVersion3x从网站读取html正文
我想连接
和
接收来自特定网站链接
的
http响应。我有许多
Python
代码:import os,sys,re,datetime return codecs.charmap_encode(input,self.er
浏览 0
提问于2015-08-14
得票数 0
1
回答
打印美化
的
BeautifulSoup
时出现Unicode错误
、
我目前正在学习
Python
的
课程,在我们关于美丽汤
的
单元中,讲师
使用
了以下代码:from bs4 import
BeautifulSoup
response = requests.get(url) page_soup =
BeautifulSoup
page_soup.pr
浏览 1
提问于2017-09-23
得票数 1
1
回答
Python
web抓取(请求,
BeautifulSoup
)
、
、
我正在尝试写一个简单
的
网络抓取脚本,所以我写了这段代码,我得到了一个错误。import requests return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeErr
浏览 0
提问于2015-11-20
得票数 1
1
回答
UnicodeEncodeError
:'charmap‘编解码器无法编码字符'\u2014’
Python
Beautiful Soup
、
、
、
下面是我
的
代码:linkElems = soup.select('.r a') print(t)Traceback (most recent call last): File "C:\Path\
Python
\code.py", line 17, in <modu
浏览 2
提问于2016-12-26
得票数 1
1
回答
如何解决导出为csv文件(
python
)时出现
的
unicode错误
、
、
、
、
我正在尝试
使用
python
从web抓取中导出文本。但是,结果显示:> 'ranking_title': ranking_title, final=False): ---> 19 return> >
UnicodeEnco
浏览 1
提问于2018-09-09
得票数 1
1
回答
Python
错误“无法对位置中
的
字符进行编码...”
import requests 返回
的
错误信息如下: return codecs.charmap_encode(input,self.errors
浏览 2
提问于2018-04-18
得票数 0
2
回答
错误:
UnicodeEncodeError
:'gbk‘编解码器无法编码字符
我是
python
初学者。我写
的
代码如下:import requests response = requests.get(url)links = soup.find_all("a") for link in linkser
浏览 0
提问于2017-02-28
得票数 2
点击加载更多
相关
资讯
如何使用Python和BeautifulSoup爬取网站
Python爬虫入门--使用requests和BeautifulSoup库
Python爬虫库-BeautifulSoup的使用
第4节 python基础——BeautifulSoup的安装与使用
利用Python和BeautifulSoup进行网页爬取
热门
标签
更多标签
云服务器
ICP备案
腾讯会议
云直播
对象存储
活动推荐
运营活动
广告
关闭
领券