|
@@ -20,10 +20,7 @@ import com.cslg.ppa.mapper.ReportMapper;
|
|
import com.cslg.ppa.mapper.SourceInfoMapper;
|
|
import com.cslg.ppa.mapper.SourceInfoMapper;
|
|
import com.cslg.ppa.service.ArticleInfoService;
|
|
import com.cslg.ppa.service.ArticleInfoService;
|
|
import com.cslg.ppa.service.CategoryService;
|
|
import com.cslg.ppa.service.CategoryService;
|
|
-import com.cslg.ppa.service.GetWebArticle.GetCNIPAArticleService;
|
|
|
|
-import com.cslg.ppa.service.GetWebArticle.GetLocalInformationService;
|
|
|
|
-import com.cslg.ppa.service.GetWebArticle.GetProvinceNewsService;
|
|
|
|
-import com.cslg.ppa.service.GetWebArticle.GetWeChatArticleService;
|
|
|
|
|
|
+import com.cslg.ppa.service.GetWebArticle.*;
|
|
import com.cslg.ppa.service.ReportService;
|
|
import com.cslg.ppa.service.ReportService;
|
|
import com.cslg.ppa.service.commom.DifyService;
|
|
import com.cslg.ppa.service.commom.DifyService;
|
|
import com.cslg.ppa.service.commom.WeiXinApi;
|
|
import com.cslg.ppa.service.commom.WeiXinApi;
|
|
@@ -78,6 +75,8 @@ class PpaApplicationTests {
|
|
private ReportService reportService;
|
|
private ReportService reportService;
|
|
@Autowired
|
|
@Autowired
|
|
private GetProvinceNewsService getProvinceNewsService;
|
|
private GetProvinceNewsService getProvinceNewsService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private GetEcigaretteService getEcigaretteService;
|
|
|
|
|
|
@Test
|
|
@Test
|
|
void contextLoads() {
|
|
void contextLoads() {
|
|
@@ -125,8 +124,10 @@ class PpaApplicationTests {
|
|
|
|
|
|
@Test
|
|
@Test
|
|
void getCondensedAbstract() throws Exception {
|
|
void getCondensedAbstract() throws Exception {
|
|
- difyService.getCondensedAbstract("近日,最高人民法院知识产权法庭审结一起侵害发明专利权纠纷,驳回专利权人。" +
|
|
|
|
- "专利权人无正当理由隐瞒不报,构成“故意作虚假陈述妨碍人民法院审理”的,人民法院可以依法处罚。");
|
|
|
|
|
|
+// difyService.getCondensedAbstract("近日,最高人民法院知识产权法庭审结一起侵害发明专利权纠纷,驳回专利权人。" +
|
|
|
|
+// "专利权人无正当理由隐瞒不报,构成“故意作虚假陈述妨碍人民法院审理”的,人民法院可以依法处罚。");
|
|
|
|
+ final String s = difyService.getPctCondensedAbstract("新加坡知识产权局自2025年9月1日起上调发明专利年费。");
|
|
|
|
+ System.out.println(s);
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
@Test
|
|
@@ -206,7 +207,7 @@ class PpaApplicationTests {
|
|
@Test
|
|
@Test
|
|
void singleTestAdd() throws IOException {
|
|
void singleTestAdd() throws IOException {
|
|
List<String> list = new ArrayList<>();
|
|
List<String> list = new ArrayList<>();
|
|
- list.add("https://mp.weixin.qq.com/s/AiPOo50MhPO_ikMHft5ngA");
|
|
|
|
|
|
+ list.add("https://mp.weixin.qq.com/s?__biz=Mzg5MjA1MTkyNA==&mid=2247485509&idx=1&sn=8d9551806c9a6d2dd1cb8f0a5351144e&chksm=cfc540fef8b2c9e857a9142d5c433922a33c0f82cb25600582fcac91a00dd5fbc21b2eac9e24#rd");
|
|
// list.add("https://mp.weixin.qq.com/s/LCnC8UICiG7wxdvMqfE5qQ");
|
|
// list.add("https://mp.weixin.qq.com/s/LCnC8UICiG7wxdvMqfE5qQ");
|
|
// list.add("https://www.cnipa.gov.cn/art/2025/8/21/art_74_201139.html");
|
|
// list.add("https://www.cnipa.gov.cn/art/2025/8/21/art_74_201139.html");
|
|
for (String url : list) {
|
|
for (String url : list) {
|
|
@@ -241,7 +242,7 @@ class PpaApplicationTests {
|
|
// String url = "https://jsip.jiangsu.gov.cn/col/col75877/index.html";
|
|
// String url = "https://jsip.jiangsu.gov.cn/col/col75877/index.html";
|
|
// String url = "https://jsip.jiangsu.gov.cn/col/col85036/index.html";
|
|
// String url = "https://jsip.jiangsu.gov.cn/col/col85036/index.html";
|
|
//-------------上海知识产权局
|
|
//-------------上海知识产权局
|
|
- String url = "https://sipa.sh.gov.cn/index.html";
|
|
|
|
|
|
+// String url = "https://sipa.sh.gov.cn/index.html";
|
|
// String url = "https://sipa.sh.gov.cn/2021gzdt/index.html";
|
|
// String url = "https://sipa.sh.gov.cn/2021gzdt/index.html";
|
|
//-------------浙江知识产权局(浙江省知识产权保护中心)
|
|
//-------------浙江知识产权局(浙江省知识产权保护中心)
|
|
// String url = "https://zjippc.org.cn/";
|
|
// String url = "https://zjippc.org.cn/";
|
|
@@ -252,6 +253,8 @@ class PpaApplicationTests {
|
|
// String url = "https://zscqj.cq.gov.cn/";
|
|
// String url = "https://zscqj.cq.gov.cn/";
|
|
//-------------天津知识产权局
|
|
//-------------天津知识产权局
|
|
// String url = "https://zscq.tj.gov.cn/";
|
|
// String url = "https://zscq.tj.gov.cn/";
|
|
|
|
+
|
|
|
|
+ String url = "https://www.2firsts.cn/";
|
|
getProvinceNewsService.crawlArticles(url);
|
|
getProvinceNewsService.crawlArticles(url);
|
|
// final List<GetArticleInfoDTO> articleInfoDTOS = getProvinceNewsService.crawlArticlesDetail(url);
|
|
// final List<GetArticleInfoDTO> articleInfoDTOS = getProvinceNewsService.crawlArticlesDetail(url);
|
|
// System.out.println(articleInfoDTOS);
|
|
// System.out.println(articleInfoDTOS);
|
|
@@ -259,4 +262,10 @@ class PpaApplicationTests {
|
|
// final String digest = getProvinceNewsService.getDigest(url);
|
|
// final String digest = getProvinceNewsService.getDigest(url);
|
|
// System.out.println(digest);
|
|
// System.out.println(digest);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Test
|
|
|
|
+ void crawlEcigaretteArticles() throws IOException {
|
|
|
|
+ String url = "https://www.2firsts.cn/";
|
|
|
|
+ getEcigaretteService.crawlEcigaretteArticles(url);
|
|
|
|
+ }
|
|
}
|
|
}
|