From 6c91c1cb1f1b479ed8d0e14503f8071b20668541 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Mon, 8 Aug 2016 23:31:49 -0400 Subject: [PATCH] Requests doesn't support 3.2, neither shall we --- .travis.yml | 1 - metrik/tasks/bloomberg.py | 3 +-- requirements.txt | 2 +- setup.py | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index e5d3175..695289a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: python python: - "2.7" - - "3.2" - "3.3" - "3.4" - "3.5" diff --git a/metrik/tasks/bloomberg.py b/metrik/tasks/bloomberg.py index f8abc9c..ab901c8 100644 --- a/metrik/tasks/bloomberg.py +++ b/metrik/tasks/bloomberg.py @@ -1,4 +1,3 @@ -import requests from luigi import Task, Parameter from pyquery import PyQuery as pq import logging @@ -44,7 +43,7 @@ class BloombergEquityInfo(Task): url = 'http://www.bloomberg.com/quote/{}'.format( quote_plus(bbg_code)) logging.info('Visiting "{}" with agent "{}'.format(url, user_agent)) - html = requests.get(url, headers={'User-Agent': user_agent}).text + html = pq(url, {'User-Agent': user_agent}).html() keys = ['Sector', 'Industry', 'Sub-Industry'] eq_info = EquityInfoParser(keys) diff --git a/requirements.txt b/requirements.txt index 7e317fb..62450d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ luigi>=2.2.0 pyquery>=1.2.13 -requests>=2.9.1 \ No newline at end of file +requests>=2.11.0 \ No newline at end of file diff --git a/setup.py b/setup.py index 99a0580..34f56ad 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( install_requires=[ 'pyquery >= 1.2.13', 'luigi >= 2.2.0', - 'requests >= 2.9.1', + 'requests >= 2.11.0', 'six >= 1.10.0' ], setup_requires=[