[cc-commits] [CC SVN] r15318 - stats/europeana

webmaster at creativecommons.org webmaster at creativecommons.org
Wed Oct 26 16:38:09 EDT 2011


Author: cronuser at backup
Date: 2011-10-26 20:38:09 +0000 (Wed, 26 Oct 2011)
New Revision: 15318

Modified:
   stats/europeana/nightly_import_scrape.py
Log:
Tweak the Europeana regex to make it more flexible.

Modified: stats/europeana/nightly_import_scrape.py
===================================================================
--- stats/europeana/nightly_import_scrape.py	2011-10-26 13:34:27 UTC (rev 15317)
+++ stats/europeana/nightly_import_scrape.py	2011-10-26 20:38:09 UTC (rev 15318)
@@ -14,7 +14,7 @@
     '''Scrape Europeana for PDM 1.0 count'''
     page = urllib2.urlopen(query).read()
     soup = BeautifulSoup(page)
-    regex = re.compile('Results\s+1\s+-\s+12\s+of\s+([0-9,]+)')
+    regex = re.compile('\s+Results\s+1\s+-\s+12\s+of\s+([0-9,]+)\s+')
     count_part = soup.firstText(regex)
     if count_part:
         pdm_count = regex.match(count_part).group(1)



More information about the cc-commits mailing list