I'm currently working on web crawling and analyzing the source code of a webpage. Here is a snippet from the page:
<div class="accordion-row">
<h4 class="accordion-title down-arrow">The Problem</h4>
...
</div>
<div class="accordion-row">
<h4 class="accordion-title down-arrow">The Strategy</h4>
...
</div>
In my crawling process, I have used the following line in my code to extract data:
introduction = response.css('.accordion-content').extract()
While it successfully crawls the data, I would like to crawl the sections within the accordion class separately. For example, I specifically want to crawl the paragraph starting with -
<h4 class="accordion-title down-arrow">The Problem</h4>
and also the section that begins with
<h4 class="accordion-title down-arrow">The Strategy</h4>
I only need the "Strategy" section and not all the other sections. As I am not very familiar with CSS, I am unsure how to specify the selector to achieve this selective crawling. Can anyone provide some guidance or suggestions?