From 28c91aa34e0ce10bf2732f09111b5802b277b177 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Sun, 7 Aug 2016 22:07:40 -0400 Subject: [PATCH] Add requests? --- metrik/tasks/bloomberg.py | 7 ++++++- requirements.txt | 3 ++- setup.py | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/metrik/tasks/bloomberg.py b/metrik/tasks/bloomberg.py index e11910f..1bccb98 100644 --- a/metrik/tasks/bloomberg.py +++ b/metrik/tasks/bloomberg.py @@ -1,8 +1,13 @@ from luigi import Task, Parameter from pyquery import PyQuery as pq -from urllib.parse import quote_plus import logging +try: + from urllib.parse import quote_plus +except ImportError: + # noinspection PyUnresolvedReferences + from urllib import quote_plus + class BloombergEquityInfo(Task): bbg_code = Parameter() diff --git a/requirements.txt b/requirements.txt index 37c3272..7e317fb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ luigi>=2.2.0 -pyquery>=1.2.13 \ No newline at end of file +pyquery>=1.2.13 +requests>=2.9.1 \ No newline at end of file diff --git a/setup.py b/setup.py index b2367ab..01bf184 100644 --- a/setup.py +++ b/setup.py @@ -10,6 +10,7 @@ setup( install_requires=[ 'pyquery >= 1.2.13', 'luigi >= 2.2.0', + 'requests >= 2.9.1' ], setup_requires=[ 'pytest_runner'