0

I am following this tutorial (Python) by Sentdex in which we are now supposed to find/get certain values off of the Yahoo Finance source code. In the tutorial (recorded 2013) measures, such as price/book ratio, include their value in the same line of code in the websites source code.

However, the structure of Yahoo seems to have changed a lot since then. When I search for 'Price/Book', I only get one find and that is a line of only 'keywords' in the source code, with no value attached. If we take the YHOO stock as an example, you will see that the P/B ratio is 1.41, but when I search for that value in the source code it only seems to find it in places which, for what I can see, are not related to the P/B ratio altogether. If there is such a connection though, how would I go about defining it in Python?

There was a similar question to this one, but it didn't seem to relate to the changes in the yahoo website.

Thanks.

Community
  • 1
  • 1
Newman
  • 147
  • 1
  • 5
  • There is a python package called `yahoo-finance`. Have you seen it? – OneCricketeer Mar 07 '17 at 09:45
  • Just found it, thank you. I'll see if it resolves the issue. Will try commands such as get_price_book() instead of Sentdex's method, hopefully it'll work. – Newman Mar 07 '17 at 09:49

0 Answers0