There is such code:

String url = "https://rozetka.com.ua/ua/notebooks/c80004/filter/"; Document document = Jsoup.connect(url).get(); Elements articles = document.select("article.pp-review-i"); Elements stars = articles.select("span.g-rating-stars-i"); Elements texts = articles.select("div.pp-review-text"); for(Element text:texts){ System.out.println(text.text()); 

But in the end nothing is being printed, although such classes exist for such attributes. I just met java and jsoup, and according to what I saw on the Internet, it should work ...

Closed due to the fact that the participants are off topic : , Cheg , andreymal , Eugene Krivenja , PashaPash 26 Sep '17 at 14:17 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - YuriSPb, Cheg, andreymal, Eugene Krivenja, PashaPash
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • We will not follow the left links to suspicious sites to try to understand exactly which piece of code you need to parse. Remove the link and give the problem piece of the site code - so we can help. At the moment there is no most important question - YuriySPb
  • @YuriySPb I can not throw off a piece of code, you can enter rozetka, there are laptops there, and there will be the page you need. Just this is homework, and I beat an analog on Python, and I am not familiar with the piece of the site that I need to parse. - lalalala
  • Do you seriously suggest that I do it for you? It seems to you that the site is parsit ... Go to freelance with this approach - YuriySPb
  • Specify UserAgent to begin with, look at whether the site throws a cookie, if so, first go to the main one to pick up the cookie and go to the page you are interested in and specify the main page as referrer - alexandr gaiduchok

1 answer 1

The site has a check on the bot. Apparently the test does not pass.

  • As I opened the page, the captcha started. - Tamerlan Hakimzadeh