alexprengere / currencyconverter

A Python currency converter using the European Central Bank data.
http://alexprengere.github.io/currencyconverter
Apache License 2.0
215 stars 59 forks source link

Adding ECB urls to the code #27

Closed alonme closed 3 years ago

alonme commented 3 years ago

in commit https://github.com/alexprengere/currencyconverter/commit/f7973bc82ed29e837bb1b1056fc8e1a7240137e3 the urls were updated to https, i assume this was a change in ECB.

For my use case, i always need to get the current full history and so i have used the method described in the README, When the url changed to HTTPS, i was having some problems - and later found out about this change.

I think it would make sense to add the https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist.zip URL as a constant to the code, so if any changes occur, it will be updated with the package.

will be happy to contribute this.

alexprengere commented 3 years ago

I agree that there could be a static value like CurrencyConverter.ECB_SOURCE holding the latest known valid url. But in your case, this would have failed because that value would be out of date, unless you continuously update the library (and assuming I updated the value as well).

alonme commented 3 years ago

That's true, Specifically i do use tools to continuously update dependencies.

I will open a PR

alexprengere commented 3 years ago

Thanks! Closed by your PR #28