Best Method to Bypass Cloudflare & Captcha Bypass for Scraping

To Avoid Parsing Cookies everytime, u can simply use this code to parse the cookies, convert them to a dict and then use them with the request

Namespaces

Newtonsoft.Json
System.Collections.Generic

Code

BLOCK:Parse
  input = @data.SOURCE
  suffix = "}"
  leftDelim = "{\"cookies\":"
  rightDelim = "},"
  MODE:LR
  => VAR @co
ENDBLOCK



string jsonString = $"{co}";
var cookies = JsonConvert.DeserializeObject<Dictionary<string, string>>(jsonString);
BLOCK:Parse
LABEL:userAgent
  input = @data.SOURCE
  jToken = "$.user_agent"
  MODE:Json
  => CAP @userAgent
ENDBLOCK

BLOCK:HttpRequest
LABEL:use cf_clearance
  url = "https://example.com"
  customCookies = @cookies
  customHeaders = ${("User-Agent", "<userAgent>"), ("Pragma", "no-cache"), ("Accept", "*/*"), ("Accept-Language", "en-US,en;q=0.8")}
  TYPE:STANDARD
  $""
  "application/x-www-form-urlencoded"
ENDBLOCK
2 Likes