System.Net.ServicePointManager.SecurityProtocol=SecurityProtocolType. Tls12
Try
SUrl="https://quizlet.com/" : the 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. The Add (" upgrade - the 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. The Add (" the SEC - fetch - site ", "none")
XMLHTTP. Headers. The Add (" the SEC - fetch - mode ", "navigate")
XMLHTTP. Headers. The Add (" the SEC - fetch - the dest ", "document")
XMLHTTP. Headers. Add (" accept - language, "" useful - CN, useful; Q=0.9, en. Q=0.8, fr. Q=0.7, useful - TW; Q=0.6, ja. Q=0.5 ")
'the XMLHTTP. Headers. The Add (" accept - the encoding ", "gzip, deflate")
Using rep As HttpWebResponse=XMLHTTP. The method GetResponse ()
The Link=rep. GetResponseHeader (" Location ")
End Using
Catch the ex As WebException: If the ex. The Status & lt;> WebExceptionStatus. A Timeout Then Throw
Catch the ex As Exception: Throw
Finally: XMLHTTP. Abort () : XMLHTTP=Nothing
End the Try
Simulation caught caught after sent back to the remote server returned error: (403) has been banned,
Don't know what causes, please will show 12
CodePudding user response:
Big probability is cookies and add validation, after the first request, save cookies, all request to bring them back,