我试图解析来自RSS的图像
Elements imgEle = docHtml.select("img");
_item.setImage(imgEle.attr("src"));
它在这里工作
工作(img在描述中):
<description><p><a href="http://www.androidpolice.com/wp-content/uploads/2015/11/nexus2cee_linkedin-material.png" class=" no-style"><img class="alignnone size-hero-size wp-image-345522" src="http://www.androidpolice.com/wp-content/uploads/2015/11/nexus2cee_linkedin-material-728x485.png"
但不在这里(img在内容中:编码):
<img class=" size-large wp-image-2207218 aligncenter" src="http://st.ilfattoquotidiano.it/wp-content/uploads/2015/11/14618338_small-630x404.jpg"
=============================================== =======================
https://github.com/enricocid/iven-feed-reader/commit/e2f8a487d0fd9dff3ca96024ddf9715e2887a916
答案 0 :(得分:0)
您可以将RSS中的图像/图像URL存储到List中,然后使用Picasso从Web加载图像。 像这样:
Picasso.with(context).load(data.getImage()).into(imageView);