Forum > General

get the value of the dollar in each currency of each country

(1/1)

Ericktux:
good night brothers, does anyone know how to get the updated price of the dollar in the currency of each country?
for example to obtain the public IP I have seen that a website is consulted and a result is received.
If someone has any idea please help me.

trev:
Be aware that the terms of use for all the currency websites I've used explicitly forbid the automatic or manual systematic extraction of their data.

kapibara:
Maybe it's overkill, but using Python within Lazarus is a very powerful way of getting and updating any kind of data from the web. You could install Python4Lazarus (maintained by Alexey), write a python script and run it within a Lazarus application. From Python you could even have the script start a (headless, invisible) browser that manages logins, and then saves your data to disk. Some components in Python4Lazarus have events so you can get a notice when certain things has taken place within the script while it is running. https://github.com/Alexey-T/Python-for-Lazarus

There is a learning curve for doing this, but if the data is difficult to get it could be worth it. I use Spyder 4.0 to write and test scripts, it has code-completion. If you go this route, I suggest installing something like Spyder, write a python script that successfully grabs data and then run it from Lazarus. You probably want to parse, check and save the data in a database and being a beginner in Python I prefer doing that using Lazarus and Object Pascal.

wp:

--- Quote from: Ericktux on November 28, 2021, 04:32:50 am ---does anyone know how to get the updated price of the dollar in the currency of each country?

--- End quote ---
I have a small program for this on my github: https://github.com/wp-xyz/ExchangeRates

Ericktux:
Thank you all very much, especially to WP, your example runs perfect, I already believe my "APP ID" and the program works very well, thank you very much.   :) :)

Navigation

[0] Message Index

Go to full version