Power Shell Web Scraping SSL/TSL Issue

前端 未结 2 458
死守一世寂寞
死守一世寂寞 2020-12-29 16:08

I am wanting to run a web scraping script on a server.

The current script collects the html on the specified page.

$url = \"http://websms\"
 [net.ht         


        
2条回答
  •  滥情空心
    2020-12-29 17:03

    This one liner will ignore SSL certificate errors:

    [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
    

    Errors regarding self-signed untrusted certificates, mismatching names or expiration will be ignored after this is executed.

提交回复
热议问题