july 2013 scraper fixes
[disclosr.git] / documents / scrapers / 8e874a2fde8aa0ccdc6d14573d766540.py
blob:a/documents/scrapers/8e874a2fde8aa0ccdc6d14573d766540.py -> blob:b/documents/scrapers/8e874a2fde8aa0ccdc6d14573d766540.py
--- a/documents/scrapers/8e874a2fde8aa0ccdc6d14573d766540.py
+++ b/documents/scrapers/8e874a2fde8aa0ccdc6d14573d766540.py
@@ -11,7 +11,7 @@
                 links = []
                 description = ""
 		for atag in entry.find_all('a'):
-			if atag.has_key('href'):
+			if atag.has_attr('href'):
 				link = scrape.fullurl(self.getURL(),atag['href'])			
                                 (url,mime_type,htcontent) = scrape.fetchURL(scrape.docsdb, link, "foidocuments", self.getAgencyID(), False)
                                 if htcontent != None:
@@ -22,7 +22,7 @@
                                                     description = description + text.encode('ascii', 'ignore')
 
                                                 for atag in soup.find(id="SortingTable").find_all("a"):
-                                                      	if atag.has_key('href'):
+                                                      	if atag.has_attr('href'):
                                                               	links.append(scrape.fullurl(link,atag['href']))
 
 		if links != []:
@@ -43,7 +43,7 @@
                 links = []
                 description = ""
 		for atag in entry.find_all('a'):
-			if atag.has_key('href'):
+			if atag.has_attr('href'):
 				link = scrape.fullurl(self.getURL(),atag['href'])			
                                 (url,mime_type,htcontent) = scrape.fetchURL(scrape.docsdb, link, "foidocuments", self.getAgencyID(), False)
                                 if htcontent != None:
@@ -53,7 +53,7 @@
                                                 for text in soup.find(id="content-item").stripped_strings:
                                                     description = description + text + " \n"
                                                 for atag in soup.find(id="content-item").find_all("a"):
-                                                    if atag.has_key('href'):
+                                                    if atag.has_attr('href'):
                                                         links.append(scrape.fullurl(link,atag['href']))
 		if links != []:
                  	doc.update({'links': links})