FanTuan

Project Url: loveliu/FanTuan
Introduction: 开箱即食的开源小说阅读软件。
More: Author   ReportBugs   
Tags:
App-

开源小说阅读 app,切勿用于不当用途。造成一切后果与本人无关。

求个缺 Android 开发的团队收留 --> yzd11254@gmail.com

下载应用

百度小说源 还未加入 app,有空再加。

食用配料

Java + Kotlin + okgo(okhttp) + RxJava + GreenDB + GreenDaoUpgradeHelper

小说源

两种方式获取小说内容,一种追书神器 api,一种爬取盗版小说站。

追书神器 api

在项目的 api 文件里有详尽的接口说明。来源于网络。

爬虫

重点说说爬虫的实现。考虑到旧版追书的 api(新版的都用 https)随时都可能会关闭。刚开始只是实现爬虫的, 本着学习的心态(人话:主要还是考虑到请求速度还有质量)。

对爬虫的要求:

  • 不升级 app,能修改爬虫。
  • 不升级 app,能增加盗版站的爬虫。

    使用方案是,把单个盗版小说站爬虫打包成一个 jar 包,然后通过动态加载 jar 包反射调用里面的方法,获取小说内容。通过与服务器的通信进行 jar 包增删改操作。

制作爬虫步骤:

  • 0.参考 module 包里面的 BooFactory_xxxxx 类。

  • 1.继承 com.anonymouser.book.module.IBookLoadFactory

  • 2.实现 getZhangjie 方法,实现爬取章节标题和章节的链接。

  • 3.实现 getBook 主体内容的爬虫。

  • 4.实现 getVersion 该爬虫的版本号,考虑到网站会改变。

  • 5.打包类为 jar 包,如何打包成 jar 包(略),打包后参考 assets/jar,也可以放在服务器,实现更新爬虫,添加爬虫。

字体修改

  • 0.字体文件放在 assets/fonts。
  • 1.解除注释 com.anonymouser.book.bean.PaintInfo$58 。
  • 2.修改 com.anonymouser.book.bean.PaintInfo$61 修改成字体文件路径。
  • 3.解除注释 com.anonymouser.book.widget.BookPageFactory$61 。
  • 4.需要实现多字体选择请自行修改代码。

提示

  • 内有 Google analytics 和 Google adword。请自行修改。

成型

image
image
image
image
image

License

饭团小说    
Copyright 2017 Yang

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apps
About Me
GitHub: Trinea
Facebook: Dev Tools