Hello guys, I want to extract the value of two stocks from one website. As an example I wrote BTCUSD and EURUSD. Actually I know how to pull data from the web, but something happened here that I don’t understand.
Below is a picture that I have listed (from 1 to 4). When I first click on the BTCUSD button, it does not fetch data. It brings the initial value “0”. But the second time I click it, it brings up the correct data. Then when I click on EURUSD, the same problem this time brings the previous data (BTCUSD). When I click on EURUSD a second time, it brings up the correct data. Then when I click on BTCUSD, it brings back the previous data (EURUSD) again. It goes on like this …
The code pictures below return the same result.
My question is: How do I get the right data to labels with every click?