From 9217f2d216a63996569f3994492b3ee3cc796e49 Mon Sep 17 00:00:00 2001 From: Jesse Mortenson Date: Tue, 14 Jan 2025 00:35:56 -0600 Subject: [PATCH] Fix linting --- scrapers/pr/bills.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scrapers/pr/bills.py b/scrapers/pr/bills.py index bc485bc3d8..0e182d9261 100644 --- a/scrapers/pr/bills.py +++ b/scrapers/pr/bills.py @@ -334,14 +334,18 @@ def scrape_bill(self, chamber, session, url): html = self.s.get(url, headers=headers, verify=False).text page = lxml.html.fromstring(html) - page_header_elems = page.xpath('//main//div[contains(@class, "items-center")]/h1/text()') + page_header_elems = page.xpath( + '//main//div[contains(@class, "items-center")]/h1/text()' + ) if len(page_header_elems) > 0: page_header_text = page_header_elems[0].strip() bill_id = re.findall(r"[A-Z]{2}\d{4}", page_header_text)[0] else: self.logger.error(f"Bill found with no bill identifier at {url}") - bill_title_elems = page.xpath('//span/strong[text()="Título:"]/../following-sibling::span') + bill_title_elems = page.xpath( + '//span/strong[text()="Título:"]/../following-sibling::span' + ) if len(bill_title_elems) > 0: title = bill_title_elems[0].text_content().strip() else: