I am trying to scrape this webpage (for educational purposes).
When I extract the xpath, and try it in element inspector in browser, it works. For example to get the address, I use the xpath below:
//div[@class="address-coords"]/div[@class="address"]/p/span[@itemprop="address"]
Meanwhile, in scrapy shell, it does not work:
$ scrapy shell 'https://cloud.baladovore.com/map/sNRgAcGKiY' -s U
SER_AGENT='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, l
ike Gecko) Chrome/46.0.2490.80 Safari/537.36'
In [5]: response.xpath('//div[@class="address-coords"]/div[@class="address"]/p/span[@it
...: emprop="address"]').getall()
Out[5]: []
I get an empty list, although the responses is 200:
In [6]: response
Out[6]: <200 https://cloud.baladovore.com/map/008jPJuORI>
I already tried all suggestions I found in Internet. Like changing the user agent, setting ROBOTSTXT_OBEY to False, and increasing the delay. I would really appreciate it if someone helped me solve this problem, since I was working on it for days.