Seleniumを拒否するサイトにアクセスしてみた

Seleniumを拒否するサイトにアクセスしてみた。
一部のサイトではSeleniumでアクセスするとAccess Deniedになります。
この動画のマクロはWindows11/Office2013で作成してます。

Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub Macro()
    Set fso = CreateObject("Scripting.FileSystemObject")
    CurrentDirectory = ThisWorkbook.Path
    
    'パスワードファイルを読む
    Set fso = CreateObject("Scripting.FileSystemObject")
    CurrentDirectory = ActiveWorkbook.Path
    Set file = fso.OpenTextFile(fso.BuildPath(CurrentDirectory, "pass1.txt"), 1)
    str_user = file.ReadLine
    str_pass = file.ReadLine
    file.Close
    Set file = Nothing
    
    'ブラウザを起動
    Dim driver As New Selenium.WebDriver
    Set driver = CreateObject("Selenium.webDriver")

    'Edgeに起動オプションをjsonで渡す
    driver.SetCapability "ms:edgeOptions", "{""args"": [""user-data-dir=" & Replace(fso.BuildPath(CurrentDirectory, "edge_vba1"), "\", "\\") & """" & _
    ",""disable-blink-features=AutomationControlled""" & _
    "] }"

    driver.Start "edge"
    driver.ExecuteScript ("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})")
    driver.Window.SetSize 750, 900
    driver.Window.SetPosition 0, 0
    driver.Get "https://www.smbc-card.com/mem/index.jsp"
    Call Sleep(3000)  '3秒待つ
    
    Call WaitElementbyCss(driver, "input[name=""userid""]")
    
    driver.FindElementByCss("input[name=""userid""]").SendKeys str_user
    driver.FindElementByCss("input[name=""password""]").SendKeys str_pass
    driver.FindElementByCss("input.btnNormal").Click

    MsgBox "ブラウザを閉じるぜ"
    
    'ブラウザを閉じる
    driver.Quit
    Set driver = Nothing
End Sub

Sub WaitElementbyCss(driver, css)
    Dim bFlag, myBy
        bFlag = False
        Set myBy = New By
        Do
            bFlag = driver.IsElementPresent(myBy.css(css))
            driver.Wait 1000
        Loop Until bFlag = True
End Sub