-
-
Save schuyler1d/605f350e0da876d32952a9769ee38d7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
http://jailtracker.net/current-facilities | |
hosts many jail databases across the country | |
One example, is | |
http://caseycountyjail.com/CaseyCoJail_inmatelist.html | |
There are a few steps to crawl the data. | |
1. Load the internal iframe, e.g. | |
https://jailtracker.com/jtclientweb/jailtracker/index/casey_county_ky | |
2. Find your 'session' key identifier which will track your requests. | |
Note: this is probably meant to stop people from crawling the database | |
so efforts to keep this updated. It will be a 24-character hash, e.g. | |
"5rgozlwf20ii1b255fvz3hu4" | |
3. Make a POST request to: | |
https://jailtracker.com/JTClientWeb/(S(5rgozlwf20ii1b255fvz3hu4))/JailTracker/GetInmateList | |
with `start=0&limit=100` | |
This will return the first 100 inmates, you can also add parameters: | |
`sort=LastName&dir=ASC` e.g. to sort on a column | |
with columns: | |
ArrestNo: Seems to be the main unique identifier in jailtracker | |
FirstName, MiddleName, LastName, Suffix, | |
FinalReleaseDateTime | |
Facility | |
Jacket: generally a string of numbers, presumably identifying the inmate for the facility | |
OriginalBookDateTime | |
* For a particular inmate you can do a POST to e.g. | |
https://jailtracker.com/JTClientWeb/(S(5rgozlwf20ii1b255fvz3hu4))/JailTracker/GetCases | |
with `arrestNo=` parameter matching the inmate | |
returning a payload like: | |
{"data":[{"CaseId":24601, | |
"CaseNo":"88*CR*19", | |
"Status":"Sentenced","BondType":"SENTENCED","BondAmount":0.00,"FineAmount":0.00,"Sentence":"0y 0m 0d","CourtTime":null}],"totalCount":1,"error":"","success":"true"} | |
* You can also get an image of the inmate with | |
https://jailtracker.com/JTClientWeb/(S(5rgozlwf20ii1b255fvz3hu4))/JailTracker/GetImage/ | |
with `arrestNo=` | |
""" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment