<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blogging and scraping &#187; scraping</title>
	<atom:link href="http://www.tsnpc.com/tag/scraping/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tsnpc.com</link>
	<description></description>
	<lastBuildDate>Mon, 12 Jul 2010 22:54:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>use watir for Page scraping</title>
		<link>http://www.tsnpc.com/use-watir-for-page-scraping/</link>
		<comments>http://www.tsnpc.com/use-watir-for-page-scraping/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 14:23:54 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[watir]]></category>
		<category><![CDATA[scraping]]></category>

		<guid isPermaLink="false">http://www.tsnpc.com/?p=61</guid>
		<description><![CDATA[The following is the code to use watir for Page scraping: require &#8216;watir&#8217; include Watir jinan = &#8220;http://homemsg.focus.cn/msgview/607/48996344.html&#8221; ie21 = IE.new ie21.goto jinanba puts ie21.table(:index =&#62; 9, :class =&#62; /p9/).text #puts ie21.table(:index =&#62; 11, :class =&#62; /p9/).html The following is the code to use firewatir for Page scraping, the reson to use firewatir is that [...]]]></description>
			<content:encoded><![CDATA[<p>The following is the code to use watir for Page scraping:</p>
<p>require &#8216;watir&#8217;<br />
include Watir</p>
<p>jinan = &#8220;http://homemsg.focus.cn/msgview/607/48996344.html&#8221;</p>
<p>ie21 = IE.new<br />
ie21.goto jinanba</p>
<p>puts ie21.table(:index =&gt; 9, :class =&gt; /p9/).text</p>
<p>#puts ie21.table(:index =&gt; 11, :class =&gt; /p9/).html</p>
<p>The following is the code to use firewatir for Page scraping, the reson to use firewatir is that the watir will wait for the page load:</p>
<p>require &#8216;firewatir&#8217;<br />
include FireWatir</p>
<p>jinanba = &#8220;http://homemsg.focus.cn/msgview/607/48996344.html&#8221;</p>
<p>ie21 = Firefox.new<br />
ie21.goto jinanba</p>
<p>fout = File.new(&#8220;test.txt&#8221;, &#8220;w&#8221;)<br />
fout.puts ie21.table(:index , 16).html<br />
fout.close</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tsnpc.com/use-watir-for-page-scraping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
