Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultUserDataDir default user data dir for non-headless mode DefaultUserDataDir = "/tmp/chrome_dev_1" // DefaultInterval default time to wait (in seconds) when watching a selector DefaultInterval = 30 // DefaultRedisWriteTimeout default timeout (seconds) for writing to redis DefaultRedisWriteTimeout = 10 // DefaultSubject to send email with DefaultSubject = "Go-Scraper Watcher" // DefaultCaptchaWaitSelector default to wait for captcha box on block DefaultCaptchaWaitSelector = `div.re-captcha` // DefaultCaptchaClickSelector default to click once captcha box appears DefaultCaptchaClickSelector = `div.g-recaptcha` // DefaultCaptchaIframeWaitSelector default wait selector for captcha iframe DefaultCaptchaIframeWaitSelector = `body > div:nth-child(6) > div:nth-child(4) > iframe` // DefaultCaptchaClickSleep default time (seconds) we sleep after a captcha click, to allow the captcha challenge to get loaded into the iframe DefaultCaptchaClickSleep = 5 )
Variables ¶
View Source
var ( // DefaultUserAgents The default user agents to send requests as DefaultUserAgents = []string{ `Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36`, } )
Functions ¶
func CommonRootChecks ¶
CommonRootChecks does checks for flags for root commands
func CommonWatchChecks ¶
CommonWatchChecks checks if the common required flags for watch command are present - sub-commands check their own specific flags separately
func EmailContent ¶
EmailContent will watch content and take action if content is available
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.