<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Ruby Screen Scraping with scRUBYt!</title>
	<atom:link href="http://www.justinspradlin.com/programming/ruby-screen-scraping-with-scrubyt/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.justinspradlin.com/programming/ruby-screen-scraping-with-scrubyt/</link>
	<description>Coding and such...</description>
	<lastBuildDate>Mon, 19 Jul 2010 21:15:22 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Justin Spradlin</title>
		<link>http://www.justinspradlin.com/programming/ruby-screen-scraping-with-scrubyt/comment-page-1/#comment-429</link>
		<dc:creator>Justin Spradlin</dc:creator>
		<pubDate>Thu, 01 Apr 2010 13:18:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinspradlin.com/?p=26#comment-429</guid>
		<description>@Justin

Thanks for the comment.

They syntax is a little funky for sure, but it is valid syntax.  I used an XML parser library called Hpricot for this example.  Hpricot takes a block of XML and allows you to parse out individual elements by referencing their Xpath.  For the example you gave above if the XML looked like this:

&lt;property&gt;
  &lt;mls&gt;1234&lt;/mls&gt;
  &lt;list_price&gt;123123&lt;/list_price&gt;
&lt;/property&gt;

You could pass that block of XML to Hpricot and access the different elements using the following syntax:

@mls = (property/:mls).inner_html
@list_price = (property/:list_price).inner_html


As far as the errors are concerned a lot has happened since I last used this script.  For one, ruby gems are no longer hosted on github so my customized jspradlin-scrubyt gem may no longer be available.  

Anyway, I do most of my screen scraping using a library called Nokogiri.  I&#039;d check that library out.  I find the syntax a little more intuitive.</description>
		<content:encoded><![CDATA[<p>@Justin</p>
<p>Thanks for the comment.</p>
<p>They syntax is a little funky for sure, but it is valid syntax.  I used an XML parser library called Hpricot for this example.  Hpricot takes a block of XML and allows you to parse out individual elements by referencing their Xpath.  For the example you gave above if the XML looked like this:</p>
<p>&lt;property&gt;<br />
  &lt;mls&gt;1234&lt;/mls&gt;<br />
  &lt;list_price&gt;123123&lt;/list_price&gt;<br />
&lt;/property&gt;</p>
<p>You could pass that block of XML to Hpricot and access the different elements using the following syntax:</p>
<p>@mls = (property/:mls).inner_html<br />
@list_price = (property/:list_price).inner_html</p>
<p>As far as the errors are concerned a lot has happened since I last used this script.  For one, ruby gems are no longer hosted on github so my customized jspradlin-scrubyt gem may no longer be available.  </p>
<p>Anyway, I do most of my screen scraping using a library called Nokogiri.  I&#8217;d check that library out.  I find the syntax a little more intuitive.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Reynen</title>
		<link>http://www.justinspradlin.com/programming/ruby-screen-scraping-with-scrubyt/comment-page-1/#comment-428</link>
		<dc:creator>Justin Reynen</dc:creator>
		<pubDate>Thu, 01 Apr 2010 05:51:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinspradlin.com/?p=26#comment-428</guid>
		<description>Hey, great article!

I&#039;m a bit of a Ruby newbie and just had a few questions.

I&#039;ve never see the syntax you use in your initialize function

def initialize(property)
    @mls = (property/:mls).inner_html
    @list_price = (property/:list_price).inner_html

I&#039;ve never see that (var/:symbol) syntax. Is that just a typo? What does the /: mean when in parenthesis?

Also, I&#039;ve tried running this example, and after fixing up a lot of versioning errors with the dependencies, I get a &#039;scan&#039;, ran out of buffer space error... has this happened to you?

Thanks!</description>
		<content:encoded><![CDATA[<p>Hey, great article!</p>
<p>I&#8217;m a bit of a Ruby newbie and just had a few questions.</p>
<p>I&#8217;ve never see the syntax you use in your initialize function</p>
<p>def initialize(property)<br />
    @mls = (property/:mls).inner_html<br />
    @list_price = (property/:list_price).inner_html</p>
<p>I&#8217;ve never see that (var/:symbol) syntax. Is that just a typo? What does the /: mean when in parenthesis?</p>
<p>Also, I&#8217;ve tried running this example, and after fixing up a lot of versioning errors with the dependencies, I get a &#8217;scan&#8217;, ran out of buffer space error&#8230; has this happened to you?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rachel</title>
		<link>http://www.justinspradlin.com/programming/ruby-screen-scraping-with-scrubyt/comment-page-1/#comment-152</link>
		<dc:creator>Rachel</dc:creator>
		<pubDate>Tue, 27 Oct 2009 20:20:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinspradlin.com/?p=26#comment-152</guid>
		<description>Interesting point on screen scrapers, For simple stuff i use python to screen scrape, but for larger projects i used extractingdata.com &lt;a href=&quot;http://www.extractingdata.com/screen%20scraper.htm&quot; rel=&quot;nofollow&quot;&gt;screen scraper&lt;/a&gt; which worked great, they build custom screen scrapers and data extracting programs</description>
		<content:encoded><![CDATA[<p>Interesting point on screen scrapers, For simple stuff i use python to screen scrape, but for larger projects i used extractingdata.com <a href="http://www.extractingdata.com/screen%20scraper.htm" rel="nofollow">screen scraper</a> which worked great, they build custom screen scrapers and data extracting programs</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ennuyer.net &#187; Blog Archive &#187; I am way behind on my rails link blogging. Link dump and reboot.</title>
		<link>http://www.justinspradlin.com/programming/ruby-screen-scraping-with-scrubyt/comment-page-1/#comment-151</link>
		<dc:creator>Ennuyer.net &#187; Blog Archive &#187; I am way behind on my rails link blogging. Link dump and reboot.</dc:creator>
		<pubDate>Sat, 09 May 2009 10:42:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinspradlin.com/?p=26#comment-151</guid>
		<description>[...]  Justin Spradlin » Ruby Screen Scraping with scRUBYt!  [...]</description>
		<content:encoded><![CDATA[<p>[...]  Justin Spradlin » Ruby Screen Scraping with scRUBYt!  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.justinspradlin.com/programming/ruby-screen-scraping-with-scrubyt/comment-page-1/#comment-150</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Wed, 29 Apr 2009 12:15:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.justinspradlin.com/?p=26#comment-150</guid>
		<description>Pretty cool.   I have used franklymls to find open houses in Northern Virginia.</description>
		<content:encoded><![CDATA[<p>Pretty cool.   I have used franklymls to find open houses in Northern Virginia.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
