腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(3325)
视频
沙龙
1
回答
BeautifulSoup
get_text
返回
NoneType
对象
、
、
我正在尝试
BeautifulSoup
进行网页抓取,我需要从这个中提取标题,特别是从“更多”标题部分。这是我到目前为止尝试使用的代码。import requestsfrom csv import writer posts = soup.find_all(id=
浏览 12
提问于2018-08-05
得票数 4
回答已采纳
1
回答
我一直在尝试这段代码,但是当我编译它时,我不知道该做什么
、
from bs4 import
BeautifulSoup
import timeimport smtplib soup1 =
BeautifulSoup
(page.content, "html.parser&quo
浏览 8
提问于2022-06-28
得票数 0
1
回答
BeautifulSoup
-“
NoneType
”
对象
没有属性“
get_text
”
、
输出显示from bs4 import
BeautifulSoup
ite
浏览 3
提问于2020-08-07
得票数 1
1
回答
BeautifulSoup
IndexError
、
、
tr>industry = r.find('th', text = 'Industry').findNext('td').find_all('a')[0].
get_text
浏览 3
提问于2015-06-26
得票数 0
3
回答
用美丽的汤刮歌词
、
、
现在我想使用
beautifulsoup
4对其进行want爬行;但是,我遇到了一个错误。以下是代码:import requests page = requests.get(url) lyrics = html.find('div', class_='lyrics
浏览 0
提问于2021-06-17
得票数 0
回答已采纳
1
回答
AttributeError:'
NoneType
‘
对象
没有属性'
get_text
’阻止我前进
、
、
AttributeError:'
NoneType
‘
对象
没有属性'
get_text
'from bs4 import
BeautifulSoup
price = 389 page = requests.get(url, headers=headers) soup =
BeautifulSoup
(page.co
浏览 1
提问于2020-04-12
得票数 1
1
回答
用Pythonandbs4实现Walmart.com价格抓取
、
、
、
下面是我的代码:from bs4 import
BeautifulSoup
page = requests.get(URL,headers={"User-Agent":"Defined"}) soup =
BeautifulSoup
(page.c
浏览 2
提问于2018-09-02
得票数 0
回答已采纳
1
回答
只从一个带有美丽汤的html页面中选择一个数字
、
import requestsimport lxmlurl = "https://www.worldmeter.com/coronavirus/us/" soup =
BeautifulSoup
(page.c
浏览 13
提问于2020-11-17
得票数 0
回答已采纳
1
回答
美丽的汤不适合所有的urls
、
、
、
错误说: def product_crawler(): soup =
BeautifulSoup
(page.content, 'html.parser') title = soup.find(id=&
浏览 0
提问于2021-07-19
得票数 2
回答已采纳
2
回答
使用
BeautifulSoup
抓取网站时出错
、
、
我创建了以下方法:from bs4 import
BeautifulSoup
soup =
BeautifulSoup
(response.text, "html.parser") lyrics= soup.find("div",attrs={'class':'lyrics'}).find(&qu
浏览 5
提问于2020-09-03
得票数 0
1
回答
Selenium出现webdriver错误&在
NoneType
情况下打印null
、
、
、
、
如果类型是'
NoneType
‘,我想打印为'null’。我在jupyter notebook(anaconda3)中写了这段代码。 我试着用'if...else...‘解决这个问题。from bs4 import
BeautifulSoup
driver()) url_add.append(urljoin(url_base, item.find('a')['hr
浏览 27
提问于2019-09-05
得票数 0
2
回答
soup.find有时只
返回
"none“吗?
、
由于某些原因,"title“变量有时会
返回
,而有时我会得到这样的错误:"'
NoneType
‘
对象
没有’
get_text
‘属性” import requests so
浏览 35
提问于2020-07-23
得票数 1
回答已采纳
2
回答
如何忽略查找()错误
、
我如何忽略一个项目是它不
返回
一些东西。我希望它继续使用其他代码,跳过没有类的列表。代码from bs4 import
BeautifulSoup
soup =
BeautifulSoup
(page.cont
浏览 4
提问于2021-04-10
得票数 1
回答已采纳
1
回答
收集2页数据后,Web爬虫崩溃
、
、
、
当我运行这个程序时,我的代码崩溃了,我得到了这个错误: import requests from bs4 import
Bea
浏览 7
提问于2020-05-02
得票数 0
1
回答
在
BeautifulSoup
Find()函数中正确使用变量
、
如何正确使用
BeautifulSoup
的.find()函数中的变量?当您将字符串变量指定为参数时,使用find()函数似乎失败了。HTML <h3 id="ourId">Something</h3>prodTitle = page.find("h3", {"id": "ourId"}).<e
浏览 3
提问于2022-07-27
得票数 -1
1
回答
抓取python找
返回
值不存在
、
、
我试图刮一个网站,但我的
BeautifulSoup
返回
:'
NoneType
' object has no attribute '
get_text
'。但是,元素确实存在。{'User-Agent': 'Mozilla/5.0'}#time.sleep(60) soup =
BeautifulSoup
url.split(
浏览 1
提问于2022-05-11
得票数 -2
1
回答
如何从网站(如Udacity)中提取课程名称/学校/描述
、
import requestssoup =
BeautifulSoup
(r.text)#to get all
浏览 3
提问于2021-08-02
得票数 0
1
回答
如何使用Python中的优美汤打印文本?
、
这里是我的HTML.Purser代码from bs4 import
BeautifulSoup
page = requests.get('https://www.vocabulary.com/dictionary/abet')AttributeError: '
NoneType
' ob
浏览 3
提问于2020-03-30
得票数 2
回答已采纳
1
回答
Bs4 AttributeError:“
NoneType
”
对象
没有属性“
get_text
”
、
根据教程视频,在这一步,当我运行代码时,它必须显示产品的名称和价格,但唯一出来的是下一个错误: AttributeError:'
NoneType
‘
对象
没有属性'
get_text
’。请帮助;(import requests Chrome/86.0.4240.75
浏览 3
提问于2020-10-19
得票数 0
回答已采纳
1
回答
Python - AttributeError:'
NoneType
‘
对象
没有'
get_text
’属性
、
、
、
我正在尝试使用'a‘对下面的示例使用
get_text
()。教程
返回
结果McDermott国际和MDR没有问题。但是当我这样做的时候,我得到了AttributeError:'
NoneType
‘
对象
没有'
get_text
’属性。请帮帮忙。非常感谢!with open('Energy.htm') as f:energylist = soup.find_a
浏览 3
提问于2017-07-22
得票数 0
点击加载更多
相关
资讯
Python爬虫从入门到精通(3):BeautifulSoup用法总结及多线程爬虫爬取糗事百科
大数据数据采集基础教程 五行代码爬取豆瓣电影本周排行榜 具体步骤详解
Executors返回的线程池对象的弊端
Python爬虫之BeautifulSoup详解
【学习心得 084】网络爬虫
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
实时音视频
活动推荐
运营活动
广告
关闭
领券