I’m trying the following command on scrapy shell which returns this result:
JavaScript
x
3
1
In [49]: response.css('h4.team-meta__name')[1].extract()
2
Out[49]:h4 class="team-meta__name" style="color: #6495ED"> <strong>Ajax</strong></h4
3
The thing is, I want to extract only the word “Ajax” that is is between <strong>
tags.
Advertisement
Answer
You need to add <strong>
tag to your selector
JavaScript
1
2
1
response.css('h4.team-meta__name strong::text')[1].extract()
2