Hello, KM community. I've got a programming problem and would like some assistance.
So I've got an image that shows different stock tickers, which is part of an RRG chart showing whether the stocks are leading, weakening, lagging or improving. I'm trying to monitor just what stocks pop up in Improving, in the blue text.
I output an image of this information as printing to PDF did not preserve the color lines for the text. I'd like to work with KM to sample the color (I guess) until it reaches the blue color that I need, then I can read the tickers somehow? Doing it without OCR would be best, since I never get really good accuracy, either with KM or with a terminal tool like Tesseract.
I can't access any data about the tickers but I can save the "inner text" of the website and thus find the tickers themselves for cross-reference. Sadly, the order of the tickers is randomized, making things a little more complex, since I just want the final blue lines.
I did try dumping the image onto ChatGPT but found it giving pretty bad results, mis-reading the tickers or making some up. Since I want to save this data every day, having an LLM do a huge data analysis every day also feels like it would be a waste.
If you "just" want to know what stocks are in blue text, which is what you said, that sounds pretty easy. In your sample data, all the blue stocks have a column with a blue checkmark over a blue background. So all you need to do is create a For Loop doing an Image Search for that icon. Within the loop, you can get the image using a screen capture, and then use OCR on the screen capture to determine and display the names of the stocks.
Sorry, I should have said "black text on the blue background." My eyes are getting worse and worse. I guess I should say that my OCR is having trouble these days!
I would guess that if you view the source of the page, there's a class associated with the blue-listed stocks, and that should make it pretty simple to find those stocks on the page.
Can you possibly post the source of the page? If you can't, then try sending the source to ChatGPT and asking it to find MOD and SKX using JavaScript.