Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with google finance in python 3 #36

Open
helhadry opened this issue Jul 11, 2017 · 1 comment
Open

problem with google finance in python 3 #36

helhadry opened this issue Jul 11, 2017 · 1 comment

Comments

@helhadry
Copy link

helhadry commented Jul 11, 2017

i try to use google finance for importing stock price but i have this problem (work with python 2.x) 👍
the json object must be str not 'bytes'

def get_value(identifier): get_value_url = 'http://finance.google.com/finance/info?client=ig&q=' + identifier value = subprocess.Popen(['curl', '-s', get_value_url], stdout=subprocess.PIPE).communicate()[0] j = json.loads(value[5:len(value)-2]) return float(j['l'])

@ghost
Copy link

ghost commented Aug 4, 2017

from googlefinance import getQuotes
import json

print(getQuotes('AAPL')[0]['LastTradePrice'])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant