RusKnyaz / Optimus

Optimus is headless Web Browser fully implemented on .net.
MIT License
81 stars 8 forks source link

I do not know where is the problem, Baidu always prompt need to verify #68

Open asdwyujian opened 1 year ago

asdwyujian commented 1 year ago

I do not know where is the problem, Baidu always prompt need to verify https://www.baidu.com/

var engine = EngineBuilder.New() .UseJint() .Build(); engine.UseKnownUserAgent(KnownUserAgents.Windows_Firefox);

var page = await engine.OpenUrl("https://www.baidu.com");

engine.WaitDocumentLoad();
var document = page.Document;

var input = document.WaitId("kw") as HtmlInputElement;
input.Value = "123";

var button = document.WaitId("su") as HtmlInputElement;
button.Click();

Thread.Sleep(5000);

document = engine.Document;
var html = document.DocumentElement.OuterHTML;