Documentation ¶
Index ¶
- Constants
- Variables
- func BrowseLink(link Link, driver *agouti.WebDriver, db *sql.DB) (id *string, err error)
- func Link2Click(link Link, selection *agouti.Selection) *agouti.Selection
- func Links2Json(links Links) (b []byte, err error)
- func LogLink(logger log.Logger, msg string, link *Link)
- func MakeOutFilename(outfile, outtype string) (filename string)
- func NewDriver() (*agouti.WebDriver, error)
- func Str2filters(str, sep string) (filters []*regexp.Regexp)
- func SummaryURL(u1, u2 *url.URL) (map[url.URL]bool, error)
- func UniqURL(links Links) (urls []*url.URL)
- func WriteLinks2Csv(links Links, w io.Writer) (err error)
- type Browser
- type BrowserConfig
- type Config
- type GeneralLog
- type Link
- type LinkScraper
- type Links
Constants ¶
View Source
const ( OptSCRP = "scrp" OptDOMAIN = "domain" OptUA = "ua" OptENTRY = "entry" OptLOGINURL = "loginURL" OptFORM_USERNAME = "form_username" OptUSERNAME = "username" OptFORM_PASSWORD = "form_password" OptPASSWORD = "password" OptMAXDEPTH = "maxdepth" OptCONFIG = "config" OptUSECONFIG = "useConfig" OptOUTTYPE = "outtype" OptOUTPUTCSV = "csv" OptOUTPUTJSON = "json" OptOUTFILE = "outfile" OptDISURLFILTER = "disurlfilter" OptURLFILTER = "urlfilter" OptDBUSERNAME = "dbusername" OptDBPASSWORD = "dbpassword" OptDBDATABASE = "dbdatabase" OptDBHOST = "dbhost" OptDBPORT = "dbport" OptLINKSELECTOR = "linkselector" OptISDOPOST = "isdopost" OptCHECKLOGIN = "checklogin" )
Variables ¶
Functions ¶
func BrowseLink ¶
func Links2Json ¶
func MakeOutFilename ¶
func Str2filters ¶
Types ¶
type Browser ¶
func NewBrowser ¶
func NewBrowser(config *BrowserConfig) (*Browser, error)
type BrowserConfig ¶
type GeneralLog ¶
type Link ¶
type LinkScraper ¶
type LinkScraper struct { Collector *colly.Collector Links Links Logger log.Logger LoginURL string LoginData map[string]string Entry string OutFile string OutType string LinkSelector string IsDoPost bool CheckLogin string URLs []*url.URL }
func DefaultLinkScraper ¶
func DefaultLinkScraper() *LinkScraper
func NewLinkScraper ¶
func NewLinkScraper(config *Config) (*LinkScraper, error)
func (*LinkScraper) FlushURLs ¶
func (ls *LinkScraper) FlushURLs() []*url.URL
func (*LinkScraper) IsLogin ¶
func (ls *LinkScraper) IsLogin(e *colly.HTMLElement) bool
func (*LinkScraper) Login ¶
func (ls *LinkScraper) Login() (err error)
func (*LinkScraper) LoginE ¶
func (ls *LinkScraper) LoginE(e *colly.HTMLElement) (err error)
func (*LinkScraper) Output ¶
func (ls *LinkScraper) Output() (err error)
func (*LinkScraper) Scrape ¶
func (ls *LinkScraper) Scrape() (err error)
Click to show internal directories.
Click to hide internal directories.