NeDiaz
NeDiaz

Reputation: 369

Extract Text in tag STRONG

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

Answers (1)

Md. Fazlul Hoque
Md. Fazlul Hoque

Reputation: 16187

Try:

response.css(h4.inline a::text).get()

or

response.css(h4.inline a strong::text).get()

Upvotes: 1

Related Questions