I use standard constructions for working with jsoup:

Document mydoc = null;//Здесь хранится будет разобранный html документ try { //Считываем страницу mydoc = Jsoup.connect(httpAddress).get(); } catch (IOException e) { //Если не получилось ссчитать Log.wtf("maratsoftTAG", "Эксепшн!"); } //Получаем заголовок mytitle = mydoc.title(); 

And I can not parse the site http://mirfactov.com/ , it just returns the void to different methods of the jsoup library, not only .title (), but also .select (), and .getElementsByTag () and others. At the same time, the rest of the sites parseys with a bang. What is the trick here?

  • We do not know the type of your mistake and, therefore, we cannot help you. - Yuriy SPb
  • @YuriSPb this site returns the void to different methods of the jsoup library, not only .title (), but also .select (), and mydoc.getElementsByTag () and others. - maratsoft
  • And no error does not display? .. - YuriySPb
  • @Yuriy SPb is not ... - maratsoft

1 answer 1

This site wants two things:

  1. Installed cookie beget=begetok ;
  2. Classics of the genre - set by UserAgent.

     mydoc = Jsoup.connect(httpAddress) .userAgent("Mozilla") .cookie("beget", "begetok") .get(); 

To get to this, it is worth looking at the traffic from the browser and from your application. A comparative analysis gives the above result.