Last active
August 29, 2015 14:22
-
-
Save josuebrunel/f7f8f64bd48526ecdcbc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| raise error("bad character range") | |
| sre_constants.error: bad character range |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| import json | |
| import requests | |
| def stock_lookup(name): | |
| url = "http://autoc.finance.yahoo.com/autoc?query={0}&callback=YAHOO.Finance.SymbolSuggest.ssCallback".format(name) | |
| response = requets.get(url) | |
| match = re.match("YAHOO.Finance.SymbolSuggest.ssCallback\((.*?)\)",data) | |
| json_data = json.loads(match.group(1)) | |
| return json_data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 11, where did you declares the data argument?