def parse_pdf(self, pdf_url): filename = "tmp.pdf" f = open(filename, "wb") d = urllib2.urlopen(pdf_url) f.write(d.read()) f.close() prop = GovProposal(filename) # TODO: check if parsing handles more than 1 prop in a booklet return [{"title": prop.get_title(), "date": prop.get_date(), "bill": prop}]
def parse_pdf(self,pdf_url): filename = 'tmp.pdf' f = open(filename,'wb') d = urllib2.urlopen(pdf_url) f.write(d.read()) f.close() prop = GovProposal(filename) # TODO: check if parsing handles more than 1 prop in a booklet return [{'title':prop.get_title(),'date':prop.get_date(), 'bill':prop}]