腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
BeautifulSoup
- .
string
为
空
当我在
BeautifulSoup
中使用.
string
时,它应该返回文本/内容。但是,当我在下面这样的项目上执行时,它不会返回任何内容。那么我如何让它返回该内容,以便我可以执行.replace_with()soup=
BeautifulSoup
(html,
浏览 52
提问于2021-06-01
得票数 1
2
回答
如何在<script>中获取文本
、
、
如果我将script改为div,它可以工作,但我需要使用scriptfrom bs4 import
BeautifulSoup
soup =
BeautifulSoup
(html1) print(soup.find('script').text)
浏览 0
提问于2020-06-11
得票数 2
回答已采纳
1
回答
使用
BeautifulSoup
结果
为
空
、
、
没有错误,但结果
为
空
。我找不到问题的代码在下面:如果你能帮我,那就太好了,所以我将在我的论文中使用数据import urllib.requestresp = urllib.request.urlopen(req)soup =
BeautifulSoup
浏览 5
提问于2016-10-24
得票数 0
1
回答
结果
为
BeautifulSoup
空
数组
、
、
我是
beautifulSoup
的新手,我想知道为什么当我尝试检索this网站的船的价格时,它返回一个
空
数组?下面是我的代码: from bs4 import
BeautifulSoup
source = requests.get('https://www.moorings.co.uknumberOfDays=7&numberOfPassengers=2&numberOfToilets=All&numberOfShowers=All&product
浏览 10
提问于2020-06-17
得票数 0
2
回答
Python漂亮的Soup代码不工作
、
、
我在linux中尝试了这段代码,它给出了
空
的输出。我刚刚复制并粘贴了BS文档from
BeautifulSoup
import
BeautifulSoup
soup =
BeautifulSoup
("""Bob's <class="hickory">Hickory</b> and <b class="lime">Lime</a>"&q
浏览 2
提问于2011-06-08
得票数 0
回答已采纳
3
回答
BeautifulSoup
4 findChildren()
为
空
、
、
、
我回来的时候是
空
的。h3返回正确的行(参见print(h3)注释),print(type(children))打印类型:<class 'bs4.element.ResultSet'>。soup =
BeautifulSoup
(contents, 'html.parser') h3 = soup.find('h3', text=re.compile('chapter', re.IGNORECASE返回时也是
空
的。
浏览 0
提问于2018-08-15
得票数 0
2
回答
BeautifulSoup
给我的列表
为
空
、
import requestr=request.get('https://www.yelp.ie/biz/tesla-san-franciscoosq=Tesla=Dealership')r.textdivs = soup.findaAllborder-color--default__373c0__3
浏览 0
提问于2020-11-22
得票数 0
1
回答
美丽的汤:如何为
空
节点赋值
、
我想知道是否可以给一个
空
节点赋值。 原始:要更改为:<td>anything</td>的<td></td>
浏览 21
提问于2020-04-09
得票数 1
回答已采纳
3
回答
若要检查List<Map<
String
是否
为
空
,
String
>>是否
为
空
、
、
、
来自库(DBpediaLookupClient.variableBindings())的答案将导致我试着检查的是,该列表是否
为
空
。System.out.println("Results Present); System.out.println("No Results");但是,在结果列表
为
[
浏览 5
提问于2016-10-28
得票数 1
回答已采纳
2
回答
美丽的Soup find_all()返回奇怪的标签而不是结果
、
、
information about the bot from the file soup =
BeautifulSoup
浏览 5
提问于2014-10-05
得票数 2
回答已采纳
1
回答
使用Python进行Web抓取,但值
为
空
、
、
、
、
我想从这个站点获取值: with
BeautifulSoup
,但是当我试图导入表时,值是
空
的。我认为已经禁用了javascrip或任何我不知道的东西。请帮助我将值导出
为
csv或txt格式。import urllib2soup =
BeautifulSoup
(urllib2.urlopen('http://cdn.ime-co.ir
浏览 3
提问于2013-06-10
得票数 0
回答已采纳
1
回答
为什么漂亮汤没有正确解析元素名为"area"?
、
、
、
它们总是作为
空
的<area/>元素出现。#!/usr/bin/python3.5<?<root> foo <area> </area> &l
浏览 4
提问于2017-11-23
得票数 2
回答已采纳
1
回答
Python美汤不起作用如何在google搜索中用class='st‘抓取div这是我的代码
results值始终
为
空
。如何使用类st在div中获取结果 import requests soup =
BeautifulSoup
(response.text, 'html.parser') results = soup.find_all('div
浏览 11
提问于2019-11-15
得票数 0
1
回答
从bing中提取链接
、
我在使用Python和
BeautifulSoup
从必应搜索引擎中提取urls时遇到了问题。我想提取<div class="b_title">标记中的内容,但当我运行此代码时,urls变量
为
空
:from bs4 import
BeautifulSoup
Mozilla/11.0' } req = requests.get( 'https://www.bing.com/search',
浏览 2
提问于2018-05-07
得票数 1
1
回答
无需询问用户和密码即可从网页和身份验证中获取<span>值
、
、
、
、
我使用lime代码,这是工作,但回复如下:None虽然它应该是2(我也尝试过使用time.sleep()让页面加载,但没有成功)soup =
BeautifulSoup
(data, "html.parser") came
浏览 0
提问于2015-11-16
得票数 0
1
回答
使用python中的Beautiful soup
为
所有的朋友名字争斗facebook页面
、
、
、
我正在尝试做以下事情:在我自己的Facebook页面上
为
我所有的朋友的名字争论不休。我最初将我的网页存储
为
本地文件,然后使用
BeautifulSoup
解析它。但是,当我运行代码时,我得到一个不包含匹配项的
空
列表?那么你的问题是什么呢代码片段:page_html =
Beautif
浏览 0
提问于2015-11-16
得票数 0
2
回答
Beautiful Soup的extract()出错
、
给定以下html:<h2><hr/>bar</h2>soup =
BeautifulSoup
(
string
) print i print i.
string
输出
浏览 0
提问于2009-05-12
得票数 0
回答已采纳
1
回答
使用
BeautifulSoup
填充(和标识)
空
的xml标记
、
填充
空
的XML标记似乎不是我能轻易找到可用的解决方案的东西。1234567</CustomerID></TransactionDetails> 因此,当StaffID丢失时发生的情况是,<StaffID></StaffID>被截断
为
仅我尝试做的是使用
BeautifulSoup
将一个填充的值插入到XML文件中,但它还需要修复不正确的截断(以便首先将<StaffID/>转换回<Staff
浏览 12
提问于2020-01-18
得票数 0
回答已采纳
1
回答
为什么python2.7的代码没有任何输出?
from urllib import urlopensoup =
BeautifulSoup
(text) for header in soup('h3'): linksheader('a', 're
浏览 0
提问于2017-02-22
得票数 0
1
回答
美丽的汤find_all给
空
列表
、
、
我使用find_all函数的
BeautifulSoup
,它找到了我的标题行,但返回和
空
列表的价值。我的代码如下所示: from urllib.request import urlopen html1=urlopen(url1)
浏览 1
提问于2020-04-05
得票数 0
回答已采纳
点击加载更多
相关
资讯
在Java中判断String类型为空和null的方法
Java Optional 初始为空
给 iOS 开发者的 python 学习日记十五
vue使用refs中子组件为空
判断字符串是否为空
热门
标签
更多标签
云服务器
对象存储
ICP备案
云点播
实时音视频
活动推荐
运营活动
广告
关闭
领券