Skip to content

Commit 973215b

Browse files
committed
future update
1 parent 76465be commit 973215b

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ def read(fname):
8282
'Programming Language :: Python :: 3.4',
8383
'License :: OSI Approved :: BSD License'],
8484
packages=['tushare','tushare.stock', 'tushare.data', 'tushare.util', 'tushare.datayes',
85-
'tushare.internet', 'tushare.fund', 'tushare.trader'],
85+
'tushare.internet', 'tushare.fund', 'tushare.trader', 'tushare.futures'],
8686
package_data={'': ['*.csv']},
8787
)

tushare/futures/intlfutures.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,13 @@ def get_intlfuture(symbols=None):
2424
df = _get_data(ct.INTL_FUTURE_URL%(ct.P_TYPE['http'], ct.DOMAINS['EM'],
2525
ct.PAGES['INTL_FUT'], symbols,
2626
_random(17)))
27-
print(df)
27+
return df
2828

2929
def _get_data(url):
3030
try:
3131
request = Request(url)
3232
data_str = urlopen(request, timeout=10).read()
33-
# data_str = data_str.decode('GBK')
3433
data_str = data_str.split('=')[1]
35-
# data_str = """
36-
# {futures:["CONX0,CONX,美原油11,50.32,50.23,49.80,50.58,49.72,0,137713,0.00,0,0,50.32,0.00,0,181562,-0.52,-1.03%,0.00,831,137713,0,-1,1,0.00,0.00,2016-10-17 21:38:49,0","GLNZ0,GLNZ,美黄金12,1251.7,1252.6,1256.9,1258.0,1251.1,0,67082,0.0,0,0,1251.7,0.0,0,373385,5.2,0.42%,0.0,62,67082,0,-1,0,0.0,0.0,2016-10-17 21:38:41,0"]}
37-
# """
3834
data_str = data_str.replace('futures', '"futures"')
3935
if six.PY3:
4036
data_str = data_str.decode('utf-8')

0 commit comments

Comments
 (0)