I have been trying to scrape a dynamic field of an HTML page using lxml
The code is pretty simple and is below:
from lxml import html
import requests
page = requests.get('http://www.airmilescalculator.com/distance/blr-to-cdg/')
tree = html.fromstring(page.content)
miles = tree.xpath('//input[@class="distanceinput2"]/text()')
print miles
The result that I derive is just an empty list []
The result is expected to be a number in the list.
However I am able to scrape static fields of the same page.
Thanks in advance for the help.