Skip to content

Commit ac4caaa

Browse files
fix: DC scraper crashes mid-run on non-PDF attachments, dropping bills (#5706)
* fix: use get_media_type() for non-PDF attachments in DC bill details * style: apply black formatting
1 parent c925c3f commit ac4caaa

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

scrapers/dc/bills.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def scrape(self, session=None):
4949
leg_listing = resp.json()
5050

5151
for leg in leg_listing:
52-
5352
bill = Bill(
5453
leg["legislationNumber"],
5554
legislative_session=session,
@@ -209,7 +208,7 @@ def scrape(self, session=None):
209208
mimetype = (
210209
"application/pdf"
211210
if act["attachment"].endswith("pdf")
212-
else None
211+
else get_media_type(act["attachment"])
213212
)
214213
is_version = False
215214
# figure out if it's a version from type/name

0 commit comments

Comments
 (0)