由于Soundcloud Java API已停止使用,我想使用JSoup在其网站上执行搜索。我目前正在使用此代码:
Document doc = Jsoup
.connect("https://soundcloud.com/search?q=deep%20house")
.userAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36")
.timeout(5000).get();
但网页上给我的消息是我应该使用更新的浏览器:
<p class="messageText sc-text-light">Your current browser isn't compatible with SoundCloud.<br>Please download one of our supported browsers. <a href="http://help.soundcloud.com/customer/portal/articles/552882-the-site-won-t-load-for-me-all-i-see-is-the-soundcloud-logo-what-can-i-do-">Need help?</a></p>
我尝试过使用其他用户代理,我发现here但到目前为止似乎都没有。我该怎么做才能阻止此消息弹出?