HtmlUnit кодировка страницы

 
 
 
Сообщения:2
После нажатия на кнопку, грузит только половину страницы и то "крякозябрами"

package com.company;
 
    import com.gargoylesoftware.htmlunit.*;
    import com.gargoylesoftware.htmlunit.html.HtmlElement;
    import com.gargoylesoftware.htmlunit.html.HtmlPage;
    import org.apache.commons.logging.LogFactory;      
    import java.util.logging.Level;
 
    public class Parsing {
        public void connect() throws Exception {
            LogFactory.getFactory().setAttribute("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog");
            java.util.logging.Logger.getLogger("com.gargoylesoftware").setLevel(Level.OFF);
            java.util.logging.Logger.getLogger("org.apache.commons.httpclient").setLevel(Level.OFF);
 
            WebClient client = new WebClient(BrowserVersion.CHROME);
            client.setAjaxController(new NicelyResynchronizingAjaxController());
            client.getOptions().setThrowExceptionOnScriptError(false);
            client.getOptions().setThrowExceptionOnFailingStatusCode(false);
            String url = "https://auto.ru/cars/new/group/mercedes/e_klasse/20743577/20886691/?grouping_id=tech_param_id%3D20743577%2Ccomplectation_id%3D21225392&sort=fresh_relevance_1-desc&geo_radius=200";
 
            HtmlPage page = client.getPage(url);
            HtmlElement clickContact = (HtmlElement) page.getElementById("confirm-button");
            page = clickContact.click();
            client.waitForBackgroundJavaScript(10000);
 
            System.out.println(page.asText());
 
        }


Код страницы после нажатия на кнопку

NqjGOWYDtnNeeaL+2V4R1XVWsr7wx488NwrIsb32r6GBBHnHzMY3c7eeWAIHcivGta/Zh+NX/Cwl1LTtegu9DWZMWsuoNBGIAuGXygGG8nndk/yA7B/gD8STnNvYkHjnVmP/slbLzZB9K3U2l3ttBdw+IYHsZ0EsdxDtkRkIyCCOvOPzor428cfs6fHfUr+zXQNah0K0gjYlrTWnjdpiRtLYQbkAB+Xoc9PQo+YH2lbu2xfmP51M7HHU0UUnuBXnY7OpoooqkB//9k=" style="filter:blur(5px)"/></div></div></div><div class="Brazzers__button"></div></div><div class="Brazzers__page"><div class="Brazzers__image-wrapper"><div class="LazyImage Brazzers__image" data-src="//avatars.mds.yandex.net/get-autoru-vos/2072159/0fee83ebec6f26c991ed8bcec95138c8/320x240"><div class="LazyImage__previewContainer"><img class="LazyImage__previewLayer LazyImage__previewLayer_1" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAASABgDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD6v0n4ja0dNF7bi71KFuFSy09pix9MqMD6kgVkeK/j/e+E9MhvtU8Ka463FwbeK2h0SSe4OACXZEyETkDLEZPQEAmsH41eE/ifo1xb2nh7wtYePNDv7iQ3vk+XbTWsJYbV2yT/AL1tpILDHI6fMceXj4bfHPWPEOmjS/A174c8N6bEix2b6pZQxzHLBlKLISoC7cDHHJHNbXJ0se8+DfHSfFOF5NK/seGaNFklsNUsZbe6iVvus0bqDtPPzDIyCM5BFFcMfgP8WtZ0/wAoX+meE5ZZI99zbaxPNcRxhgX27YVGcDH3u55FFO4j6miJwee9TKxx1P50UVIDCx9TRRRTQH//2Q==" style="filter:blur(5px)"/><img class="LazyImage__previewLayer LazyImage__previewLayer_2" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAASABgDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD6v0n4ja0dNF7bi71KFuFSy09pix9MqMD6kgVkeK/j/e+E9MhvtU8Ka463FwbeK2h0SSe4OACXZEyETkDLEZPQEAmsH41eE/ifo1xb2nh7wtYePNDv7iQ3vk+XbTWsJYbV2yT/AL1tpILDHI6fMceXj4bfHPWPEOmjS/A174c8N6bEix2b6pZQxzHLBlKLISoC7cDHHJHNbXJ0se8+DfHSfFOF5NK/seGaNFklsNUsZbe6iVvus0bqDtPPzDIyCM5BFFcMfgP8WtZ0/wAoX+meE5ZZI99zbaxPNcRxhgX27YVGcDH3u55FFO4j6miJwee9TKxx1P50UVIDCx9TRRRTQH//2Q==" style="filter:blur(5px)"/></div></div></div><div class="Brazzers__button"></div></div><div class="Brazzers__page"><div class="Brazzers__image-wrapper"><div class="LazyImage Brazzers__image" data-src="//avatars.mds.yandex.net/get-autoru-vos/1982854/6112445f2cb0e45fa8f3c1a4ac2611f0/320x240"><div class="LazyImage__previewContainer"><img class="LazyImage__previewLayer LazyImage__previewLayer_1" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAASABgDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD5E+Cmh6zqnivTtJtvHmieHtLuUdvP8SS/6JDgZCZY5BJ4ADAc11Hgj9mO7/aHn8R3Wn+NvBmh6jp9w0Vvb3IayXU4izqlwpy4+YxseAeGUk8iuT1m3shpLCGKJY5IzmID8P8AP0rh2Nvrtjp9oviK3s5rXcYBexMu1DyELjjr64GCPSutozTPs7wf+w58HNb0m/8AD+qeKNW0bxvYLELp47mNURymcqVRopY2OSPutgY4waK+XPh7rt14a1Az3us6U+rXIkis7edfNiKsrcueoYlsqckgrnnoSpsu4m32ObimkbwxpjF2LGI5JPP3RXKeGo1lubneof8AeH7wz3ooqmPoYmvqINbmWICNVk4CcAUUUVk9ykf/2Q==" style="filter:blur(5px)"/><img class="LazyImage__previewLayer LazyImage__previewLayer_2" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAASABgDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD5E+Cmh6zqnivTtJtvHmieHtLuUdvP8SS/6JDgZCZY5BJ4ADAc11Hgj9mO7/aHn8R3Wn+NvBmh6jp9w0Vvb3IayXU4izqlwpy4+YxseAeGUk8iuT1m3shpLCGKJY5IzmID8P8AP0rh2Nvrtjp9oviK3s5rXcYBexMu1DyELjjr64GCPSutozTPs7wf+w58HNb0m


<--? Удалил половину что-бы сократить

{"los":"0","autoruuid":"g5da704cb2vb6lovd818hvp41bhm60h2.d7c5ec24d9dc0f0bf27029e339d9a3fb","experiment":"AUTORUFRONT-14494_return_dealer_name,mc_bank_new,AUTORUFRONT-14260_poffer-period,AUTORUFRONT-13233_searchline,AUTORUFRONT-14269_group_card_snippet_real_photo","experiment_service_id":"","bucket":"6"},"experiments":"ipDSJaZLUzV0MJnEwkGkA7lzeSRBEVfM6NXvDKGkgMqOh_2-CH4iU2K_U0LwJ-M9glBiUQmOop139FbN2ZPRfw,,"},"nonce":"iQiY+rHKmIDEAjFiKPUsig==","hasCryprox":false,"adAliasName":"tc3311d7d9dd9","isAutotests":false,"isRobot":false,"host":"auto.ru","experimentsData":{"bucket":6,"experiments":{"AUTORUFRONT-14494_return_dealer_name":true,"mc_bank_new":true,"AUTORUFRONT-14260_poffer-period":true,"AUTORUFRONT-13233_searchline":true,"AUTORUFRONT-14269_group_card_snippet_real_photo":true},"uaas":{"expsplitparams":"{\"r\":0,\"s\":\"auto_ru\",\"d\":\"desktop\",\"m\":\"\",\"b\":\"Chrome\",\"i\":false,\"n\":\"\",\"f\":\"\"}","expconfigversion":"15165","expboxes":["182058,0,10","177571,0,55","175549,0,11","173380,0,33","172106,0,56"],"expboxes-crypted":"ipDSJaZLUzV0MJnEwkGkA7lzeSRBEVfM6NXvDKGkgMqOh_2-CH4iU2K_U0LwJ-M9glBiUQmOop139FbN2ZPRfw,,","expflags":[[{"HANDLER":"AUTO_RU","CONTEXT":{"AUTO_RU":{"flags":["AUTORUFRONT-14494_return_dealer_name"]}}}],[{"HANDLER":"AUTO_RU","CONTEXT":{"AUTO_RU":{"flags":["mc_bank_new"]}}}],[{"HANDLER":"AUTO_RU","CONTEXT":{"AUTO_RU":{"flags":["AUTORUFRONT-14260_poffer-period"]}}}],[{"HANDLER":"AUTO_RU","CONTEXT":{"AUTO_RU":{"flags":["AUTORUFRONT-13233_searchline"]}}}],[{"HANDLER":"AUTO_RU","CONTEXT":{"AUTO_RU":{"flags":["AUTORUFRONT-14269_group_card_snippet_real_photo"]}}}]]}},"browser":{"OSFamily":"Windows"}}},"fieldSettings":{},"geo":{"geoParents":[],"multipleGeoIdsParents":{},"regionByIpParents":[10466,104308,118,111,10001,10000],"gids":[],"gidsInfo":[],"radius":0,"radiusAllowed":false,"dealersRadius":null,"is24AutoByGeo":false,"isAuto29ByGeo":false,"isAuto74ByGeo":false,"isE1ByGeo":false,"isNGSByGeo":false,"hasMutipleRegions":"","geoOverride":false,"geoSeoOverride":false,"isGoodRegion":false,"regionByIp":10466,"regionByIpCapitalInfo":{"id":10466,"latitude":52.372518,"longitude":4.896977,"name":"Гђ&#144;ГђВјГ‘&#129;Г‘‚ГђµГ‘€ГђВґГђ°ГђВј","parent_id":104308,"type":6}},"user":{"pending":false,"data":{"auth":false}}}</script><script nonce="iQiY+rHKmIDEAjFiKPUsig==">var INITIAL_STATE = JSON.parse(document.getElementById("initial-state").textContent);</script><script src="//yastatic.net/s3/vertis-frontend/autoru-frontend-desktop/_/vendor_2ba97262e510ab6a02a3.js"></script><script src="//yastatic.net/s3/vertis-frontend/autoru-frontend-desktop/_/common_88e2aaff07425a917dee.js"></script><script src="//yastatic.net/s3/vertis-frontend/autoru-frontend-desktop/_/card_53d76c5d065264a0cb70.js"></script><script nonce="iQiY+rHKmIDEAjFiKPUsig==">var img = new Image();img.src = '//www.tns-counter.ru/V13a***R>' + document.referrer.replace(/\*/g,'%2a') + '*auto_ru/ru/UTF-8/tmsec=auto_site/' + Math.round(Math.random() * 1000000000);</script><noscript><img src="https://www.tns-counter.ru/V13a****auto_ru/ru/UTF-8/tmsec=auto_site/" width="1" height="1" alt=""/></noscript><script nonce="iQiY+rHKmIDEAjFiKPUsig==">
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window, document,'script','//www.google-analytics.com/analytics.js','ga');
    </script></body></html>


Предполагаю что на сайт шифрует данные из-за этого выходят крякозябры или я не правильно что-то делаю. Можно это как-то исправить?
 
Модераторы:Нет
Сейчас эту тему просматривают:Нет