1
0
mirror of https://github.com/bspeice/metrik synced 2024-11-04 22:48:11 -05:00

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
This commit is contained in:
Bradlee Speice 2016-08-07 21:43:46 -04:00
parent 9a42cceccd
commit 90548ffdea

View File

@ -1,5 +1,6 @@
from luigi import Task, Parameter from luigi import Task, Parameter
from pyquery import PyQuery as pq from pyquery import PyQuery as pq
import logging
class BloombergEquityInfo(Task): class BloombergEquityInfo(Task):
@ -8,6 +9,8 @@ class BloombergEquityInfo(Task):
@staticmethod @staticmethod
def retrieve_info(bbg_code, user_agent): 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), html = pq('http://www.bloomberg.com/quote/{}'.format(bbg_code),
{'User-Agent': user_agent}) {'User-Agent': user_agent})