From 542783b1be4b848f160f194e8e03d0d1cc8d1b35 Mon Sep 17 00:00:00 2001 From: Gianfranco Rossi Date: Fri, 12 Jan 2024 13:34:32 -0500 Subject: [PATCH] fix(colo): add Citation type "type" field is expected by courtlistener Citation model --- juriscraper/opinions/united_states/state/colo.py | 3 ++- tests/local/test_ScraperExtractFromTextTest.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/juriscraper/opinions/united_states/state/colo.py b/juriscraper/opinions/united_states/state/colo.py index 65304036c..a4ed9f072 100644 --- a/juriscraper/opinions/united_states/state/colo.py +++ b/juriscraper/opinions/united_states/state/colo.py @@ -25,7 +25,7 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.court_id = self.__module__ self.status = "Published" - self.url = f"https://www.courts.state.co.us/Courts/Supreme_Court/Proceedings/Index.cfm" + self.url = "https://www.courts.state.co.us/Courts/Supreme_Court/Proceedings/Index.cfm" def _process_html(self): """""" @@ -113,6 +113,7 @@ def extract_from_text(self, scraped_text: str) -> Dict[str, Any]: "volume": vol, "reporter": reporter, "page": page, + "type": 8, # NEUTRAL in courtlistener Citation model }, } return {} diff --git a/tests/local/test_ScraperExtractFromTextTest.py b/tests/local/test_ScraperExtractFromTextTest.py index df8e5d9d6..eb21a6fd9 100644 --- a/tests/local/test_ScraperExtractFromTextTest.py +++ b/tests/local/test_ScraperExtractFromTextTest.py @@ -106,6 +106,7 @@ class ScraperExtractFromText(unittest.TestCase): "volume": "2023", "reporter": "CO", "page": "63", + "type": 8, } }, ),