courts.tjes.client.TJESScraper

courts.tjes.client.TJESScraper()

Scraper for the Tribunal de Justica do Espirito Santo.

Methods

Name Description
cjpg Search TJES first-instance jurisprudence (download + parse).
cjpg_download Download raw JSON results from the TJES first-instance search (core pje1g).
cjpg_parse Parse raw TJES first-instance results into a DataFrame.
cjsg Search TJES jurisprudence (download + parse).
cjsg_download Download raw JSON results from the TJES jurisprudence search.
cjsg_parse Parse raw TJES search results into a DataFrame.
cpopg Stub: first-instance case lookup not implemented for TJES.
cposg Stub: second-instance case lookup not implemented for TJES.

cjpg

courts.tjes.client.TJESScraper.cjpg(pesquisa=None, paginas=None, **kwargs)

Search TJES first-instance jurisprudence (download + parse).

Shortcut for :meth:cjpg_download + :meth:cjpg_parse. Queries the pje1g core. Accepts the same filter parameters as :meth:cjsg (except core).

Returns

pd.DataFrame

cjpg_download

courts.tjes.client.TJESScraper.cjpg_download(
    pesquisa=None,
    paginas=None,
    **kwargs,
)

Download raw JSON results from the TJES first-instance search (core pje1g).

Accepts the same filter parameters as :meth:cjsg_download (except core).

Returns

list Raw JSON responses, one per page.

cjpg_parse

courts.tjes.client.TJESScraper.cjpg_parse(resultados_brutos)

Parse raw TJES first-instance results into a DataFrame.

Parameters

resultados_brutos : list Raw JSON responses returned by :meth:cjpg_download.

Returns

pd.DataFrame

cjsg

courts.tjes.client.TJESScraper.cjsg(
    pesquisa=None,
    paginas=None,
    core=DEFAULT_CORE,
    busca_exata=False,
    magistrado=None,
    orgao_julgador=None,
    classe_judicial=None,
    jurisdicao=None,
    assunto=None,
    ordenacao=None,
    per_page=DEFAULT_PER_PAGE,
    data_julgamento_inicio=None,
    data_julgamento_fim=None,
    data_publicacao_inicio=None,
    data_publicacao_fim=None,
    **kwargs,
)

Search TJES jurisprudence (download + parse).

Returns a ready-to-analyze DataFrame. Accepts all the same parameters as :meth:cjsg_download.

cjsg_download

courts.tjes.client.TJESScraper.cjsg_download(
    pesquisa=None,
    paginas=None,
    core=DEFAULT_CORE,
    busca_exata=False,
    magistrado=None,
    orgao_julgador=None,
    classe_judicial=None,
    jurisdicao=None,
    assunto=None,
    ordenacao=None,
    per_page=DEFAULT_PER_PAGE,
    data_julgamento_inicio=None,
    data_julgamento_fim=None,
    data_publicacao_inicio=None,
    data_publicacao_fim=None,
    **kwargs,
)

Download raw JSON results from the TJES jurisprudence search.

Parameters

pesquisa : str, optional Search term. query and termo are accepted as deprecated aliases. paginas : int, list, range, or None Pages to download (1-based). int n means pages 1..n. None downloads all available pages. core : str Solr core to query: pje2g (default), pje2g_mono, legado, turma_recursal_legado. For first instance (pje1g), use :meth:cjpg instead. busca_exata : bool If True, perform exact-match search. magistrado : str Filter by judge name (exact, uppercase). orgao_julgador : str Filter by court division. classe_judicial : str Filter by judicial class. jurisdicao : str Filter by jurisdiction. assunto : str Filter by subject. ordenacao : str Sort expression (e.g. dt_juntada desc). per_page : int Results per page (default 20). data_julgamento_inicio / data_julgamento_fim : str Date range filter (YYYY-MM-DD). TJES uses dataIni/dataFim which filters on dt_juntada.

Returns

list Raw JSON responses, one per page.

cjsg_parse

courts.tjes.client.TJESScraper.cjsg_parse(resultados_brutos)

Parse raw TJES search results into a DataFrame.

Parameters

resultados_brutos : list Raw JSON responses returned by :meth:cjsg_download.

Returns

pd.DataFrame

cpopg

courts.tjes.client.TJESScraper.cpopg(id_cnj)

Stub: first-instance case lookup not implemented for TJES.

cposg

courts.tjes.client.TJESScraper.cposg(id_cnj)

Stub: second-instance case lookup not implemented for TJES.