Crawler

package
v0.0.0-...-3fb9039 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InitWebSite = "https://esaj.tjsp.jus.br/cpo"
	EndWebSite  = "g/open.do"
)
View Source
const (
	SiteLogin  = "https://esaj.tjsp.jus.br/sajcas/login"
	XpathUser  = "//*[@id=\"usernameForm\"]"
	XpathPass  = "//*[@id=\"passwordForm\"]"
	XpathBtt   = "//*[@id=\"pbEntrar\"]"
	XpathError = "//*[@id=\"mensagemRetorno\"]/li"
)
View Source
const (
	Dirt = "\n"
)

Variables

This section is empty.

Functions

func GetSecrecy

func GetSecrecy(htmlPgSrc *html.Node) bool

func Login

func Login(driver selenium.WebDriver, login string, password string) error

func SearchLawsuit

func SearchLawsuit(driver selenium.WebDriver, searchLink string, lawsuit string, degree string, login string, password string) (*html.Node, error)

func SeleniumWebDriver

func SeleniumWebDriver() (selenium.WebDriver, error)

Types

type Document

type Document struct {
	HasDocuments  bool
	Found         bool
	DocumentFound string
	Page          int
}

func GetLawsuitDocuments

func GetLawsuitDocuments(driver selenium.WebDriver, degree string, lawsuitNumber string, searchDocument []string) (Document, error)

type EntireLawsuit

type EntireLawsuit struct {
	LawsuitNumber string
	Warning       string
	FirstDegree   Lawsuit
	SecondDegree  Lawsuit
}

func Craw

func Craw(driver selenium.WebDriver, lawsuitNumber string, lawsuitDocument []string, login string, password string) (EntireLawsuit, error)

type Lawsuit

type Lawsuit struct {
	Warning   string
	Cover     LawsuitCover
	Persons   []Person
	Movements []Movement
	Documents Document
}

func SingleCraw

func SingleCraw(driver selenium.WebDriver, searchLink string, lawsuit string, lawsuitDocument []string, degree string, login string, password string) (Lawsuit, error)

type LawsuitCover

type LawsuitCover struct {
	Title       string
	Tag         string
	Class       string
	Subject     string
	Location    string
	Unit        string
	Judge       string
	InitialDate string
	Control     string
	Field       string
	Value       string
}

func GetLawsuitCover

func GetLawsuitCover(htmlPgSrc *html.Node, degree string) (LawsuitCover, error)

type Movement

type Movement struct {
	Date  string
	Title string
	Text  string
}

func GetLawsuitMovements

func GetLawsuitMovements(htmlPgSrc *html.Node) ([]Movement, error)

type Pdf

type Pdf struct {
	// contains filtered or unexported fields
}

type Person

type Person struct {
	Pole    string
	Name    string
	Lawyers []string
}

func GetLawsuitPersons

func GetLawsuitPersons(htmlPgSrc *html.Node) ([]Person, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL