LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data socket

Solved!
Go to solution
Hello everyone. I am stuck on data socket. I need to check oil price using data socket: I tried very simple code but it gives error.
but I also tried Yahoo format as well but still it gives me error. can anybody give me some direction?
 
0 Kudos
Message 1 of 6
(1,642 Views)
Solution
Accepted by topic author Rahman009

According to Help for "Data Socket Open", https is not supported protocol (at least it's not listed as valid). Replace it with http and then it opened for me.

0 Kudos
Message 2 of 6
(1,638 Views)

Hi Rahman,

 

Datasocket does NOT support HTTPS protocol - as is written in the error message…

 

Have you tried the HTTP functions instead?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 6
(1,636 Views)

Yes sir. I found my mistake. It really opens now. but shows very large string. Can please tell me what regular expression I should use to get this value (attached in picture) from this site

https://markets.businessinsider.com/commodities/oil-price?type=wti&fbclid=iwar0jwjsdbvswrygnscri_bil...

Rahman009_0-1623254362302.png

 

0 Kudos
Message 4 of 6
(1,559 Views)

Thank you all. I just made the regular expression check. and then sub string. I perfectly getting value now.

0 Kudos
Message 5 of 6
(1,554 Views)

I couldn't get it to update the way it updates on website, they must have some kind of delay to prevent bots in the background.

 

I made it for bitcoin tracking to test it out, but it only updates once every 5 minutes or so (as opposed to ~30s on website).

 

bitcoin.png

0 Kudos
Message 6 of 6
(1,507 Views)