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'