From bb54ebfd003f3f252595ddce3f6da89aa72543ea Mon Sep 17 00:00:00 2001 From: Kevin Sheppard Date: Sat, 20 Jan 2018 10:38:53 +0000 Subject: [PATCH 1/2] BUG: Change google URLS Change Google finance urls closes #461 closes #462 --- pandas_datareader/google/daily.py | 2 +- pandas_datareader/google/quotes.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas_datareader/google/daily.py b/pandas_datareader/google/daily.py index d2fb6841..d3c5d696 100644 --- a/pandas_datareader/google/daily.py +++ b/pandas_datareader/google/daily.py @@ -44,7 +44,7 @@ def __init__(self, symbols=None, start=None, end=None, retry_count=3, @property def url(self): - return 'http://finance.google.com/finance/historical' + return 'https://finance.google.com/finance/historical' def _get_params(self, symbol): params = { diff --git a/pandas_datareader/google/quotes.py b/pandas_datareader/google/quotes.py index d15bdf10..ec3f639e 100644 --- a/pandas_datareader/google/quotes.py +++ b/pandas_datareader/google/quotes.py @@ -15,7 +15,7 @@ class GoogleQuotesReader(_BaseReader): @property def url(self): - return 'http://www.google.com/finance/info' + return 'https://finance.google.com/finance/info' @property def params(self): From 833d6a34af3754d03ce5956e946bf15e465da13c Mon Sep 17 00:00:00 2001 From: Kevin Sheppard Date: Sat, 20 Jan 2018 11:36:26 +0000 Subject: [PATCH 2/2] TST: Makr test as xfail when market closed Fail depth when market is not open --- pandas_datareader/tests/test_iex.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandas_datareader/tests/test_iex.py b/pandas_datareader/tests/test_iex.py index bc316490..01d6b4c9 100644 --- a/pandas_datareader/tests/test_iex.py +++ b/pandas_datareader/tests/test_iex.py @@ -45,4 +45,7 @@ def test_live_prices(self): def test_deep(self): dob = get_iex_book('GS', service='book') - assert 'GS' in dob + if dob: + assert 'GS' in dob + else: + pytest.xfail(reason='Can only get Book when market open')