Skip to content

Commit 5fa7cbf

Browse files
Merge pull request #5699 from openstates/il-set-user-agent
IL: seems to blocking requests/python user-agent string
2 parents 6e18a44 + 6fe7c1f commit 5fa7cbf

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

scrapers/il/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,11 @@ class Illinois(State):
190190
]
191191

192192
def get_session_list(self):
193-
response = requests.get("https://ilga.gov/API/Legislation/GetGeneralAssemblies")
193+
headers = {"User-Agent": "openstates.org"}
194+
response = requests.get(
195+
"https://ilga.gov/API/Legislation/GetGeneralAssemblies", headers=headers
196+
)
197+
194198
response.raise_for_status()
195199
session_list = [ga["gaLabel"] for ga in response.json()]
196200

0 commit comments

Comments
 (0)