Git Product home page Git Product logo

Comments (14)

ysmood avatar ysmood commented on June 3, 2024 1

你不需要 stealth

go-rod/rod#744

package main

import (
	"github.com/go-rod/rod"
	"github.com/go-rod/rod/lib/launcher"
	"github.com/go-rod/rod/lib/utils"
)

func main() {
	u := launcher.NewUserMode().
		Leakless(true).
		UserDataDir("tmp/t").
		Set("disable-default-apps").
		Set("no-first-run").
		MustLaunch()

	rod.New().ControlURL(u).MustConnect().NoDefaultDevice().MustPage("https://lib.cqvip.com/")

	utils.Pause()
}

from stealth.

cdsjsz avatar cdsjsz commented on June 3, 2024

newusermode也同样无法绕过检测

package main

import (
	"crypto/md5"
	"fmt"
	"github.com/go-rod/rod/lib/launcher"
	"time"

	"github.com/go-rod/rod"
	"github.com/go-rod/stealth"
)

func main() {
	path, _ := launcher.LookPath()
	url := launcher.NewUserMode().Bin(path).Headless(false).MustLaunch()
	browser := rod.New().
		ControlURL(url).Timeout(time.Minute).MustConnect()
	defer browser.MustClose()

	// You can also use stealth.JS directly without rod
	fmt.Printf("js: %x\n\n", md5.Sum([]byte(stealth.JS)))

	//page := stealth.MustPage(browser)
	page := browser.MustPage()

	page.MustNavigate("https://lib.cqvip.com/")
	time.Sleep(10 * time.Minute)

}

from stealth.

cdsjsz avatar cdsjsz commented on June 3, 2024

感谢您的回复,在有头模式下没有问题,但在无头模式下还是会卡住,请问如果想要在无头模式下不卡白屏,应该如何操作呢,谢谢

from stealth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.