Skip to content
This repository has been archived by the owner on Dec 1, 2019. It is now read-only.

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
7449 committed Jun 27, 2017
1 parent eb2dd50 commit 33da239
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ jsoupSample
使用`Jsoup`抓取一些网站的数据,抓取数据的网站已经列在下面,如果有侵权嫌疑,请及时联系我删除相关数据


## Tips

有的网络错误有可能是该网址地址变动导致的,需要查看Log输出来确定正确的错误原因。<br>
抓取规则一般不会出问题,除非网站改动Html命名方式

# android SDK 内存泄露

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ public List<MagneticModel> getList() {
MagneticModel magneticModel;
Elements a = document.select("div.list").select("a[href]:not(.desc):not(.asc)");
for (Element element : a) {
magneticModel = new MagneticModel();
magneticModel.title = element.text();
magneticModel.url = element.select("a[href]").attr("abs:href");
listModels.add(magneticModel);
if (!element.text().equals("点击搜索")) {
magneticModel = new MagneticModel();
magneticModel.title = element.text();
magneticModel.url = element.select("a[href]").attr("abs:href");
listModels.add(magneticModel);
}
}
return listModels;
}
Expand Down

0 comments on commit 33da239

Please sign in to comment.