Is this even possible?

Can this be done, If this "widget" is ran on a web page it will return the price for WTI Crude Oil.
Is there a way for me to run this code and extract the WTI price and get it formattted as a json object?

<!-- Crude Price Script - OILCRUDEPRICE.COM -->
<div style="width:238px; border:1px solid #2D6AB4;height:auto;background-color:#FFFFFF;font-family:Arial,sans-serif;"><div style="background-color:#2D6AB4;width:100%; margin:0 auto;font-weight:bold;text-align:center; padding-top:0px;"><a href="https://www.oilcrudeprice.com/" style="font-size:20px; color:#FFFFFF;text-decoration:none;" rel="nofollow">WTI Crude Price</a></div><script src="https://www.oilcrudeprice.com/oilwidget.php?m=000000&g=FFFFFF&c=2D6AB4&i=FFFFFF&l=76A4FB&o=E6F2FA&w=240&u=wti"></script></div>
<!-- End of Crude Price Script -->

Well, my question would be:
What do you get back from this script?

Saves me loading it and running it.

You want to extract the price from https://www.oilcrudeprice.com/wti-oil-price/?

It seems like an http request node and an HTML parse node set to extract p#wtip will do it.

"77.74 US Dollar -0.13 (-0.17%)"
1 Like

Could you provide me with an example of how this would look in the HTML parse node?

Thanks for the pointer, I have been able to figure out what I need and I have it working. Once again thanks for the help

If I visit the oilcrudeprice.com page today it gives me one price, and changes it after a second or two:
Untitled 3

Untitled 4

Scraping the data with the HTML parse node gives the first value $77.74. (same as it did last night)

Does this indicate that the site falsifies the initial data to discourage scraping?

1 Like

In my opinion, I don't think so. This data is stock market data and depending on who they actually get their information from will depend on how often the "REAL-TIME" values are updated.

Some stock market data is not updated over the weekends while other's are.
And I'm only using this data as a "Guideline", for "Estimated Daily Production Values".

But thanks for the heads up.

jbudd, Thank you for your detailed observation. You was correct. I'm back to the drawing board.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.