1
0
mirror of https://github.com/bspeice/metrik synced 2024-11-23 15:48:10 -05:00

Requests doesn't support 3.2, neither shall we

This commit is contained in:
Bradlee Speice 2016-08-08 23:31:49 -04:00
parent 52eaa4b663
commit 6c91c1cb1f
4 changed files with 3 additions and 5 deletions

View File

@ -1,7 +1,6 @@
language: python language: python
python: python:
- "2.7" - "2.7"
- "3.2"
- "3.3" - "3.3"
- "3.4" - "3.4"
- "3.5" - "3.5"

View File

@ -1,4 +1,3 @@
import requests
from luigi import Task, Parameter from luigi import Task, Parameter
from pyquery import PyQuery as pq from pyquery import PyQuery as pq
import logging import logging
@ -44,7 +43,7 @@ class BloombergEquityInfo(Task):
url = 'http://www.bloomberg.com/quote/{}'.format( url = 'http://www.bloomberg.com/quote/{}'.format(
quote_plus(bbg_code)) quote_plus(bbg_code))
logging.info('Visiting "{}" with agent "{}'.format(url, user_agent)) 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'] keys = ['Sector', 'Industry', 'Sub-Industry']
eq_info = EquityInfoParser(keys) eq_info = EquityInfoParser(keys)

View File

@ -1,3 +1,3 @@
luigi>=2.2.0 luigi>=2.2.0
pyquery>=1.2.13 pyquery>=1.2.13
requests>=2.9.1 requests>=2.11.0

View File

@ -10,7 +10,7 @@ setup(
install_requires=[ install_requires=[
'pyquery >= 1.2.13', 'pyquery >= 1.2.13',
'luigi >= 2.2.0', 'luigi >= 2.2.0',
'requests >= 2.9.1', 'requests >= 2.11.0',
'six >= 1.10.0' 'six >= 1.10.0'
], ],
setup_requires=[ setup_requires=[