<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -91,16 +91,15 @@ class Alert:
             _mkdir(self.get_dir())            
             
             if DUMP != types.NoneType:
-                #dcopy = html_rx.sub('', css_rx.sub('', script_rx.sub('', data))) #Strips scripts, styles and html. Could be handled a whole lot better. 
                 f2 = open(DUMP, 'a')
+                data += '\n\n'
                 f2.write(data)
                 f2.close()
             
             f = open(self.get_dir() + self.fname, 'w')
-            data += '\n\n'
             f.write(data)
             f.close()
-
+            
             
             #match = next_rx.search(data)
             #if match:
@@ -134,7 +133,7 @@ def _mkdir(newdir):
             os.mkdir(newdir)
 
 
-rx = re.compile(r'^&lt;(.*?)&gt;\n.*?\n&lt;.*?&gt;$', re.S | re.M)      #regex for std. google alert
+rx = re.compile(r'^&lt;(.*?)&gt;$.*?^&lt;.*?&gt;$', re.S | re.M)      #regex for std. google alert
 rx_fallback = re.compile(r'^&lt;(http://.*?)&gt;$', re.S | re.M)  #regex for google alert w/ one link
 def alert_from_msg(msg, day, month, year, label):
     &quot;&quot;&quot;Creates an Alert instance from a single Google Alert&quot;&quot;&quot;
@@ -195,6 +194,7 @@ def gmail_process_label(acct, label):
 
 
 def main():
+    count = 0
     ga = libgmail.GmailAccount(USER_NAME, PASSWORD)
     ga.login()
 
@@ -206,6 +206,8 @@ def main():
                 if alert.is_valid():
                     print &quot;Downloading&quot;, alert.link 
                     alert.download_link()
+                    count+=1
+    print count
 
     return alerts
 </diff>
      <filename>alertthing.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>244cd50030bd76db7204da9a98f6da16129e4e4d</id>
    </parent>
  </parents>
  <author>
    <name>Ken Schwencke</name>
    <email>kschwen@cranleigh.local</email>
  </author>
  <url>http://github.com/Schwanksta/alertthing/commit/3782aa4cf95ab1eee2e89f28e3ea218eccbe1224</url>
  <id>3782aa4cf95ab1eee2e89f28e3ea218eccbe1224</id>
  <committed-date>2008-09-17T17:14:50-07:00</committed-date>
  <authored-date>2008-09-17T17:14:50-07:00</authored-date>
  <message>Changed link regex</message>
  <tree>be1e294bd95e1a59240d50d1c655350764eb1a7d</tree>
  <committer>
    <name>Ken Schwencke</name>
    <email>kschwen@cranleigh.local</email>
  </committer>
</commit>
