Issue
I have the following html code:
<h1>
<a href="https://www.google.com">
<span>448587: </span>Brian McMills
</a>
</h1>
I'm only interested in Brian McMills
. I would like to use scrapy css selector
function to select the text.
When I use h1 a ::text
, it selects only the 448587:
portion, I tried some combinations of :not(span)
but it doesn't work.
Note: I'm not interested in Xpath
or scripting
solutions, only css
.
Solution
The only thing that worked was h1 a:not(span)::text
.
Thanks.
Answered By - dryleaf
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.