diff --git a/scrapers/common/base_item.py b/scrapers/common/base_item.py index 44d71f0..ac16642 100644 --- a/scrapers/common/base_item.py +++ b/scrapers/common/base_item.py @@ -9,3 +9,4 @@ class BaseItem: model: str data: dict scraped_at: datetime = datetime.now(UTC) + source: str = "50-a.org" diff --git a/scrapers/fifty_a/fifty_a/items.py b/scrapers/fifty_a/fifty_a/items.py index f88e2cf..ad64fde 100644 --- a/scrapers/fifty_a/fifty_a/items.py +++ b/scrapers/fifty_a/fifty_a/items.py @@ -40,5 +40,6 @@ class CommandItem(FiftyAItem): @dataclass class OfficerItem(FiftyAItem): + employment: List[dict] = None service_start: str = None diff --git a/tests/fifty_a/fifty_a/spiders/test_officer.py b/tests/fifty_a/fifty_a/spiders/test_officer.py index a9a4739..a069603 100644 --- a/tests/fifty_a/fifty_a/spiders/test_officer.py +++ b/tests/fifty_a/fifty_a/spiders/test_officer.py @@ -46,7 +46,6 @@ def test_parse_officer(self): for e in officer.employment: assert e["agency_uid"] == AGENCY_UID assert "/command/" in e["unit_uid"] - try: valid_data = CreateOfficer(**officer.data) except ValueError as e: