從爬蟲項目中體會常用數(shù)據(jù)結(jié)構(gòu)的用法 //
未完待續(xù)。晃酒。。窄绒。贝次。
Queue // 放在 隊列中瀏覽的新聞。彰导。 poll() add()
LinkedList // Queue<NewsWithRelated> newsQueue = new LinkedList<NewsWithRelated>();
Set // 標(biāo)記 已經(jīng)訪問過的 URL add()
HashSet // Set<String> visited = new HashSet<>();
ArrayList // 存儲 掃描到的內(nèi)容 (多態(tài)) add()
HashMap // put() entrySet()
Map
==============================================================
jsoup : jsoup is an open-source Java library designed to parse, extract, and manipulate data stored in HTML documents.
==============================================================