Recent submissions

Comment · 5 years ago
Comment · 6 years ago
I’m receiving many spams. GitHub should warn the leak of email addresses...
Comment · 6 years ago
Comment · 6 years ago
I think the author claims the XPath is more "robust" because it doesn't depend on indexes of the elements so you can add elements without breaking the XPath. (But it is arguable which one is better ...)
Comment · 6 years ago
It depends on the content of the HTML document but I agree with you.

I tried running the algorithm in Chrome. It output much shorter XPath than one copied from Chrome Developer tool.

  e.g. "//*[@id="rso"]/div[4]/div/div[1]/a/h3" => "//*[contains(text(),'(text of the element)')]"
Comment · 6 years ago
The algorithm described in the paper is outlined as follows (just for my curiosity):

"The algorithm starts with a generic XPath locator that returns all nodes (‘//*’) and then it iteratively refines the locator until only the element of interest is selected. In such iterative refinement, ROBULA+ applies seven refinement transformations, according to a set of heuristic XPath specialization steps."

The algorithm seems to be a specialized heuristics for XPath generation.

Comment · 6 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton