Fixing stocks exchange name and picture

This commit is contained in:
Alex Epstein 2017-11-09 11:59:42 -05:00
parent 035d38a416
commit cd9cce5913
2 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ getStockInformation()
export PYTHONIOENCODING=utf8 #necessary for python in some cases
echo $stockInfo | python -c "import sys, json; print json.load(sys.stdin)['companyName']" > /dev/null 2>&1 || { echo "Not a valid stock symbol"; exit 1; } #checking if we get any information back from the server if not chances are it isnt a valid stock symbol
# The rest of the code is just extrapolating the data with python from the JSON response
exchangeName=$(echo $stockInfo | python -c "import sys, json; print json.load(sys.stdin)['companyName']")
exchangeName=$(echo $stockInfo | python -c "import sys, json; print json.load(sys.stdin)['primaryExchange']")
latestPrice=$(echo $stockInfo | python -c "import sys, json; print json.load(sys.stdin)['latestPrice']")
open=$(echo $stockInfo | python -c "import sys, json; print json.load(sys.stdin)['open']")
high=$(echo $stockInfo | python -c "import sys, json; print json.load(sys.stdin)['week52High']")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 56 KiB