三木猿阅读(电脑小说漫画阅读器) v1.5
下载安装

软件介绍

三木猿阅读专为喜欢看小说的电脑端用户制作,提供海量丰富的小说和漫画资源,数据资源来源于网络,用户能够在这里搜索资源并进行在线阅读,还提供离线下载的功能,用户无需注册会员即可免费看到小说的全部章节内容,支持添加书签和自定义设置阅读页面。

软件功能

在线小说资源阅读

离线下载功能

搜索框

多数据源筛选

软件使用

解压后打开exe文件,到浏览器输入http://localhost/,即可开始阅读,数据源有两个biquge和biquge5200,页面借用了起点。

部分代码

package com.aaa.data;

import com.aaa.config.SSLHelper;

import com.aaa.dto.BookCatalogueDto;

import com.aaa.entity.BookCatalogue;

import org.jsoup.Jsoup;

import org.jsoup.nodes.Document;

import org.jsoup.nodes.Element;

import org.jsoup.nodes.Node;

import org.jsoup.select.Elements;

import java.io.IOException;

import java.util.ArrayList;

import java.util.HashMap;

import java.util.List;

import java.util.Map;

import java.util.concurrent.*;

import java.util.regex.Matcher;

import java.util.regex.Pattern;

import static com.aaa.util.DataProcessing.splitList;

/**

* [url=home.php?mod=space&uid=686208]@AuThor[/url] 杨森

* [url=home.php?mod=space&uid=1248337]@version[/url] 1.0

* @Title: BookCatalogue

* [url=home.php?mod=space&uid=686237]@date[/url] 2020/8/7 15:39

*/

public class BookCatalogueDB {

private static ExecutorService executorService;

public static ListsetDataSource(String dataSource, String bookCod,ExecutorService executorService) {

BookCatalogueDB.executorService =executorService;

SSLHelper.init();

if ("biquge5200".equals(dataSource)) {

return biquge5200(bookCod);

} else if ("biquge".equals(dataSource)) {

return biquge(bookCod);

}

return null;

}

private static Listbiquge5200(String bookCod) {

try {

Map<Integer,List> bookCatalogueDtoMaps = new HashMap<>(3);

Pattern pattern = Pattern.compile("]>([⁄⁄s⁄⁄S]*?)(?=)");

Document document = Jsoup.connect("https://www.biquge5200.com/" + bookCod + "/").get();

Elements dd = document.getElementsByTag("dd");

Map<Integer, List> integerListMap = splitList(dd, 3);

CountDownLatch latch=new CountDownLatch(3);

for (int i = 0; i < 3; i++) {

final int ins=i;

executorService.execute(() -> {

bookCatalogueDtoMaps.put(ins,get(integerListMap.get(ins), bookCod, document, pattern));

latch.countDown();

});

}

latch.await();

ListbookCatalogueDtos=new ArrayList<>(dd.size());

for (int i = 0; i < 3; i++) {

bookCatalogueDtos.addAll(bookCatalogueDtoMaps.get(i));

}

return bookCatalogueDtos;

} catch (IOException e) {

e.printStackTrace();

} catch (InterruptedException e) {

e.printStackTrace();

}finally {

executorService.shutdown();

}

return null;

}

public static Listget(Listdd, String bookCod, Document document, Pattern pattern) {

ListbookCatalogueDtos = new ArrayList<>(dd.size());

Element imgurl = document.getElementById("fmimg");

Element intro = document.getElementById("intro");

Element info = document.getElementById("info");

Element child = info.child(1);

String h1 = info.select("h1").text();

for (int i = 0; i < dd.size(); i++) {

Element element = dd.get(i);

BookCatalogueDto bookCatalogueDto = new BookCatalogueDto();

BookCatalogue bookCatalogue = new BookCatalogue();

Node node = element.childNode(0);

for (Node e : element.childNodes()) {

if (!"".equals(e.toString())) {

node = e;

}

}

bookCatalogueDto.setCatalogueName(node.childNode(0).toString());

String s1 = node.toString();

Matcher matcher = pattern.matcher(s1);

if (matcher.find()) {

String nameCodeUrl = matcher.group(1);

String insStr = nameCodeUrl.substring(nameCodeUrl.lastIndexOf("/") + 1, nameCodeUrl.lastIndexOf("."));

bookCatalogueDto.setCatalogueCod(Integer.parseInt(insStr));

}

bookCatalogueDto.setBookName(h1);

bookCatalogueDto.setBookIntro(intro.text());

for(Node n :imgurl.childNodes()){

if(n.toString().matches("(.*)img(.*)")){

bookCatalogueDto.setBookImage(imgurl.childNode(0).toString());

}

}

bookCatalogueDto.setBookCod(bookCod);

bookCatalogueDto.setBookAuthor(child.text().replace("作 者:",""));

bookCatalogueDtos.add(bookCatalogueDto);

if (i + 1 < dd.size()) {

Node node1 = dd.get(i + 1).childNode(0);

Matcher matcher1 = pattern.matcher(node1.toString());

if (matcher1.find()) {

String nameCodeUrl = matcher.group(1);

String insStr = nameCodeUrl.substring(nameCodeUrl.lastIndexOf("/") + 1, nameCodeUrl.lastIndexOf("."));

bookCatalogue.setNextCode(Integer.parseInt(insStr));

}

}

}

return bookCatalogueDtos;

}

private static Listbiquge(String bookCod) {

try {

Pattern pattern = Pattern.compile("]>([⁄⁄s⁄⁄S]*?)(?=)");

Document document = Jsoup.connect("https://www.biquge.com/" + bookCod + "/").get();

Map<Integer,List> bookCatalogueDtoMaps = new HashMap<>(3);

Elements dd = document.getElementsByTag("dd");

Map<Integer, List> integerListMap = splitList(dd, 3);

CountDownLatch latch=new CountDownLatch(3);

for (int i = 0; i<3; i++) {

final int ins=i;

executorService.execute(()->{

bookCatalogueDtoMaps.put(ins,get(integerListMap.get(ins), bookCod, document, pattern)) ;

latch.countDown();

});

}

latch.await();

ListbookCatalogueDtos=new ArrayList<>(dd.size());

for (int i = 0; i < 3; i++) {

bookCatalogueDtos.addAll(bookCatalogueDtoMaps.get(i));

}

return bookCatalogueDtos;

} catch (Exception e) {

e.printStackTrace();

}finally {

executorService.shutdown();

}

return null;

}

}

以上就是三木猿阅读(电脑小说漫画阅读器)的全部内容了,快快收藏非凡软件站下载更多软件和游戏吧!

相关推荐

查看更多>

软件资讯

查看更多>

相关专题

查看更多>