mirror of
https://github.com/bspeice/metrik
synced 2024-11-04 22:48:11 -05:00
Requests doesn't support 3.2, neither shall we
This commit is contained in:
parent
52eaa4b663
commit
6c91c1cb1f
@ -1,7 +1,6 @@
|
||||
language: python
|
||||
python:
|
||||
- "2.7"
|
||||
- "3.2"
|
||||
- "3.3"
|
||||
- "3.4"
|
||||
- "3.5"
|
||||
|
@ -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)
|
||||
|
@ -1,3 +1,3 @@
|
||||
luigi>=2.2.0
|
||||
pyquery>=1.2.13
|
||||
requests>=2.9.1
|
||||
requests>=2.11.0
|
Loading…
Reference in New Issue
Block a user