3 ms·
Does anyone have insights on how to refine this to only monitor specific elements of the page rather than the entire page? I may not care if they change a temp
by AdamSC1 10y ago
Does anyone have insights on how to refine this to only monitor specific elements of the page rather than the entire page?
I may not care if they change a template but would care if they change a price or a warrant canary etc?
- tedmiston 10y agoYou could use an XPath or similar to extract the part of the HTML you care about. Similarly with a library like Beautiful Soup you can traverse the HTML a lot like a jQuery selector.
- wlkr 10y agoI suspect you'd want to search for a specific attribute or tag combination, I used the scrape package [0] recently and found it a pleasure to use. Beyond the example provided in the README the documentation [1] is also good. [0] https://github.com/yhat/scrape https://github.com/yhat/scrape [1] https://godoc.org/github.com/yhat/scrape https://godoc.org/github.com/yhat/scrape