腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
Python编解码器不能用request.get编码字符
python
、
json
、
encoding
、
utf-8
、
ascii
因此,我尝试了plain_text.
decode
('ISO-8859-1)和plain_text.
decode
('cp1252'),以便以后可以将它们编码为utf-8,但是每次我收到错误时:'asciiwww.example.com'plain_text = source_code.content the_sourcecode = plain_text.
decode
('cp1252').encode(
浏览 4
提问于2016-11-17
得票数 2
回答已采纳
2
回答
不能刮掉表中的所有ul标记
python
、
web-scraping
我试图从这个站点上刮掉所有的代理ips:,但我最多只能获得一个ip,这是我的代码: from bs4 import
BeautifulSoup
browser = start_chrome(url, headless=True) soup =
BeautifulSoup
浏览 2
提问于2021-04-11
得票数 0
回答已采纳
1
回答
如何更新python抓取的有效载荷信息
web-scraping
、
beautifulsoup
、
scrapy
、
web-crawler
我有一个用于这个站点的python刮刀: 这是我的代码:import requestsfrom datetime import date# payload: x=r'{"version":"1.0.
浏览 2
提问于2020-06-11
得票数 0
回答已采纳
1
回答
“‘charmap”编解码器无法解码位置33222的字节0x8d :字符映射到<undefined>
python
、
html
、
encoding
、
beautifulsoup
、
lxml
我试图通过
BeautifulSoup
解析一个带有lxml的很长的html文件。我知道html文件的字符编码是UTF-8 with BOM,但是每当我试图运行contents = f.read()时,都会得到以下错误:这是我的第一个(也是有问题的)代码: from bs4 import
BeautifulSoup
with ope
浏览 1
提问于2019-12-22
得票数 2
回答已采纳
2
回答
用urllib进行Web抓取
python
、
urllib
我试着做一些简单的web抓取,我不断地得到这个错误,我不确定哪里错了,因为我对python相当陌生。import timeimport urllib.parse try:
浏览 8
提问于2016-12-19
得票数 0
回答已采纳
1
回答
Python美丽汤'ascii‘编解码器不能编码字符u'\xa5’5‘
python
、
html
、
web-scraping
、
beautifulsoup
print flagcnt #Program Code extraction sp=
BeautifulSoup
浏览 3
提问于2015-04-17
得票数 5
回答已采纳
1
回答
如何从这个元素中抓取所有数据?Nodejs/Puppeteer
javascript
、
html
、
node.js
、
web-scraping
、
puppeteer
我想从像这样的元素中刮起名字、位置和类型(在线/亲自) <div class="cse-ul--img"> <img src="https://secure.gravatar.com/avatar/99574b52aaa5ecb0bea650602fecfbd7?s=100&d=mm
浏览 6
提问于2022-11-24
得票数 1
回答已采纳
3
回答
BeautifulSoup
HTTPResponse没有属性编码
python
、
python-3.x
、
beautifulsoup
、
urlopen
我正在尝试让漂亮的汤与URL一起工作,如下所示:from bs4 import
BeautifulSoup
soup =
BeautifulSoup
(html.encode("utf-8"), "html.parser") print(soup.find_all(很明显,Python3和
BeautifulSoup
4在给
浏览 0
提问于2017-01-30
得票数 3
2
回答
警告:root:某些字符无法解码,已替换为替换字符。使用Requests和Beastuifulsoup
python
、
encoding
、
request
、
beautifulsoup
由于此请求不返回html,因此当我搜索标记的内容时,
Beautifulsoup
将返回None类型。这里出了什么问题?我试着用谷歌搜索一下这个编码问题,但找不到明确的答案。import requests soup =
Beautiful
浏览 1
提问于2015-05-08
得票数 12
1
回答
Python和
BeautifulSoup
编码问题
python
、
unicode
、
utf-8
、
beautifulsoup
、
xbmc
req) response.close() #link=link.
decode
('utf-8') #link=link.
decode
('ascii', 'ignore') #soup=
Beautifu
浏览 4
提问于2014-02-22
得票数 0
1
回答
如何从web页面的源中获取字符串,但这并不存在于漂亮的汤中
python
、
beautifulsoup
<td style="text-align:left; font-weight:bold;"><script type="text/javascript">document.write(Base64.
decode
<td style="text-align:left; font-weight:bold;"><script type="text/javascript">document.write(Base64.
decode<
浏览 9
提问于2018-08-12
得票数 0
回答已采纳
2
回答
使用
BeautifulSoup
通过id获取div的内容
python
、
html
、
python-2.7
、
beautifulsoup
、
html-parsing
我使用的是python2.7.6、urllib2和
BeautifulSoup
我怎样才能用漂亮的汤显示一个带有id的div的html内容呢?
浏览 1
提问于2014-09-02
得票数 9
2
回答
如何用
BeautifulSoup
正确解析UTF-8编码的HTML到Unicode字符串?
python
、
unicode
、
utf-8
、
beautifulsoup
、
urllib2
我正在运行一个Python程序,该程序获取一个UTF8编码的网页,并使用
BeautifulSoup
从HTML中提取一些文本。示例程序:from
BeautifulSoup
import
BeautifulSoup
url = 'http://www.voxnow.decharset header,response = urllib2.urlopen(request) # P
浏览 1
提问于2013-11-26
得票数 32
回答已采纳
3
回答
如何使用Python中的innerHTML从标记中提取
BeautifulSoup
python-3.x
、
beautifulsoup
我试图使用以下代码从标记中提取innerHTML:thepage = urlopen(theurl) soup =
BeautifulSoup
浏览 0
提问于2018-04-19
得票数 11
回答已采纳
1
回答
BeautifulSoup
中的汉字编码错误?
python
、
python-2.7
、
encoding
、
beautifulsoup
/usr/bin/env pythonimport urllib2html=urllib2.urlopen("http://www.515fa.com/che_1978.html").read() soup=
BeautifulSoup
(html,from_encoding="UTF-8")
浏览 3
提问于2015-08-24
得票数 2
回答已采纳
2
回答
如何对xincluded文件进行pretty_print?
python
、
xml
、
io
from lxml import etreetree.xinclude() print(string) 我正在尝试打印一个XML文件,我的pretty_print选项在控制台中是打开的(%%pprint来打开和关闭它),但是终端仍然没有插入实际的换行符,而是将"\n“包含在字符串中。 如何将其更改为实际插入换行符?
浏览 52
提问于2020-07-13
得票数 0
1
回答
BeautifulSoup
decode
_contents()返回<;而不是<
python
、
beautifulsoup
p>bb<i>b</i>b</p></li>from bs4 import
BeautifulSoup
, Tag, NavigableString soup =
BeautifulSoup
(""&q
浏览 4
提问于2021-09-06
得票数 0
1
回答
以输入表单和刮页、Python、请求库发送POST数据
python
、
python-2.7
、
beautifulsoup
、
python-requests
我的代码:from
BeautifulSoup
import
BeautifulSoup
headers = {'User-Agentctx=recover', headers=headers, data=payload)x.encoding = "utf-8" parsed =
BeautifulSoup
浏览 1
提问于2017-04-02
得票数 1
2
回答
Python网站上的搜索编号范围
python-3.x
、
if-statement
、
numbers
、
range
p=^GSPC")if "S&P" in content :import webbrowserpage = urllib.request.urlopen("p=^GSPC") c
浏览 5
提问于2017-05-16
得票数 0
回答已采纳
4
回答
用
BeautifulSoup
摘录标题
python-3.x
、
beautifulsoup
requesthtml = request.urlopen(url).read().
decode
('utf8')raw =
BeautifulSoup
(html, 'html.parser').get_text()doctype html
浏览 5
提问于2016-03-12
得票数 20
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
总结 BeautifulSoup
Python is和=encode和decode
初识BeautifulSoup
Python学习-BeautifulSoup简单爬虫
BeautifulSoup网络数据信息采集(一)
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券