@SneakyThrows public List<String> articleUrlsInPage(@NonNull BrooksBlogParam param) {…
Jump to turn (13)
- 1@SneakyThrows public List articleUrlsInPage(@NonNull BrooksBlogParam param) { tr
- 2不能在流中直接嵌入这个功能吗
- 3这个方法的返回值肯定不为null吧
- 4Jsoup 删除掉这个div class="addtoanysharesavecontainer addtoanycontent addtoanycontent
- 5我想写一份关于中国违纪违法的以案促改案例的心得体会和剖析
- 6根据这个需求帮我生成一下,要求1000多字,案例根据您自己的知识库中,自行挑选比较新的贪腐案例就可以了。
- 7李某是谁
- 8心得体会不够全面,请继续填充一下
- 9请根据以下文风模板,生成一篇全新的心得体会,涉及有关案例请根据您自身知识库中较新的案例。要求查重率不得超过20% 文风模板: 违法违纪案例心得体会 【XXX:违
- 10继续
- 11请根据以下文风模板,生成一篇全新的心得体会(要求文风一致,字数一致,文章结构一致),涉及有关案例请根据您自身知识库中较新的案例(不必查询新案例,使用您已知的旧案
- 12字数太少了
- 13重复率是多少
- User
@SneakyThrows public List articleUrlsInPage(@NonNull BrooksBlogParam param) { try (Response response = okHttpClient.newCall(brooksBlogRequestBuilder.apply(param.getPage()).build()).execute()) { String html = Objects.requireNonNull(response.body()).string(); return Jsoup.parse(html).select("main.content article").stream() .map(article -> article.selectFirst("header.entry-header")) .filter(Objects::nonNull) .map(header -> header.selectFirst("h2.entry-title[itemprop=headline]")) .filter(Objects::nonNull) .map(h2 -> h2.selectFirst("a.entry-title-link")) .filter(Objects::nonNull) .map(a -> a.attr("href")) .collect(Collectors.toList()); } }
添加功能,判断如何param.getContainsPinned()为true,就过滤掉包含sticky 的class的article节点
- Assistant