3 ms·
One way to handle such breakage would be to define an extraction template on the fly, based on some content that doesn't change on the page. If, for e.g., you
by xtacy 16y ago
One way to handle such breakage would be to define an extraction template on the fly, based on some content that doesn't change on the page. If, for e.g., you know that the stock quote for Google has GOOG and some number somewhere inside the body, you could search for that pattern and save the XPath or something and reuse it on the other scraping.
scRUBYt (http://scrubyt.org/ http://scrubyt.org/) has a nice way of specifying such templates.