-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtest_lister.py
48 lines (34 loc) · 1.36 KB
/
test_lister.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import sys
import os.path
import urllib2
import TerminalColors
tcol = TerminalColors.bcolors()
from stockspotter.lister.TickerLister import TickerLister
from stockspotter.db.SourceWSJ import SourceWSJ
from stockspotter.db.SourceWSJ import URLFactoryWSJ
# lister = TickerLister('equities_db/lists/', 1)
# tmp = lister.list_full_hkex(use_cached=True)
# for i,l in enumerate(tmp):
# print i,l
lister = TickerLister('equities_db/lists/', 1)
#full_list_bse = lister.list_full_bse(False)
#full_list_nse = lister.list_full_nse(False)
#full_list_hkex = lister.list_full_hkex(False)
#full_list = full_list_bse[0:3] + full_list_nse[0:3] + full_list_hkex[0:3]
# print full_list
# full_list_nyse = lister.list_full_nyse(True)
# full_list_nasdaq = lister.list_full_nasdaq(True)
# full_list_amex = lister.list_full_amex(True)
full_list_sse = lister.list_full_sse(True) #issue with excel file
full_list_szse = lister.list_full_szse( True )
# full_list_tyo = lister.list_full_tyo( True )
# for l in full_list_nse[0:3]:
# print l
# s_wsj = SourceWSJ( ticker=l.ticker, stock_prefix='equities_db/data__i/'+l.ticker, verbosity=1 )
# s_wsj.download_url()
# s_wsj.parse()
# s_wsj = SourceWSJ( ticker='AARVEEDEN.NSE', stock_prefix='equities_db/data__i/AARVEEDEN.NSE', verbosity=1 )
# s_wsj.download_url()
# s_wsj.parse()
# import pprint
# pprint.pprint( s_wsj.load_json_profile() )