Why would the driver
get all the details but requests
doesn't get all the details.
I am trying to cut down the time it takes for me to get quotes from the website using driver
. Facing the following problem which I can't find a way around.
url = 'https://www.nseindia.com/live_market/dynaContent/live_watch/get_quote/GetQuoteFO.jsp?underlying=AUROPHARMA&instrument=FUTSTK&expiry=28MAR2018&type=-&strike=-'
raw_page = requests.get(url).text
soup = BeautifulSoup(raw_page, "lxml")
soup.find("span",{"id":"lastPrice"}).text
Gives
'--'
url = 'https://www.nseindia.com/live_market/dynaContent/live_watch/get_quote/GetQuoteFO.jsp?underlying=AUROPHARMA&instrument=FUTSTK&expiry=28MAR2018&type=-&strike=-'
raw_page = driver.page_source
soup = BeautifulSoup(raw_page, "lxml")
soup.find("span",{"id":"lastPrice"}).text
Gives
'617.00'
I am not able to figure out if there is a way around this.