У меня проблема при попытке анализа веб-страницы с помощью jSoup. Если я просматриваю исходный код страницы в Chrome, там будет весь ожидаемый контент - полная страница. Однако когда я подключаюсь к URL-адресу с помощью JSoup, документ Jsoup содержит только небольшое количество html / xml страницы.
Есть идеи, почему это так?
Ниже приведен пример различий:
Источник страницы:
<title>Bath Rugby Official Website | First team</title>
<base href="http://www.bathrugby.com/"></base>
<meta name="description" content="The Official Website of Bath Rugby. The only place for in-depth player, match and club news." /><meta property="og:title" content="Bath Rugby Official Website | First team" /><meta property="og:url" content="http://www.bathrugby.com/fixtures-and-results/first-team/" />
<meta property="og:type" content="sports_team" />
<!-- <meta property="og:image" content="http://www.bathrugby.com/_assets/img/common/bath_rugby_logo.jpg" /> -->
<meta property="og:site_name" content="Bath Rugby" />
<meta property="fb:admins" content="100001941260923" />
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Latest News - RSS feed" href="/rss/rss-all-news.rss" />
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Match News - RSS feed" href="/rss/rss-match-news.rss" />
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Team News - RSS feed" href="/rss/rss-team-news.rss" />
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Club News - RSS feed" href="/rss/rss-club-news.rss" />
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Academy News - RSS feed" href="/rss/rss-academy-news.rss" />
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Ladies News - RSS feed" href="/rss/rss-ladies-news.rss" />
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Community News - RSS feed" href="/rss/rss-community-news.rss" />
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Programmes and Projects - Inclusion - RSS feed" href="/rss/rss-programmes-and-projects-inclusion.rss" />
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Programmes and Projects - Education - RSS feed" href="/rss/rss-programmes-and-projects-education.rss" />
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Programmes and Projects - Sports - RSS feed" href="/rss/rss-programmes-and-projects-sport.rss" />
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Corporate News - RSS feed" href="/rss/rss-corporate-news.rss" />
<link rel="alternate" type="application/rss+xml" title="Bath Rugby - Redevelopment News - RSS feed" href="/rss/rss-redevelopment-news.rss" />
Документ JSoup:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bath Rugby - Fixtures and results</title>
<meta name="Author" content="Positive -> http://www.positivestudio.co.uk" />
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; minimum-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="google-site-verification" content="7dRcSqMI5R3Rag9iNiHeFei6ycyBTd3dmhlZvF8QdhA" />
<link rel="Shortcut Icon" type="image/ico" href="/_assets/favicon.ico" />
<link rel="apple-touch-icon-precomposed" href="/_assets/img/icons/apple-touch-icon.png" />
<link rel="stylesheet" type="text/css" media="all" href="/_assets/css/mobile.css" />
<link rel="stylesheet" type="text/css" href="/_assets/css/retina.css" media="only screen and (-webkit-min-device-pixel-ratio: 2)" />
<script type="text/javascript" src="/_assets/js/jquery-1.4.2.min.js"></script>
<script src="/_assets/js/css_browser_selector.js" type="text/javascript"></script>
<script type="text/javascript" src="/_assets/js/scripts.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-24788688-3']);
_gaq.push(['_trackPageview']);
(function() {