diff --git a/EastMoneyPy/venv/main/eastmoney/getTimeLine.py b/EastMoneyPy/venv/main/eastmoney/getTimeLine.py index 3393da1..5fa1b61 100644 --- a/EastMoneyPy/venv/main/eastmoney/getTimeLine.py +++ b/EastMoneyPy/venv/main/eastmoney/getTimeLine.py @@ -60,11 +60,12 @@ def getGeGuZiJInLiu(bkData): url = 'http://push2.eastmoney.com/api/qt/clist/get?pn=1&pz=500&po=1&np=1&ut=&fltt=2&invt=2&fid=f62&fs=b:'+bkData[0]+'&stat=1&fields=f12,f14,f2,f3,f62,f184,f66,f69,f72,f75,f78,f81,f84,f87,f204,f205,f124' + # print(url) conn = httpConn.HttpConnect() data = conn.request_get(url) # print(data) - if data == '': + if data == '' or data['data'] is None: print('查询code失败') else: @@ -155,7 +156,7 @@ if allMsg != '': Email.sendNofity(allMsg) - WX.send('STK', allMsg) + # WX.send('STK', allMsg) # 检查资金流监控点是否需要发通知 def checkZiJinLiuNotify(): @@ -186,23 +187,25 @@ startTime = (time.time()) getAllCode() - - getBanKuaiZiJInLiu('1') - getBanKuaiZiJInLiu('2') - getBanKuaiZiJInLiu('3') - - pool = ThreadPool(10) - pool.map(getGeGuZiJInLiu, bkList) - pool.close() - pool.join() - - if len(sqlList) > 0: - db = dbConn.MY_SQL() - db.save_zijinliu_gegu_table(sqlList) + + # 资金流改为开关市时获取保存 + if '09:30' in s or '15:00' in s: + getBanKuaiZiJInLiu('1') + getBanKuaiZiJInLiu('2') + getBanKuaiZiJInLiu('3') + + pool = ThreadPool(10) + pool.map(getGeGuZiJInLiu, bkList) + pool.close() + pool.join() + + if len(sqlList) > 0: + db = dbConn.MY_SQL() + db.save_zijinliu_gegu_table(sqlList) checkNotify() - checkZiJinLiuNotify() + # checkZiJinLiuNotify() print(s + ' 用时: ' + str(time.time() - startTime))