Reputation: 409
I want to import data from a website to a google spreadsheet.
The Site containing data.
It tried it in the scrapy shell and it works:
Also, the source code clearly shows the content, meaning that it is not fetched by JavaScript (correct?):
When I start the scrapy shell and call the command response(view)
(this actually shows the file how scrapy sees it) it shows the complete content so I'm pretty sure it's not related to JavaScript.
I don't know if it might be jQuery or Ajax or anything else. This question suggested also the RSS Feed. In the case of the above website this unfortunately doesn't work.
Does anybody figure out what's going wrong?
Here are the gSheet formulae that I've tried:
=IMPORTXML("https://www.feiertagskalender.ch/index.php?geo=3058&klasse=3&hl=en","//div[@class='list-group']//a/div[1]/text()")
=IMPORTXML("https://www.feiertagskalender.ch/index.php?geo=3058&klasse=3&hl=en","//div[@class='list-group']//a/div[1]")
=IMPORTXML("https://www.feiertagskalender.ch/index.php?geo=3058&klasse=3&hl=en","//div[@class='list-group']//a/div/text()")
=IMPORTXML("https://www.feiertagskalender.ch/index.php?geo=3058&klasse=3&hl=en","//div[@class='list-group']//a/div")
All of return the message
N/A Imported content is empty
Upvotes: 0
Views: 694
Reputation: 201338
For example, how about this? The valuers are directly retrieved using "//div[@class='col-md-3 black-link']"
. https://www.feiertagskalender.ch/index.php?geo=3058&klasse=3&hl=en
is in a cell of "A1".
=IMPORTXML(A1, "//div[@class='col-md-3 black-link']")
If this was not useful for you, I'm sorry.
Upvotes: 1