<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -5,11 +5,6 @@
 #   require 'titlepage'
 require File.dirname(__FILE__) + '/../lib/titlepage'
 
-client = TitlePage::WWWClient.new
-
-client.login(&quot;username&quot;, &quot;password&quot;)
-
-text = client.get_onix_file(&quot;9780060000707&quot;)
-puts text
-
-client.logout
+TitlePage::WWWClient.open(&quot;username&quot;,&quot;password&quot;) do |client|
+  puts client.get_onix_file(&quot;9780060000707&quot;)
+end</diff>
      <filename>examples/titlepage_www.rb</filename>
    </modified>
    <modified>
      <diff>@@ -30,7 +30,7 @@ module TitlePage
         data = [
           &quot;posted=yes&quot;,
           &quot;quicksearch=#{isbn}&quot;,
-          &quot;qsrchby=ean&quot;,
+          &quot;qsrchby=isbn13&quot;,
             &quot;detailed=Search&quot;
         ].join(&quot;&amp;&quot;)
         http.post('/results.php', data, headers)
@@ -60,7 +60,8 @@ module TitlePage
           &quot;pwd=#{password}&quot;,
           &quot;login=Login&quot;
         ].join(&quot;&amp;&quot;)
-        http.post('/index.php', data)
+        headers = { 'Referer' =&gt; 'http://www.titlepage.com/index.php' }
+        http.post('/index.php', data, headers)
       end
       @cookie = login_response['set-cookie']
     end</diff>
      <filename>lib/titlepage/wwwclient.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>12a39e29c0bb5c22128d65d63bf69701cc12e3a5</id>
    </parent>
  </parents>
  <author>
    <name>James Healy</name>
    <email>jimmy@deefa.com</email>
  </author>
  <url>http://github.com/yob/titlepage/commit/b5820305df7238889491e53da85cc4064704682e</url>
  <id>b5820305df7238889491e53da85cc4064704682e</id>
  <committed-date>2009-10-12T01:04:31-07:00</committed-date>
  <authored-date>2009-10-12T01:04:31-07:00</authored-date>
  <message>update code for fetching ONIX files over HTTP</message>
  <tree>fdf2dd561bca69b6984fc06bdfd36969647901c0</tree>
  <committer>
    <name>James Healy</name>
    <email>jimmy@deefa.com</email>
  </committer>
</commit>
