scraper

package
v0.0.0-...-915e4b8 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindTests

func FindTests(page *rod.Page) []string

FindTests return list of links with title='Переглянути ваші відповіді в цій спробі'

func FinishTest

func FinishTest(page *rod.Page) (error, bool)

finishTest finds and clicks all nesesary buttons to complete test.

func IsTestSuccessful

func IsTestSuccessful(page *rod.Page) bool

isTestSuccessful checks rate of correct answers. It returns true if test successful (100% of correct answers)

func Login

func Login(page *rod.Page, data config.Configuration) error

login to VNS by login and password from config.

func MakeTest

func MakeTest(page *rod.Page, testNum int, s storage.Storage) error

func MustFindTestNum

func MustFindTestNum(page *rod.Page) int

mustFindTestNum finds test number to store answers to reqared table in databse. It panics if can't find test number in page.

func StartNextAttempt

func StartNextAttempt(page *rod.Page) error

Types

type QA

type QA struct {
	Question, Rightanswer string
}

func ParseAnswers

func ParseAnswers(page *rod.Page) ([]QA, error)

parseAnswers find all open answers of complete test.

Jump to

Keyboard shortcuts

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