javajsoupuser-agent

What userAgent do I need for the method to return true?


enter image description here

I wanted to make a parsing program for one popular site, but it has protection. I also heard that the site has group ib and ja3.

enter image description hereI've been trying to bypass this check in Java, so far it's not working out so well.

function browser_is_IE11() {
  var ua = window.navigator.userAgent;
  var msie = ua.indexOf("MSIE ");
  var rv = -1;

  if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) {
    // If Internet Explorer, return version number
    if (isNaN(parseInt(ua.substring(msie + 5, ua.indexOf(".", msie))))) {
      //For IE 11 >
      if (navigator.appName == 'Netscape') {
        var ua = navigator.userAgent;
        var re = new RegExp("Trident/.*rv:([0-9]{1,}[\.0-9]{0,})");
        if (re.exec(ua) != null) {
          rv = parseFloat(RegExp.$1);
          if (rv == 11) {
            return true;
          }
        }
      }
    }
  }
  return false;
}


Solution

  • Example of useragent to return true from this method:

    .userAgent("Mozilla/5.0 (compatible; MSIE ; Windows NT 6.2; Trident/7.0rv:11.0)")