I am creating a web scrapping python code (using 2.7.11) that extracts the stock price using symbol. I am not sure why this is not working. But it gives me this output:
The string "yfs_l84" you are searching for is not contained in the HTML returned by yahoo. So
"yfs_l84"
where=text.find("yfs_l84")
leaves where to be -1. So your slice text[start:end] will always be text[6:11] and cut YPR h out of the page source:
where
-1
text[start:end]
text[6:11]
YPR h
...