<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,6 @@
 &quot;&quot;&quot;
 * Scrapes the archive pages of one or more lists in a Mailman installation and republishes the contents, with an optional RSS feed.
-* v1.11, 2009-05-04
+* v1.12, 2009-05-04
 * http://github.com/philgyford/mailman-archive-scraper/
 * 
 * Only works with Monthly archives at the moment.
@@ -193,7 +193,11 @@ class MailmanArchiveScraper:
         #body_html = str(soup.pre)
 
         # Body of the message (everything within &lt;pre&gt;&lt;/pre&gt; tags) with all HTML tags stripped.
-        body_text = 'From: '+sender+'. '+''.join(soup.pre.findAll(text=True))
+        body_text = ''.join(soup.pre.findAll(text=True))
+        if sender:
+            # Just in case sender is empty because the contents have been stripped
+            # by the filtering process.
+            body_text = 'From: '+sender+'. '+ body_text
 
         # Add this message to the RSS feed.
         self.rss_items.append(
@@ -394,8 +398,9 @@ class MailmanArchiveScraper:
         # eg http://www.example.com/list-name/2009-February/000042.html
         local_message_url = self.publish_url + url_parts[-2] + '/' + url_parts[-1]
 
-        # Add this message to the RSS feed items...        
-        self.addRSSItem(local_message_url, message_time, soup)
+        if self.messages_fetched &lt; self.items_for_rss:
+            # Add this message to the RSS feed items...
+            self.addRSSItem(local_message_url, message_time, soup)
         
         return hours_ago
         </diff>
      <filename>MailmanArchiveScraper.py</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 # Mailman Archive Scraper
 
 By Phil Gyford &lt;phil@gyford.com&gt;  
-v1.11, 2009-05-04
+v1.12, 2009-05-04
 
 Latest version is available from &lt;http://github.com/philgyford/mailman-archive-scraper/&gt;
 </diff>
      <filename>README.markdown</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>733c780b222b262b1f7c0f3564abdab2070cc9de</id>
    </parent>
  </parents>
  <author>
    <name>Phil Gyford</name>
    <email>phil@gyford.com</email>
  </author>
  <url>http://github.com/philgyford/mailman-archive-scraper/commit/bcbd8f4f70e8a33834a07317b2a6fa244ccb8cf3</url>
  <id>bcbd8f4f70e8a33834a07317b2a6fa244ccb8cf3</id>
  <committed-date>2009-05-04T08:09:32-07:00</committed-date>
  <authored-date>2009-05-04T08:09:32-07:00</authored-date>
  <message>Fixed an error that occurred when trying to add an email sender's name
to the start of an RSS item's description, when the name has been erased
by the content filtering. Now, in such a case, the name and 'From: '
text is not included in the RSS item.

Also fixed the maximum number of RSS items that will appear in the feed
(or it would have included ALL messages scraped).</message>
  <tree>8ae1ac569fdbd90148431560afbdebb3fa0e252b</tree>
  <committer>
    <name>Phil Gyford</name>
    <email>phil@gyford.com</email>
  </committer>
</commit>
