Allow for spaces in company name

This commit is contained in:
Alex Epstein 2017-06-26 23:06:43 -04:00
parent 4795d1dd59
commit 9ccd8b4c87
1 changed files with 2 additions and 2 deletions

View File

@ -49,12 +49,12 @@ printStockInformation()
getTicker()
{
response=$(curl -s "http://d.yimg.com/autoc.finance.yahoo.com/autoc?query=$1&region=1&lang=en%22") > /dev/null
response=$(curl -s "http://d.yimg.com/autoc.finance.yahoo.com/autoc?query=$1+$2+$3+$4+$5+$6+$7+$8+$9&region=1&lang=en%22") > /dev/null
symbol=$(echo $response | python -c "import sys, json; print json.load(sys.stdin)['ResultSet']['Result'][0]['symbol']")
unset response
}
checkInternet || exit 1
getTicker $1
getTicker $1 $2 $3 $4 $5 $6 $7 $8 $9
getStockInformation $symbol
printStockInformation