Reputation: 369
Is it possible to extract the text (Hello World) in the strong tag using only CSS NOT xpath
<h4 class="inline"> <a href="https://example.com/example"><strong>Hello World</strong></a></h4>
Upvotes: 0
Views: 215
Reputation: 16187
Try:
response.css(h4.inline a::text).get()
or
response.css(h4.inline a strong::text).get()
Upvotes: 1