brazilian-courts-scrappers
Version:
Data scrapper para fazer raspagem de dados de processos judiciais dos portais de tribunais do Brasil.
33 lines (32 loc) • 1.56 kB
TypeScript
import ScrappedParte from "../data-structures/ScrappedParte";
import PartesScrapper, { PartesReturn } from "./PartesScrapper";
import { tiposParte } from "../utils";
type Pje1gTrt5WrapperReturn = {
dontHaveCpfCnpj: boolean;
noCpfCnpjReason: string;
cpf: string;
cnpj: string;
email: string;
endereco: string;
};
type CpfCnpjInfoReturn = Pick<Pje1gTrt5WrapperReturn, "dontHaveCpfCnpj" | "noCpfCnpjReason" | "cpf" | "cnpj">;
type AdvogadoInfoReturn = Pick<Pje1gTrt5WrapperReturn, "cpf" | "email"> & {
oab: string | undefined;
};
export default class Pje1gTjbaParteScrapper extends PartesScrapper {
protected macroContainer: Document | HTMLElement;
protected poloAtivoContainer: HTMLElement | null;
protected poloPassivoContainer: HTMLElement | null;
protected outrosContainer: HTMLElement | null;
constructor(macroContainer: Document | HTMLElement);
fetchParticipantesInfo(): PartesReturn | undefined;
protected loadPageCheckpoints(): void;
protected getPartes(): PartesReturn;
protected getCompletePolo(partesWrapper: HTMLElement | null, tipoDeParte: tiposParte): ScrappedParte[];
protected getInfoFromPje1gTrt5Wrappers(until3Wrappers: NodeListOf<HTMLElement>): Pje1gTrt5WrapperReturn;
protected getCpfCnpjInfo(wrapperArray: HTMLElement[]): CpfCnpjInfoReturn;
protected getAdvogados(advsWrapper: NodeListOf<HTMLElement>): ScrappedParte[];
protected getAdvogadoName(advWrapper: HTMLElement): string;
protected getAdvogadoInfo(array: string[]): AdvogadoInfoReturn;
}
export {};