-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
30 lines (21 loc) · 816 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# -*- coding: utf-8 -*-
"""
Created on Tue Aug 4 13:18:41 2020
@author: karby
"""
import WebScraper as scraper
'''
The README explains what is going on in this file
'''
base_url = 'https://finance.yahoo.com/quote/'
web_attrs = {'stock_key' : '?p='}
# This is the different type of data we want to get
# And below are the stocks we want to get
tickers = ['AAPL', 'GOOG', 'CAT']
pages = {'income': 'financials', 'balance' : 'balance-sheet',
'Cash Flow' : 'cash-flow', 'Key Stats' : 'key-statistics'}
financial_data = {t : scraper.get_data(t, base_url, web_attrs,
pages=pages,
data_source='yahoo', start='2018-1-1',
frequency=1, interval=1)
for t in tickers}