diff --git a/crawler.py b/crawler.py index 1dff33f..89088a0 100644 --- a/crawler.py +++ b/crawler.py @@ -232,7 +232,7 @@ class Crawler: {"announcementCode": "110-175885", "announcementType":"采购意向"}, {"announcementCode": "110-978863", "announcementType":"采购公告"}, {"announcementCode": "110-943756", "announcementType":"更正公告"}, - {"announcementCode": "110-420383", "announcementType":"非政府采购公告"}, + {"announcementCode": "110-774650", "announcementType":"非政府采购公告"}, {"announcementCode": "110-900461", "announcementType":"结果公告"} ] for typeParam in infoType: diff --git a/localmain.py b/localmain.py index de10afd..b5dbc3c 100644 --- a/localmain.py +++ b/localmain.py @@ -24,29 +24,15 @@ print( # 设置运行环境。如果当前是测试环境,则将is_test设置为true is_test = False print(sys.platform) -if sys.platform == 'win32': - host = '116.62.210.190' - user = 'root' - password = 'Guoyan83086775' - if is_test: - database = 'guoyantest' - file_path = "./jdbc.test.properties" - else: - database = 'guoyan' - file_path = "./jdbc.properties" +host = '116.62.210.190' +user = 'root' +password = 'Guoyan83086775' +if is_test: + database = 'guoyantest' + file_path = "./jdbc.test.properties" else: - if is_test: - file_path = "/opt/eresource_test/webapp/WEB-INF/classes/prod/jdbc.properties" - database = 'guoyantest' - else: - file_path = "/opt/eresource/webapp/WEB-INF/classes/prod/jdbc.properties" - database = 'guoyan' - - # 打开jdbc.properties文件,获取数据库的配置信息 - props = Properties(file_path) - host = 'localhost' - user = props.get('jdbc.username') - password = props.get('jdbc.password') + database = 'guoyan' + file_path = "./jdbc.properties" # 打开数据连接 connect = pymysql.connect(host = host, user = user, password = password, database = database) diff --git a/main.py b/main.py index de915d4..de10afd 100644 --- a/main.py +++ b/main.py @@ -23,14 +23,17 @@ print( # 设置运行环境。如果当前是测试环境,则将is_test设置为true is_test = False +print(sys.platform) if sys.platform == 'win32': host = '116.62.210.190' user = 'root' password = 'Guoyan83086775' if is_test: database = 'guoyantest' + file_path = "./jdbc.test.properties" else: database = 'guoyan' + file_path = "./jdbc.properties" else: if is_test: file_path = "/opt/eresource_test/webapp/WEB-INF/classes/prod/jdbc.properties"