腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
2
回答
BeautifulSoup正在尝试从列表中删除HTML数据
、
、
如上所述,我试图从打印输出中删除超文本标记语言,只得到文本和我的dividing |和-。我得到了span信息以及我想要删除的其他信息。因为它是循环程序的一部分,所以我不能在页面的文本信息发生变化时搜索它们。页面架构保持不变,这就是打印列表中的项目保持不变的原因。想知道清理输出的最简单方法是什么。以下是代码部分: infoLink = driver.find_element_by_xpath("//a[contains(@href, '?tmpl=component&detail=true&parcel=')]").click(
浏览 5
提问于2021-02-06
得票数 0
回答已采纳
2
回答
使用Python的BeautifulSoup上的属性错误(web抓取)
、
、
、
headers=headers)title = soup.find(id="productTitle").
get_text
()我试图打印来自亚马逊的一些产品的名称,但是我得到这个错误:每当我试图从BeautifulSoup库运行
get_text
()方法时,‘AttributeError
浏览 13
提问于2019-11-11
得票数 1
回答已采纳
1
回答
Get_text
()
不起作用
list = [] list.append(item.get_text()) 输出是None,我想知道我是不是做错了什么。
浏览 2
提问于2016-08-19
得票数 0
回答已采纳
1
回答
在iframe中获取文本区域值
、
、
、
我目前的代码是<script> var value = $('textarea').val();}<textarea></textarea><a href="#" onclick="
浏览 0
提问于2014-11-04
得票数 1
回答已采纳
3
回答
Python '
get_text
()‘无法工作
、
、
print selects.get_text()print selects.get_text() AttributeError: 'list' object has no attribute '
get_text
浏览 4
提问于2013-04-23
得票数 1
1
回答
正则表达式不按预期工作
、
可能重复: function
get_text
(el) { var length = el.childNodes.length; }} var total =
get_text
(que
浏览 1
提问于2011-06-23
得票数 1
回答已采纳
3
回答
如何在函数中使用模块的“成员”变量?
、
TextStuff; use warnings; our @ISA = qw(Exporter); my $tmp = shift @_; print "In/usr/bin/perl use warnings; us
浏览 2
提问于2013-09-16
得票数 2
1
回答
美丽的汤不适合所有的urls
、
、
、
错误说: soup = BeautifulSoup(page.content, 'html.parser') print(title) 我检查了堆栈溢出上的所有答案,比如将html.parser更改
浏览 0
提问于2021-07-19
得票数 2
回答已采纳
1
回答
DOMXpath查询嵌套多个类
、
、
Get_text
8 [parentNode
Get_text
8 DOMElement Object [tagNameOther
Get_text
7
浏览 2
提问于2016-12-06
得票数 0
3
回答
来自find_all的BeautifulSoup
get_text
、
、
问题是只打印文本,这将
不起作用
。当我尝试它时,我得到了以下错误:AttributeError: 'ResultSet' object has no attribute '
get_text
'from bs4 importsome url') zeug = soup.find_all('div', attrs={'class': 'fm_linkeSpalte'}).
g
浏览 0
提问于2014-02-25
得票数 7
1
回答
在smtplib电子邮件中使用消息函数
、
、
、
所以我试着把这个函数设置为我的邮件消息,但它就是
不起作用
。wide") print(games.find(class_="date").
get_text
()) draw = teams[1].
get_text
() team2 = teams[
浏览 1
提问于2018-10-25
得票数 0
1
回答
BeautifulSoup在python中提取Div标记中的值
、
、
的值**<span id="product-promotion-price">Rs 96.00</span> ,我尝试了下面的code.But,它
不起作用
html.parser') price_glomark = soup2.find("div",{"class":"price"}, {"id":"product-promot
浏览 6
提问于2022-06-27
得票数 0
回答已采纳
1
回答
如何才能不级联就实现这段代码?
函数def
get_text
应该查看: return "Hello " + name def wrapped(*name): return wrapped de
浏览 3
提问于2022-07-05
得票数 -4
4
回答
如何从javascript获取数据
、
$
get_text
显示空值。type="text/javascript"> $(".new_post").click(function(){ success: function() { $('#></tex
浏览 0
提问于2016-05-26
得票数 0
1
回答
使用CSS选择器(Python、BS4)销毁数据
、
、
、
category-2 > article > ul > li:nth-child(1) > a[href]") company = post.find("span", {"class": "company"}).
get_text
() location = post.find("spa
浏览 8
提问于2022-02-01
得票数 0
回答已采纳
1
回答
Python抓取不工作--多页项目
、
、
、
、
我想知道为什么我的代码
不起作用
。当作为一个单一站点运行时,它工作得很好,我不知道我在多个页面上做错了什么。() job_title = '' date_posted = soup2.find(property='datePosted').
get_text
()except: company = soup2.find(property='hiringOrganization'
浏览 4
提问于2022-10-21
得票数 0
回答已采纳
1
回答
多个类,以及IndexError:列出超出范围错误的索引
、
当我试图通过调用下面的代码从类“句子”中打印一个示例时print(examp3[0].
get_text
())File "/home/hudacse6/WebScrape/webscrape.py", line 33, in <module> print(examp3[0].
get_text
(), "\n",
浏览 2
提问于2020-03-31
得票数 0
回答已采纳
2
回答
Python刮擦,跳过<tr>标记和行
、
、
> 0:#print rows cells = row.findAll('td') last = cells[1].
get_text
() pct_chg = cells[3].
get_text
()money_flow = cells[4].
get_text
()
浏览 1
提问于2016-12-07
得票数 0
回答已采纳
1
回答
为什么我被拒绝重新运行这个程序?
、
、
('route[name="blue"] train isApp').
get_text
() print('Train number '+ train_2 + ' BLUE line train('route[nam
浏览 0
提问于2018-01-19
得票数 0
回答已采纳
1
回答
显示网页刮伤的内容
、
、
()) for name in nameList:nameList = bsObj. findAll("div", {"class": "grade"}) print(name.
get_text
()) nameList = bsObj.
浏览 2
提问于2016-02-05
得票数 1
回答已采纳
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
智聆口语评测
活动推荐
运营活动
广告
关闭
领券