Open Bug 2069482 Opened 3 months ago Updated 2 months ago

Yahoo Finance doesn't always return price information

Categories

(Core :: Machine Learning: On Device, defect, P2)

defect

Tracking

()

People

(Reporter: tetchart, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [aiplatform])

Attachments

(2 files)

Attached image page —

This bug is non-deterministic. Page extractor for https://finance.yahoo.com/quote/VTI/?guccounter=1 sometimes returns VTI data and sometimes it doesn't. Attached are screenshots where monitor failed because of it

Attached image image.png —
Severity: -- → S3
Priority: -- → P2
Component: Machine Learning: General → Machine Learning: On Device
Summary: [Page Extractor] Yahoo Finance doesn't always return price information → Yahoo Finance doesn't always return price information

Took a few tries to reproduce, since it is timing dependent. The cause is that we read the page too early. Yahoo is a client side SPA that keeps filling in content for a few seconds after DOMContentLoaded, and the headless extractor reads at DOMContentLoaded plus one idle callback. Depending on how far hydration got, reader mode then picks the wrong block and the price is dropped. The fix is in the headless extractor: wait for the page to finish loading and go quiet (no pending requests, no DOM changes) before reading it, with a bounded wait so a page that never settles is still extracted.

Depends on: 2072322

Here I think the fix is the give Monitor a longer timeout for page loads to settle since it's not perf sensitive.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: