I wrote a language that&#x27;s basically a superset of this (<a href="https:&#x2F;&#x2F;github.com&#x2F;fizx&#x2F;parsley&#x2F;wiki" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fizx&#x2F;parsley&#x2F;wiki</a>) back in 2008 and used it to crawl a variety of insane job posting sites.<p>As crawling complexity increases, pretty soon you want an actual programming language to specify things like crawl order and cache behavior.  Multi-page behavior was very hard to describe declaratively for misbehaving sites.<p>Also, it&#x27;s a terrible default (for security reasons) to let the web pages you&#x27;re parsing automagically initiate new requests to arbitrary urls.<p>Such as it is, I believe that the following works in some version of parsley, though I doubt its an official release.<p><pre><code>    {
      &quot;articles&quot;: [ {
         &quot;title&quot;: &quot;.title a&quot;,
         &quot;comment_link&quot;: &quot;follow(.subtext a:nth-child(3) @href) .athing:nth-child(1) .default&quot;
      } ]
    }
</code></pre>
At some point, these json things might as well be as readable as regex :&#x2F;