Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) throws IOException {
- ArrayList <String> list = new ArrayList<String>();
- Document doc = Jsoup.connect("http://blackcub.ru/category/analytics").get();
- Elements links = doc.select("a");
- for(Element link : links){
- String s = link.attr("abs:href");
- for(int i = 0;i<11;i++){
- if(s.contains("2016")){
- list.add(s);
- Set<String> hs = new HashSet<>();
- hs.addAll(list);
- list.clear();
- list.addAll(hs);
- }
- }
- }
- for(int i = 0;i<list.size();i++){
- System.out.println(list.get(i));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment