Skip to content

Commit 6d0f240

Browse files
committed
process cases with links to other cases, bump version to 22
1 parent 6021f56 commit 6d0f240

File tree

5 files changed

+403
-11
lines changed

5 files changed

+403
-11
lines changed

examples/multi_case_table.html

+344
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,344 @@
1+
<!DOCTYPE html>
2+
<!--[if lt IE 7]> <html lang="en-US" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
3+
<!--[if IE 7]> <html lang="en-US" class="no-js lt-ie9 lt-ie8"> <![endif]-->
4+
<!--[if IE 8]> <html lang="en-US" class="no-js lt-ie9"> <![endif]-->
5+
<!--[if gt IE 8]><!--> <html lang="en-US" class="no-js"> <!--<![endif]-->
6+
<head>
7+
<meta charset="utf-8">
8+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
9+
<title>
10+
OSCN Case Details
11+
</title>
12+
<meta name="description" content="">
13+
<meta name="viewport" content="width=device-width, initial-scale=1">
14+
15+
16+
<link rel="stylesheet" href="/assets/css/normalize.min.css">
17+
<link rel="stylesheet" href="/assets/css/main.css">
18+
<link rel="stylesheet" href="/assets/css/bootstrap-2.3.2.min.css">
19+
<link rel="stylesheet" href="/assets/css/oscn-navigation.css">
20+
<link rel="stylesheet" href="/assets/css/oscn-footer.css">
21+
22+
<!-- /STYLESHEET_INLINE/ -->
23+
<script src="/assets/js/modernizr-2.6.2.min.js"></script>
24+
<!--[if lt IE 9]>
25+
<script src="/assets/js/respond.min.js"></script>
26+
<script>
27+
window.onload = function() {
28+
setTimeout(function(){
29+
var height = $(".footer").outerHeight(true);
30+
$("#oscn-content").css("padding-bottom", function(){
31+
return height;
32+
});}, 2000);
33+
}
34+
</script>
35+
<![endif]-->
36+
<script src="/assets/js/cookies.js"></script>
37+
<!-- /JAVASCRIPT_TOP/ -->
38+
<script>
39+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
40+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
41+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
42+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
43+
44+
ga('create', 'UA-54280338-1', {'sampleRate': 50});
45+
ga('send', 'pageview');
46+
</script>
47+
</head>
48+
<body>
49+
<div class="wrapper">
50+
<!-- /ERRORMESSAGE/ -->
51+
<div class="header">
52+
<div class="accessibility">
53+
<a href="#oscn-content">Skip to Main Content</a>
54+
<a href="/v4/accessibility/">Accessibility Statement</a>
55+
</div>
56+
<div class="navigation-tophat">
57+
<div class="sized">
58+
<div class="left">
59+
<ul>
60+
<li><a href="http://www.oscn.net/applications/oscn/SimpleHelp.asp?HelpContextID=">Help</a></li>
61+
<li><a href="http://www.oscn.net/applications/oscn/SimpleHelp.asp?HelpContextID=84">Contact Us</a></li>
62+
</ul>
63+
</div>
64+
<div class="right">
65+
<ul>
66+
<!--<li><a href="">e-filing</a></li>-->
67+
<li><a href="https://pay.oscn.net/epayments/">e-payments</a></li>
68+
<li><a href="/jobs/">Careers</a></li>
69+
<!-- <li class="site-search no-border">
70+
<form class="search-form" method="get" action="/search/search.aspx">
71+
<div class="search-container">
72+
<select class="template-dropdown" style="display: none;">
73+
<option class="template-option"></option>
74+
</select>
75+
<select class="search-dropdown" name="t">
76+
<optgroup label="Legal Research">
77+
<option value="citation">By Citation (QuickCite)</option>
78+
<option value="judge">By Judge</option>
79+
<option value="caselaw">Case Law (full-text)</option>
80+
<option value="statutes">Statutes &amp; Rules (full-text)</option>
81+
<option value="library">All Oklahoma Materials (full-text)</option>
82+
</optgroup>
83+
<optgroup label="Court Records">
84+
<option selected="selected" value="party">By Party Name</option>
85+
<option value="business">By Business Name</option>
86+
<option value="casenumber">By Case Number</option>
87+
<option value="traffic">By Traffic Citation</option>
88+
</optgroup>
89+
</select></div><!--
90+
<input class="search-input" type="text" value="Search" name="q"></input><!--
91+
<button class="search-button" type="submit" value="Go!"></button>
92+
</form>
93+
</li>-->
94+
</ul>
95+
</div>
96+
</div>
97+
</div>
98+
<div class="navigation-spectacles sized">
99+
<div class="navigation-utility">
100+
<div class="brand"><a href="/"><img id="logo" class="screen-logo" alt="OSCN" src="/assets/img/logo.jpg" /><img class="print-logo" alt="" src="/assets/img/logo-bw.jpg" /></a></div>
101+
<div class="toggle" style="display: none;"><button type="button" data-toggle="navigation"><span class="sr-only">toggle navigation</span></button></div>
102+
</div>
103+
<nav>
104+
<ol class="nav-menu">
105+
<li class="nav-item" id="home"><a href="/v4/">Home</a></li>
106+
<li class="nav-item" id="courts_menu"><a href="/courts/">Courts</a></li>
107+
<li class="nav-item" id="decisions"><a href="/decisions/">Decisions</a></li>
108+
<li class="nav-item" id="programs"><a href="/v4/programs/">Programs</a></li>
109+
<li class="nav-item" id="news"><a href="/news/">News</a></li>
110+
<li class="nav-item" id="legal-research"><a href="http://www.oscn.net/applications/oscn/start.asp?viewType=LIBRARY">Legal Research</a></li>
111+
<li class="nav-item" id="court-records"><a href="/dockets/">Court Records</a></li>
112+
<li class="nav-item" id="quick-links"><a href="/v4/quicklinks/">Quick Links</a></li>
113+
</ol>
114+
</nav>
115+
</div>
116+
</div>
117+
<div id="oscn-content"><div class="sized">
118+
<style>
119+
td, th { padding: 2px 5px; }
120+
h2.styletop {
121+
text-align: left;
122+
background: #033c60;
123+
color: white;
124+
margin: 0;
125+
padding: 6px;
126+
font-size: 18px;
127+
text-transform: uppercase;
128+
font-weight: bold;
129+
}
130+
span.styletop { display: block; text-align: center; }
131+
132+
.section {
133+
text-transform: uppercase;
134+
color: #033c60;
135+
padding: 2px 5px;
136+
background-color: #f7f7f7;
137+
border-top: 1px #e1e1e1 solid;
138+
border-bottom: 1px #e1e1e1 solid;
139+
font-size: 22px;
140+
text-align: left;
141+
}
142+
143+
.partyCounts thead th { text-decoration: underline; }
144+
.paddedContainer { width: 75px; }
145+
.partyName, .dispositionInformation, .CountDescription { padding: 2px 5px; }
146+
.CountNumber { width: 75px; }
147+
.CountNumber, .partyName, .dispositionInformation, .CountDescription { vertical-align: top; }
148+
149+
p { margin: 0; padding: 0; }
150+
table th { text-align: left; }
151+
table { margin-bottom: 10px; width: 100%; border-collapse: collapse; }
152+
153+
.caseStyle { }
154+
.caseStyle td { border: 1px solid #e1e1e1; padding: 5px 10px; }
155+
156+
.docketRow td { padding: 5px 2px; border-top: thin solid #e1e1e1; border-bottom: thin solid #e1e1e1;}
157+
158+
.evenRow { background-color: #f7f7f7;}
159+
.oddRow { background-color: white; }
160+
161+
.multipleRecords {
162+
width: 100%;
163+
position: relative;
164+
margin-top: 2em;
165+
margin-bottom: 2em;
166+
}
167+
.multipleRecords caption {
168+
text-align: left;
169+
font-weight: bold;
170+
position: relative;
171+
background: #033c60;
172+
color: white;
173+
margin: 0;
174+
padding: 6px;
175+
font-size: 18px;
176+
text-transform: uppercase;
177+
position: relative;
178+
}
179+
.foundRecords {
180+
position: absolute;
181+
right: 5px; font-size: 14px;
182+
}
183+
.multipleRecords thead th {
184+
font-size: 13px;
185+
text-align: left;
186+
padding: 4px 3px;
187+
vertical-align: top;
188+
background-color: #f7f7f7;
189+
}
190+
.tablerow { border-top: thin solid #e1e1e1; }
191+
.tablerow td { font-size: 11px; padding: 4px 3px; color: #033c60; vertical-align: top;}
192+
193+
194+
#rev, .revLabel { display: inline; margin: 0; }
195+
196+
.heading3 {
197+
text-transform: uppercase;
198+
color: #033c60;
199+
padding: 2px 5px;
200+
background-color: #f7f7f7;
201+
border-top: 1px #e1e1e1 solid;
202+
border-bottom: 1px #e1e1e1 solid;
203+
font-size: 22px;
204+
text-align: center;
205+
margin-top: 2em;
206+
}
207+
208+
table { margin: 0 auto 0 auto; }
209+
.casetype { width: 50%; }
210+
.casetype caption {
211+
text-align: center;
212+
color: #033c60;
213+
margin: 0;
214+
padding: 10px 5px;
215+
font-size: 18px;
216+
text-transform: uppercase;
217+
font-weight: bold;
218+
}
219+
.casetype th {
220+
font-size: 13px;
221+
text-align: left;
222+
padding: 4px 3px;
223+
vertical-align: top;
224+
background-color: #f7f7f7;
225+
border-top: 1px #e1e1e1 solid;
226+
border-bottom: 1px #e1e1e1 solid;
227+
}
228+
.casetype tr {
229+
border-top: 1px #e1e1e1 solid;
230+
border-bottom: 1px #e1e1e1 solid;
231+
}
232+
.casetype td { padding: 3px 4px; }
233+
.casenoformat { width: 350px; }
234+
.casenoformat tbody tr td { text-align: center; }
235+
table caption { }
236+
.casetype { min-width: 250px; }
237+
form label { font: bold 11pt arial; }
238+
.padding { height: 2em; }
239+
</style>
240+
<table class="multipleRecords">
241+
<caption>delaware&nbsp;County Search Results
242+
<span class="foundRecords">
243+
Found 2 Records.
244+
</span></caption>
245+
<thead>
246+
<tr>
247+
<th>Case Number</th>
248+
<th>Date Filed</th>
249+
<th>Style</th>
250+
<th>Date Closed</th>
251+
</tr>
252+
</thead>
253+
<tbody>
254+
<tr class="tablerow oddRow">
255+
<td><a href="GetCaseInformation.aspx?db=delaware&cmid=13291">CF-2018-00020A</a></td>
256+
<td>01/12/2018</td>
257+
<td><a href="GetCaseInformation.aspx?db=delaware&cmid=13291">STATE OF OKLAHOMA V. COLTON WAYNE GIBSON</a></td>
258+
<td>
259+
</td>
260+
</tr>
261+
<tr class="tablerow evenRow">
262+
<td><a href="GetCaseInformation.aspx?db=delaware&cmid=219234">CF-2018-00020B</a></td>
263+
<td>01/12/2018</td>
264+
<td><a href="GetCaseInformation.aspx?db=delaware&cmid=219234">STATE OF OKLAHOMA V. JUSTIN GIBSON</a></td>
265+
<td>
266+
</td>
267+
</tr>
268+
</tbody>
269+
</table>
270+
</div></div>
271+
<div class="footer">
272+
<div class="container-fluid sized">
273+
<div class="row-fluid">
274+
<div class="contact-foot column span3">
275+
<h6>oscn</h6>
276+
<p>
277+
EMAIL: <a href="mailto:[email protected]">[email protected]</a><br />
278+
Oklahoma Judicial Center<br />
279+
2100 N Lincoln Blvd.<br />
280+
Oklahoma City, OK 73105</p>
281+
</div>
282+
<div class="courts-foot column span3">
283+
<h6>courts</h6>
284+
<ul class="footer-list">
285+
<li><a href="http://www.oscn.net/oscn/schome/">Supreme Court of Oklahoma</a></li>
286+
<li><a href="http://www.okcca.net/">Court of Criminal Appeals</a></li>
287+
<li><a class="pdf-link" target="_blank" href="http://www.oscn.net/static/osc-ojs-brochure-online.pdf">Court of Civil Appeals</a></li>
288+
<li><a href="http://www.oscn.net/applications/oscn/start.asp?viewType=COURTS">District Courts</a></li>
289+
</ul>
290+
</div>
291+
<div class="decisions-foot column span3">
292+
<h6>decisions</h6>
293+
<ul class="footer-list">
294+
<li><a href="/decisions/">New Decisions</a></li>
295+
<li><a href="http://www.oscn.net/applications/oscn/Index.asp?ftdb=STOKCSSC">Supreme Court of Oklahoma</a></li>
296+
<li><a href="http://www.oscn.net/applications/oscn/Index.asp?ftdb=STOKCSCR">Court of Criminal Appeals</a></li>
297+
<li><a href="http://www.oscn.net/applications/oscn/Index.asp?ftdb=STOKCSCV">Court of Civil Appeals</a></li>
298+
</ul>
299+
</div>
300+
<div class="programs-foot column span3">
301+
<h6>programs</h6>
302+
<ul class="footer-list">
303+
<li><a href="http://www.thesovereigntysymposium.com/splash.aspx">The Sovereignty Symposium</a></li>
304+
<!--<li><a href="#">Access to Justice</a></li>-->
305+
<li><a href="http://www.oscn.net/static/adr/default.aspx">Alternative Dispute Resolution</a></li>
306+
<li><a href="http://www.oscn.net/static/adr/default.aspx">Early Settlement Mediation</a></li>
307+
<li><a href="http://www.oscn.net/Sites/CourtImprovement/default.aspx">Children's Court Improvement Program (CIP)</a></li>
308+
<li><a href="/jnc/">Judicial Nominating Commission</a></li>
309+
<li><a href="http://www.oscn.net/static/forms/aoc_forms/interpreter.asp">Certified Courtroom Interpreters</a></li>
310+
<li><a href="http://www.oscn.net/static/forms/aoc_forms/csr.asp">Certified Shorthand Reporters</a></li>
311+
<li><a href="/pages/accessibility">Accessibility ADA</a></li>
312+
</ul>
313+
</div>
314+
</div>
315+
</div>
316+
<div class="shoes">
317+
<div class="sized">
318+
<ul>
319+
<!--<li><a href="#">site map</a></li>
320+
<li><a href="#">information</a></li>
321+
-->
322+
<li><a href="http://www.oscn.net/applications/oscn/SimpleHelp.asp?HelpContextID=84">Contact Us</a></li>
323+
<li><a href="/jobs/">Careers</a></li>
324+
<li><a href="/pages/accessibility">Accessibility ADA</a></li>
325+
</ul>
326+
</div>
327+
</div>
328+
</div>
329+
</div>
330+
<script src="/assets/js/jquery-1.11.1.min.js"></script>
331+
<script src="/assets/js/bootstrap.min.js"></script>
332+
<script src="/assets/js/adobe.aria.menu.min.js"></script>
333+
<script src="/assets/js/navigation.js"></script>
334+
<script src="/assets/js/oscn.js"></script>
335+
<script src="/assets/js/table.sort.filter.js"></script>
336+
<script src="/dockets/scripts/dockets.js"></script>
337+
<!--[if IE 7]>
338+
<script>
339+
var height = $(".home-banner").height();
340+
$("#bg").height(height);
341+
</script>
342+
<![endif]-->
343+
</body>
344+
</html>

oscn/parse/multirecord_cases.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Some case URL's return a list of 'sbu' caseStyle
2+
# See an example in examples/multi_case_table.html
3+
# this function looks return a list of cmids for if found
4+
5+
from bs4 import BeautifulSoup
6+
from urllib.parse import parse_qs
7+
8+
9+
def cmids(oscn_html):
10+
soup = BeautifulSoup(oscn_html, 'html.parser')
11+
cmids = []
12+
ref_table = soup.find('table', 'multipleRecords')
13+
if ref_table:
14+
for row in ref_table.find('tbody').find_all('tr'):
15+
href = row.find('a')['href']
16+
cmids += parse_qs(href)['cmid']
17+
18+
return cmids
19+
20+
setattr(cmids, 'target', ['Case'])

0 commit comments

Comments
 (0)