title: Download the posts from a Google group before resetting
body: <p>I want to reset one of my groups (a class discussion), but I would like to retain the discussion for reference. There aren't many posts (maybe 50), and I could do it by hand, but is there a way to do that through google apps scripts or python? </p>
  
  <p>I found a few possibilities, but neither in a language I'm familiar with (though I might be able to translate): </p>
  
  <p>this link: <a href="http://saturnboy.com/2010/03/scraping-google-groups/" rel="nofollow">http://saturnboy.com/2010/03/scraping-google-groups/</a></p>
  
  <p>this Perl code: </p>
  
  <pre><code>#!/usr/bin/perl
  # groups2csv.pl
  # Google Groups results exported to CSV suitable for import into Excel.
  # Usage: perl groups2csv.pl &lt; groups.html &gt; groups.csv
  
  # The CSV Header.
  print qq{"title","url","group","date","author","number of articles"\n};
  
  # The base URL for Google Groups.
  my $url = "http://groups.google.com";
  
  # Rake in those results.
  my($results) = (join '', &lt;&gt;);
  
  # Perform a regular expression match to glean individual results.
  while ( $results =~ m!&lt;a href=(/groups[^\&gt;]+?rnum=[0-9]+)&gt;(.+?)&lt;/a&gt;.*?
  &lt;br&gt;(.+?)&lt;br&gt;.*?&lt;a href="?/groups.+?class=a&gt;(.+?)&lt;/a&gt; - (.+?) by 
  (.+?)\s+.*?\(([0-9]+) article!mgis ) {
      my($path, $title, $snippet, $group, $date, $author, $articles) =
          ($1||'',$2||'',$3||'',$4||'',$5||'',$6||'',$7||'');
      $title =~ s!"!""!g; # double escape " marks
      $title =~ s!&lt;.+?&gt;!!g; # drop all HTML tags
      print qq{"$title","$url$path","$group","$date","$author","$articles"\n\n};
  }
  </code></pre>