ThingHTTP pulling MarketWatch data stops working during trading hours

1 ビュー (過去 30 日間)
Derek Huether
Derek Huether 2022 年 6 月 15 日
回答済み: Christopher Stapels 2022 年 6 月 20 日
Did a project that uses an ESP8266 and WS2812B, using ThingHTTP to pull MarketWatch data to display live stock symbols, trending prices, and trending percentages. Overall, everything works. I then discovered that during trading hours (09:30-16:00), all of the data displays on both the LED matrix and serial monitor as jumbled characters.
Am I missing some neccessary and obvious line of code that allows me to pull live data curing market hours?
Any direction is appreciated. Rather than including the ino code here, I'll just point to my public Github repo.
Thank you in advance!
  2 件のコメント
Derek Huether
Derek Huether 2022 年 6 月 16 日
That was it!
MarketWatch does indeed change the page during market hours.
During market hours, it is listing it in a div "intraday__data".


回答 (1 件)

Christopher Stapels
Christopher Stapels 2022 年 6 月 20 日
In case anyone stubles on this, Ill promote Derek's findings to an answer. During business hours, the xpath for the data changes, so you need dynamic code to get the value at all times. See the comments for more details.


その他の回答  ThingSpeak コミュニティ


Find more on Act on Data in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by