From 1504b1862cc8db037eab800f094e7bd030e54b5f Mon Sep 17 00:00:00 2001 From: Derek Willis Date: Fri, 2 Jun 2017 13:00:19 -0400 Subject: [PATCH] repoint cspan update url --- scripts/cspan.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/cspan.py b/scripts/cspan.py index 5f848a3..e1a4084 100755 --- a/scripts/cspan.py +++ b/scripts/cspan.py @@ -9,9 +9,9 @@ def run(): # load in current members y = load_data("legislators-current.yaml") for m in y: - # retrieve C-SPAN id, if available, from NYT API + # retrieve C-SPAN id, if available, from ProPublica API # TODO: use utils.download here - response = urllib.request.urlopen("http://politics.nytimes.com/congress/svc/politics/v3/us/legislative/congress/members/%s.json" % m['id']['bioguide']).read() + response = urllib.request.urlopen("https://projects.propublica.org/represent/api/v1/members/%s.json" % m['id']['bioguide']).read() j = json.loads(response.decode("utf8")) cspan = j['results'][0]['cspan_id'] if not cspan == '': @@ -19,4 +19,4 @@ def run(): save_data(y, "legislators-current.yaml") if __name__ == '__main__': - run() \ No newline at end of file + run()