Python 3.x 如何在类内部提取文本,即内部属性?

Python 3.x 如何在类内部提取文本,即内部属性?,python-3.x,scrapy,Python 3.x,Scrapy,我有一个HTML代码如下: 您可以在任何文本上创建单独的选择器: outer = response.css('.hero-data__skills-item::attr(title)').extract_first() sel = Selector(text=outer) name = sel.css('.tooltip-name::text').get() 谢谢你,阿帕拉拉,你救了我的命。。。!

我有一个HTML代码如下:


您可以在任何文本上创建单独的
选择器

outer = response.css('.hero-data__skills-item::attr(title)').extract_first()
sel = Selector(text=outer)
name = sel.css('.tooltip-name::text').get()

谢谢你,阿帕拉拉,你救了我的命。。。!