Skip to content

Commit

Permalink
Migrate to new urls
Browse files Browse the repository at this point in the history
  • Loading branch information
alexprengere committed Jan 28, 2021
1 parent d4bfd7a commit f7973bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ This is a currency converter that uses historical rates against a reference curr
Currency data sources
---------------------

The default source is the `European Central Bank <http://www.ecb.int/>`_. This is the ECB historical rates for 42 currencies against the Euro since 1999.
It can be downloaded here: `eurofxref-hist.zip <http://www.ecb.int/stats/eurofxref/eurofxref-hist.zip>`_.
The default source is the `European Central Bank <https://www.ecb.europa.eu>`_. This is the ECB historical rates for 42 currencies against the Euro since 1999.
It can be downloaded here: `eurofxref-hist.zip <https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist.zip>`_.
The converter can use different sources as long as the format is the same.

Installation
Expand Down Expand Up @@ -140,10 +140,10 @@ Finally, you can use your own currency file, as long as it has the same format (
c = CurrencyConverter()
# Load the up to date full history
c = CurrencyConverter('http://www.ecb.int/stats/eurofxref/eurofxref-hist.zip')
c = CurrencyConverter('https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist.zip')
# Load only the latest rates (single day data source)
c = CurrencyConverter('http://www.ecb.europa.eu/stats/eurofxref/eurofxref.zip')
c = CurrencyConverter('https://www.ecb.europa.eu/stats/eurofxref/eurofxref.zip')
# Load your custom file
c = CurrencyConverter('./path/to/currency/file.csv')
Expand Down
4 changes: 2 additions & 2 deletions test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def test_attributes(self):


def test_single_day_file():
c = CurrencyConverter('http://www.ecb.europa.eu/stats/eurofxref/eurofxref.zip')
c = CurrencyConverter('https://www.ecb.europa.eu/stats/eurofxref/eurofxref.zip')
assert len(c.currencies) == 33


Expand All @@ -205,7 +205,7 @@ def test_local_zip_file(self):
assert equals(c.convert(10, 'EUR', 'USD', date(2013, 3, 21)), 12.91)

def test_remote_zip_file(self):
c = CurrencyConverter('http://www.ecb.int/stats/eurofxref/eurofxref-hist.zip')
c = CurrencyConverter('https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist.zip')
assert len(c.currencies) == 42
assert equals(c.convert(10, 'EUR', 'USD', date(2013, 3, 21)), 12.91)

Expand Down
2 changes: 1 addition & 1 deletion update_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ DIRNAME=`dirname $0`
cd "$DIRNAME/currency_converter"

rm -f eurofxref-hist.zip
wget 'http://www.ecb.int/stats/eurofxref/eurofxref-hist.zip'
wget 'https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist.zip'

0 comments on commit f7973bc

Please sign in to comment.