func printCDPCookies(driverOptions scraperDriverOptions, msg string) chromedp.Action {
	return chromedp.ActionFunc(func(ctx context.Context) error {
		chromeCookies, err := network.GetAllCookies().Do(ctx)
		if err != nil {
			return err
		}

		scraperDomains := make(map[string]struct{})
		for _, ckURL := range driverOptions.Cookies {
			for _, cookie := range ckURL.Cookies {
				scraperDomains[cookie.Domain] = struct{}{}
			}
		}

		if len(scraperDomains) > 0 { // only print the cookies if they are listed in the scraper
			logger.Debugf("%s\n", msg)
			for i, cookie := range chromeCookies {
				_, ok := scraperDomains[cookie.Domain]
				if ok {
					logger.Debugf("[%d]: Name: \"%s\" Value: \"%s\"  Domain: \"%s\"", i, cookie.Name, cookie.Value, cookie.Domain)
				}
			}
		}
		return nil
	})
}
// print cookies whose domain is included in the scraper  config
print cookies whose domain is included in the scraper  config
// print cookies whose domain is included in the scraper config
func printCDPCookies(driverOptions scraperDriverOptions, msg string) chromedp.Action {
	return chromedp.ActionFunc(func(ctx context.Context) error {
		chromeCookies, err := network.GetAllCookies().Do(ctx)
		if err != nil {
			return err
		}
		scraperDomains := make(map[string]struct{})
		for _, ckURL := range driverOptions.Cookies {
			for _, cookie := range ckURL.Cookies {
				scraperDomains[cookie.Domain] = struct{}{}
			}
		}
		if len(scraperDomains) > 0 { 
			logger.Debugf("%s\n", msg)
			for i, cookie := range chromeCookies {
				_, ok := scraperDomains[cookie.Domain]
				if ok {
					logger.Debugf("[%d]: Name: \"%s\" Value: \"%s\"  Domain: \"%s\"", i, cookie.Name, cookie.Value, cookie.Domain)
				}
			}
		}
		return nil
	})
}
func printCDPCookies ( driverOptions scraperDriverOptions , msg string ) chromedp . Action { return chromedp . ActionFunc ( func ( ctx context . Context ) error { chromeCookies , err := network . GetAllCookies ( ) . Do ( ctx ) if err != nil { return err } scraperDomains := make ( map [ string ] struct { } ) for _ , ckURL := range driverOptions . Cookies { for _ , cookie := range ckURL . Cookies { scraperDomains [ cookie . Domain ] = struct { } { } } } if len ( scraperDomains ) > 0 { logger . Debugf ( " \n " , msg ) for i , cookie := range chromeCookies { _ , ok := scraperDomains [ cookie . Domain ] if ok { logger . Debugf ( " \" \" \" \" \" \" " , i , cookie . Name , cookie . Value , cookie . Domain ) } } } return nil } ) }
print cookies whose domain is included in the scraper  config
print cookies whose domain is included in the scraper config
// only print the cookies if they are listed in the scraper