That script seems to be an outdated one that no longer works properly after Yahoo Finance updated their webpage recently.
I've updated the article that includes modifications to the script that should allow you to parse the data from Yahoo Finance correctly, can you try that?