Commit 595e2ef9 authored by 黄奎's avatar 黄奎

1111

parent 4a055a57
......@@ -68,7 +68,15 @@ namespace TicketSpider.Spiders.ClassInRule
IWebElement pwdEle;
var option = new ChromeOptions();
option.AddArgument("--incognito");
string IsOpenChrome= VTX.FW.Helper.ConfigHelper.GetAppsettings("IsOpenChrome");
if (IsOpenChrome == "1")
{
}
else
{
option.AddArgument("headless");
}
option.AddArgument("disable-infobars");
option.AddArgument("window-size=1920,1080");
option.AddArgument("user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36");
......@@ -101,6 +109,7 @@ namespace TicketSpider.Spiders.ClassInRule
var login = BeginSliderLoginHandler(ref driver);
if (login.IsCompleted)
{
Thread.Sleep(2 * 1000);
driver.SwitchTo().DefaultContent();
Console.WriteLine($"操作完成,正在等待结果");
VTX.FW.Helper.LogHelper.WriteInfo("RunAsync", $"操作完成,正在等待结果");
......
......@@ -4,6 +4,8 @@
"DefaultConnection": "server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_think;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"DefaultConnectionPName": "MySql.Data.MySqlClient"
},
//是否开启Chrome[1-开启,0-关闭]
"IsOpenChrome":1,
//默认Token
"DefaultToken": "sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%2212780052%22%2C%22first_id%22%3A%22180f59907abbed-081e4952c5b26f-12333272-2073600-180f59907acbc8%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2C%22%24latest_referrer%22%3A%22%22%7D%2C%22%24device_id%22%3A%22180f59907abbed-081e4952c5b26f-12333272-2073600-180f59907acbc8%22%7D; PHPSESSID=pv72vus2bq8l9t7dsa5c8f6ll2; locationArgumentLang=zh-CN; __tk_id=983ff2e12cab08755cb345a7043f801b; _eeos_uid=12780052; _eeos_useraccount=18140082327; _eeos_userlogo=%2Fupload%2Fimages%2F20200126%2F709df9532bee722f2268_70.jpg; _eeos_domain=.eeo.cn; _eeos_remember=1; _eeos_traffic=EqlIOFq4S2hz5FTTtHzNUViBYcWCixrJYMCF6Y5yJuD8eq8ZwPvVSHMvUkLFA5lzNoaTrDBpGhEJ4HgSuhP1iF%2B0dGt1KgDzV1r8UBfonWA%3D; _eeos_sid=12780052; _eeos_nsid=kspGu2gfMu%2BU2EFgLpSGyg%3D%3D"
"DefaultToken": ""
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment