Skip to content

Commit

Permalink
TN: Events: Add agenda docs (#4740)
Browse files Browse the repository at this point in the history
  • Loading branch information
showerst authored Dec 1, 2023
1 parent f5e6911 commit 92db1b1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scrapers/tn/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,21 @@ def scrape_chamber(self, chamber=None):
for doc in agenda:
agenda_url = doc.attrib["href"]
if agenda_url.endswith(".pdf"):
event.add_document(
"Agenda",
agenda_url,
media_type="application/pdf",
on_duplicate="ignore",
)
for bill in AgendaPdf(source=agenda_url).do_scrape():
event.add_bill(bill)
else:
event.add_document(
"Agenda",
agenda_url,
media_type="text/html",
on_duplicate="ignore",
)
for bill in AgendaHtml(source=agenda_url).do_scrape():
event.add_bill(bill)

Expand Down

0 comments on commit 92db1b1

Please sign in to comment.