I'm using xpath to scrape a amazon webpage particular, but it doesn't work. Can any one give me some advice? Here's the link to that page: a link
I want to scrape these: "Fun, credit card-sized prints" The code i'm using is here:
from lxml import html
import requests
url = 'http://www.amazon.co.uk/dp/B009CX5VN2'
page = requests.get(url)
tree = html.fromstring(page.text)
feature_bullets = tree.xpath('//*[@id="feature-bullets"]/ul/li[1]/span/text()')
But the feature_bullets is always empty. Really need some help.
The HTML that I download doesn't match your expectations. Here is the expression that works for me:
Complete program:
Result: