From 90548ffdead4bc36b7a90668c6723d938f570912 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Sun, 7 Aug 2016 21:43:46 -0400 Subject: [PATCH] Add logging to see if I can figure out what's going on Travis is giving me a 404 error, not sure what's happening --- metrik/tasks/bloomberg.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/metrik/tasks/bloomberg.py b/metrik/tasks/bloomberg.py index a5b3dd2..970ac93 100644 --- a/metrik/tasks/bloomberg.py +++ b/metrik/tasks/bloomberg.py @@ -1,5 +1,6 @@ from luigi import Task, Parameter from pyquery import PyQuery as pq +import logging class BloombergEquityInfo(Task): @@ -8,6 +9,8 @@ class BloombergEquityInfo(Task): @staticmethod def retrieve_info(bbg_code, user_agent): + url = 'http://www.bloomberg.com/quote/{}'.format(bbg_code) + logging.info('Visiting "{}" with agent "{}'.format(url, user_agent)) html = pq('http://www.bloomberg.com/quote/{}'.format(bbg_code), {'User-Agent': user_agent})