Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Rockyzsu committed Apr 27, 2019
1 parent 36ead23 commit 81c057d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
4 changes: 3 additions & 1 deletion foreignexchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
# @Time : 2018/8/7 13:45
# @File : foreignexchange.py
# 实时获取外汇
import os
import re
import datetime
import requests
from setting import sendmail,get_mysql_conn,llogger
logger = llogger(__file__)
filename=os.path.basename(__file__)
logger = llogger('log/'+filename)

class ForeighExchange(object):

Expand Down
6 changes: 3 additions & 3 deletions jisilu.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
import six
from send_mail import sender_139
from sqlalchemy import VARCHAR

import os
engine = get_engine('db_jisilu')
logger = llogger(__file__)
logger = llogger('log/'+'jisilu')


# 爬取集思录 可转债的数据
class Jisilu(object):
def __init__(self):

# self.check_holiday()
self.check_holiday()

# py2
if six.PY2:
Expand Down
4 changes: 3 additions & 1 deletion plot_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
mpl.rcParams['axes.unicode_minus'] = False
from setting import llogger

logger = llogger(__file__)
filename=os.path.basename(__file__)
logger = llogger('log/'+filename)

engine = get_engine('db_stock', local=True)
base_info = pd.read_sql('tb_basic_info', engine, index_col='index')

Expand Down
4 changes: 2 additions & 2 deletions simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from send_mail import sender_139
from setting import get_engine, get_mysql_conn, is_holiday, llogger, DATA_PATH

logger = llogger(__file__)

filename=os.path.basename(__file__)
logger = llogger('log/'+filename)

class Simulation():

Expand Down
4 changes: 2 additions & 2 deletions stockInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import re
from lxml import etree
from setting import llogger, get_mysql_conn, DATA_PATH
filename=os.path.basename(__file__)
logger = llogger('log/'+filename)

logger = llogger(__file__)
# headers={'User-Agent': 'Mozilla/5.0 (6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36'}
my_useragent = [
'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50',
'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50',
Expand Down
4 changes: 2 additions & 2 deletions yesterday_zt_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from plot_line import plot_stock_line
from setting import llogger

logger = llogger(__file__)

filename=os.path.basename(__file__)
logger = llogger('log/'+filename)

def monitor():
engine = get_engine('db_zdt')
Expand Down
7 changes: 2 additions & 5 deletions zdt.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@
import setting
from setting import is_holiday, DATA_PATH
import pandas as pd
import tushare as ts
from setting import llogger
import requests
from send_mail import sender_139
import datetime
# reload(sys)
# sys.setdefaultencoding('gbk')

logger = llogger(__file__)

filename=os.path.basename(__file__)
logger = llogger('log/'+filename)

class GetZDT:
def __init__(self):
Expand Down

0 comments on commit 81c057d

Please sign in to comment.