jsoup - 如何使用 Jsoup 提取此图像?

jsoup - How to extract this image using Jsoup?

我正在寻找这张 div

中的主图
<div id="imgTagWrapperId" >
<img src ="www.example.com">
</div>

我试过这个:

Document document = Jsoup.connect(url).get();

Elements img = document.select("div[id=imgTagWrapperId] img[src]");

String imgSrc = img.attr("src");

我正在使用的 URL 是 http://www.amazon.in/Google-Nexus-D821-16GB-Black/dp/B00GC1J55C/ref=sr_1_1?s=electronics&ie=UTF8&qid=1421161258&sr=1-1&keywords=Google

这对我有用:

 Document document = Jsoup.connect(url).get();

 Element img = document.getElementById("landingImage");

 String imgSrc = img.attr("data-old-hires");
Document document = Jsoup.connect(url).get();

Elements img = document.select("img[id=landingImage]");

String imgSrc = img.attr("src");