0

I'm trying to extract the text from this Xpath in scrapy shell:

scrapy shell 'https://www.matterhorngotthardbahn.ch/de/stories/autoverlad-furka'

response.xpath('//*[@id="prita-medium-content"]/div[1]/div[2]/text()').getall()

it is the div class="rss-feed-description" content. However, it doesn't seem to work? anyone any idea why?

4
  • Attach the HTML element that you are wanting to get Feb 19, 2023 at 21:22
  • because the page is loaded dynamically so the element you are looking for doesn't exist yet in the html
    – Alexander
    Feb 19, 2023 at 22:15
  • ok, meaning there is no way to extract data with scrapy? any other iedea to do that?
    – Olivarsson
    Feb 20, 2023 at 5:01
  • You can use Scrapy-playwright for dynamically loading pages. @Olivarsson
    – skyriver
    Feb 20, 2023 at 19:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.