Skip to content

Commit

Permalink
fucking kill yourself script
Browse files Browse the repository at this point in the history
  • Loading branch information
Pizzaface committed Oct 15, 2017
1 parent 3b5e548 commit 8f1a730
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions python-scripts/res.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
tickerName = r.json()['ResultSet']['Result'][0]["name"]
except:
print("Sorry, I couldn't find the company you were looking for, try asking for a different one.")
exit()
else:
r = requests.post('http://d.yimg.com/autoc.finance.yahoo.com/autoc?query=' + ticker + '&region=1&lang=en', verify=False)
tickerSym = ticker
Expand Down Expand Up @@ -99,6 +100,7 @@
speechOutput += "It usually offers returns " + returnsType.lower() + ". "

print(speechOutput)
exit()



Expand Down Expand Up @@ -127,6 +129,7 @@
fullString += " To learn more about these stocks, ask me something like, 'Tell me about Apple'."

print(fullString)
exit()

if typeOfInfo == "info":
if len(ticker) > 5:
Expand All @@ -136,19 +139,23 @@
tickerName = r.json()['ResultSet']['Result'][0]["name"]
except:
print("Sorry, I couldn't find the company you were looking for, try asking for a different one.")
exit()
else:
r = requests.post('http://d.yimg.com/autoc.finance.yahoo.com/autoc?query=' + ticker + '&region=1&lang=en', verify=False)
tickerSym = ticker
try:
tickerName = r.json()['ResultSet']['Result'][0]["name"]
except:
print("Sorry, I couldn't find the ticker you were looking for, try asking for a different one.")
exit()
searches = wikipedia.search(tickerName)

if len(searches) == 0:
print("Sorry, I didn't find any info on " + ticker)
exit()
else:
print("Okay, here's some info about " + tickerName + ". " + wikipedia.summary(tickerName, sentences=4))

exit()
if typeOfInfo == "":
print("Sorry, I didn't understand what you meant.")
print("Sorry, I didn't understand what you meant.")
exit()

0 comments on commit 8f1a730

Please sign in to comment.