16,721
社区成员




System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
Try
sUrl = "https://quizlet.com/": Link = ""
xmlhttp = DirectCast(WebRequest.Create(sUrl), HttpWebRequest)
xmlhttp.Timeout = 6000 : xmlhttp.AllowAutoRedirect = False
xmlhttp.Method = "GET": xmlhttp.KeepAlive = False
xmlhttp.Host = "quizlet.com"
xmlhttp.Headers.Add("upgrade-insecure-requests", "1")
xmlhttp.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36"
xmlhttp.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
xmlhttp.Headers.Add("sec-fetch-site", "none")
xmlhttp.Headers.Add("sec-fetch-mode", "navigate")
xmlhttp.Headers.Add("sec-fetch-dest", "document")
xmlhttp.Headers.Add("accept-language", "zh-CN,zh;q=0.9,en;q=0.8,fr;q=0.7,zh-TW;q=0.6,ja;q=0.5")
'xmlhttp.Headers.Add("accept-encoding", "gzip, deflate")
Using rep As HttpWebResponse = xmlhttp.GetResponse()
Link = rep.GetResponseHeader("Location")
End Using
Catch ex As WebException : If ex.Status <> WebExceptionStatus.Timeout Then Throw
Catch ex As Exception : Throw
Finally : xmlhttp.Abort() : xmlhttp = Nothing
End Try