diff --git a/.gitignore b/.gitignore index 8efb089..68a6255 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ __pycache__ *_out.json *.pdf *.bat -stderr.log \ No newline at end of file +stderr.log +sensitive.py \ No newline at end of file diff --git a/ctabus.py b/ctabus.py index 1e2b88b..e1de5c9 100644 --- a/ctabus.py +++ b/ctabus.py @@ -2,9 +2,7 @@ from urllib.parse import urlencode from urllib.request import urlopen import json import os.path as osp -with open(osp.join(osp.dirname(__file__),'cta_api_key')) as file: - api = file.read() - +from sensitive import api def get_data(type,api_key = api,**args): base_url = "http://www.ctabustracker.com/bustime/api/v2/{type}?{query}" args['key'] = api_key