change: add logs for popup

This commit is contained in:
lilong.129
2023-08-29 18:55:49 +08:00
parent 11b7fd7cfe
commit ebf8a81a66
2 changed files with 2 additions and 0 deletions

View File

@@ -108,6 +108,7 @@ func (dExt *DriverExt) ClosePopups(options ...ActionOption) error {
}
func (dExt *DriverExt) ClosePopupsHandler(options ...ActionOption) error {
log.Info().Msg("try to find and close popups")
actionOptions := NewActionOptions(options...)
maxRetryTimes := actionOptions.MaxRetryTimes
interval := actionOptions.Interval

View File

@@ -321,6 +321,7 @@ func (dExt *DriverExt) VideoCrawler(configs *VideoCrawlerConfigs) (err error) {
if feedVideo.VideoID == crawler.lastFeed.VideoID {
// app event tracking not changed
// check and handle popups
log.Warn().Msg("feed video event tracking not changed")
if err = crawler.driverExt.ClosePopupsHandler(WithMaxRetryTimes(1)); err != nil {
return err
}