courts.tjrn.client.TJRNScraper

courts.tjrn.client.TJRNScraper()

Scraper for the Tribunal de Justica do Rio Grande do Norte (TJRN).

Uses the TJRN Elasticsearch-based JSON API at jurisprudencia.tjrn.jus.br.

Methods

Name Description
cjsg Search TJRN jurisprudence.
cjsg_download Download raw CJSG JSON responses from TJRN.
cjsg_parse Parse downloaded CJSG JSON responses.
cpopg Stub: first instance case consultation not implemented for TJRN.
cposg Stub: second instance case consultation not implemented for TJRN.

cjsg

courts.tjrn.client.TJRNScraper.cjsg(
    pesquisa=None,
    paginas=None,
    nr_processo='',
    id_classe_judicial='',
    id_orgao_julgador='',
    id_relator='',
    id_colegiado='',
    sistema='',
    decisoes='',
    jurisdicoes='',
    grau='',
    **kwargs,
)

Search TJRN jurisprudence.

Parameters

pesquisa : str Free-text search term (searched in ementa). paginas : int, list, range, or None Pages to download (1-based). None downloads all. nr_processo : str, optional Process number filter. id_classe_judicial : str, optional Judicial class ID. id_orgao_julgador : str, optional Judging body ID. id_relator : str, optional Reporter judge ID. id_colegiado : str, optional Collegiate body ID. sistema : str, optional "PJE", "SAJ", or empty for all. decisoes : str, optional "Monocraticas", "Colegiadas", "Sentencas", or empty for all. jurisdicoes : str, optional "Tribunal de Justica", "Turmas Recursais", or empty for all. grau : str, optional "1" (first), "2" (second), or empty for all.

Returns

pd.DataFrame

cjsg_download

courts.tjrn.client.TJRNScraper.cjsg_download(
    pesquisa=None,
    paginas=None,
    **kwargs,
)

Download raw CJSG JSON responses from TJRN.

Parameters are the same as :meth:cjsg.

Returns

list List of raw JSON responses (one per page).

cjsg_parse

courts.tjrn.client.TJRNScraper.cjsg_parse(resultados_brutos)

Parse downloaded CJSG JSON responses.

Parameters

resultados_brutos : list List of raw JSON responses from the TJRN API.

Returns

pd.DataFrame

cpopg

courts.tjrn.client.TJRNScraper.cpopg(id_cnj)

Stub: first instance case consultation not implemented for TJRN.

cposg

courts.tjrn.client.TJRNScraper.cposg(id_cnj)

Stub: second instance case consultation not implemented for TJRN.