Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class helloS {
- //вот этот статичный лист - то, что надо для выбора на клик(ссылка)
- public static ArrayList<String>list1OfLinks() 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");
- if(s.contains("2016")){
- list.add(s);
- Set<String> hs = new LinkedHashSet<>();
- hs.addAll(list);
- list.clear();
- list.addAll(hs);
- }
- }
- return list;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement