<div dir="ltr">As it turns out, I am using my first immutable data set today. <div>I blame Martin for it! :-) <div><br></div><div>... but won't be using grep or Xpaths today.<br><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 10, 2016 at 10:50 AM, Grant McLean <span dir="ltr"><<a href="mailto:grant@mclean.net.nz" target="_blank">grant@mclean.net.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, 2016-02-10 at 10:20 +1300, Donovan Jones wrote:<br>
> On the subject of "just use grep" for html parsing. I am not entirely<br>
> serious, I have done plenty of not using grep with perl and python<br>
> using xpath or css selectors. My point it more that when you are<br>
> scraping you are at the mercy of whoever produced the html you are<br>
> interested in. This means that A, 90% of the time the semantic markup<br>
> is shit so you can never target the actual thing you are after<br>
<br>
</span>One related use case where things aren't quite so bad is when you're<br>
writing regression tests for your own system.  Ideally in that case you<br>
should be able to add the necessary classes/IDs to make writing tests<br>
easy and the result should not be too brittle.  In this case, I'd<br>
definitely recommend CSS selectors / XPath.<br>
<br>
Cheers<br>
<div class="HOEnZb"><div class="h5">Grant<br>
<br>
_______________________________________________<br>
Wellington-pm mailing list<br>
<a href="mailto:Wellington-pm@pm.org">Wellington-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/wellington-pm" rel="noreferrer" target="_blank">http://mail.pm.org/mailman/listinfo/wellington-pm</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><img src="https://s3-ap-southeast-2.amazonaws.com/regenpublic/NRG53199.png" width="420" height="101"><br></div></div></div></div></div></div></div></div></div></div>
</div>