fromstockeyeimportwatch# This gives your script access to your gmail account, may want to use a throwaway# Make sure "Allow Access To Less Secure Apps" is turned on in gmail settings# If using a throwaway, adjust email_to to your real email!email_self='[email protected]'email_password='yourpassword'email_from=email_selfemail_to=email_selfcredentials= [email_self, email_password, email_from, email_to]
# Stocks to monitor (add up to 100 with each run)ticks= ['MSFT', 'PFE', 'BOX', 'MNST', 'LLY', 'AAPL',
'BBY', 'TSLA', 'WFG', 'AMZN', 'JNJ', 'NFLX',
'BIIB', 'GE', 'GILD', 'SHAK', 'VRTX', 'CMG']
# Properties included in statistics report (see below for more)properties= ['Open',
'DaysLow',
'DaysHigh',
'Ask',
'PercentChange',
'Volume',
'ShortRatio',
'DividendYield',
'PERatio']
threshold=3# Number of recent articles published before an email is sent (default = 3)hourspast=18# Define....recent (default = 18)sentences=3# Length of summary generated for each article (deafult = 3)firstlast=False# Include first/last sentence of the artice in its summary (default = False)watch(credentials, ticks, properties, threshold, hourspast, sentences, firstlast)
This run will take approximately 9 minutes
Finding news for MSFT
Finding news for PFE
Finding news for BOX
Finding news for MNST
Finding news for LLY
Finding news for AAPL
Finding news for BBY
Finding news for TSLA
Finding news for WFG
Finding news for AMZN
Finding news for JNJ
Finding news for NFLX
Finding news for BIIB
Finding news for GE
Finding news for GILD
Finding news for SHAK
Finding news for VRTX
Finding news for CMG