New member, first post.
For quite a while I had been using the formula below to import "Earnings Date" from https://www.cnbc.com/quotes/AAL?qsearchterm=aal to GoogleSheets. For the past few months, the formula has stopped working. My understanding is, data elements have been moved around on the CNBC page (redesigned) and I am no longer correctly "pointing" to the element I wish to import ("Earnings Date"). I don't know HTML to figure out how to correct the formula below so it points to "Earnings Date" (under "Events") on the "redesigned" web page. All my trial and error efforts have been in vain.
A ticker symbol has to be entered in the search box at the top right side of the page; this prompts CNBC to pull data for that ticker symbol. One of the data elements is "Earnings Date." It can be found on the lower half of the page, under the heading "Events." A ticker symbol picked at random: AAL. In this example, the data element I am looking for is "01/18/2023(est)."
Please note: The formula below is only the HTML portion of the formula I use in GoogleSheets; I have left out the part that pertains to the "spreadsheet" portion. I will be happy to share the full formula if that helps.
I am requesting assistance in getting the formula below corrected so it "points" to "Earnings Date" on CNBC's web site.
If this is not the correct forum, please guide me to an appropriate forum.
why not use some named elements so you don't have to traverse from the top of the dom?
ul.Summary-events-stock li.Summary-stat span.Summary-value
In the teach a man to fish department … you should learn to use the Inspector.
In your browser right click on the date data you want and choose "Inspect Element".
This will tell you a lot about the structure.
What I'm suggesting is that the <ul class="Summary-events-stock"> is unique on the page, so you can start there and follow to the next <li> and the correct <span>
Thank you for all the support: it is greatly appreciated! I was able to update second half of the formula using "XPath."
During my research I learnt websites change ("update") pages and use newer (website) technology to prevent "competitors" from importing data from the website; however, that puts individuals like myself in a quandary.
Jimlongo, thank you for your suggestion. I will work towards incorporating named elements in my formula: it will make my formula more manageable and easier to update.
For the record, the updated second half of the formula is as follows:
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)