Code Monkey home page Code Monkey logo

oho-reader's Introduction

oho-reader

哦豁阅读器!API源自追书神器,免费使用!目前已初步开发完成!

实现追书神器核心功能,做到小说阅读的极简体验,把每一分流量都用到刀刃上!

Github项目地址:https://github.com/ShanaMaid/oho-reader

欢迎issueprstar or follow!我将继续开源更多有趣的项目

推荐一个之前用Vue全家桶写的 网易云音乐PC端 web版本

在线版

http://119.29.159.156:3001/

部分效果截图

3 6

更多效果gif图

oho阅读器优势

oho阅读器 追书神器
收费 免费 部分章节免费,其余收费
广告 绿色无广告 定时刷广告
体积 4MB 16.2MB
章节大小 每章5kb左右 掺杂广告,大于5kb

oho阅读器初次打开时候加载比较慢,一部分原因是服务器带宽较小,另一部分是因为初次需要下载700kb左右的文件,建议初次下载在wifi下进行。初次下载后oho阅读器会自动进行缓存,以后每次打开页面基本是秒开,消耗流量约在1KB不到。

初次打开消耗流量约在700kb左右

初次打开消耗流量约在700kb左右

后续打开消耗流量约在1kb不到

后续打开消耗流量约在1kb不到

同时oho器抛弃所有与小说阅读无关的信息,真正做到极简!保证每一分流量都用到小说内容的阅读上,真正做到每章内容加载所用的流量集中在小说章节内容上,视章节字数而定,一般在5kb左右。

每章流量消耗

每章流量消耗

使用

git clone https://github.com/ShanaMaid/oho-reader.git

cd oho-reader

npm install 

# 开发环境
npm run serve
访问 http://localhost:8080/

# 打包
npm run dist

# 实际环境
cd dist
node app.js
访问 http://localhost:3001/

Docker: 方便在Docker下部署 Docker-file

感谢@esme518提供

实现功能

  • 小说搜索
  • 小说详情
  • 小说换源
  • 小说阅读
  • 小说分享
  • 阅读字体大小变化
  • 阅读背景色变化
  • 阅读设置本地缓存
  • 阅读进度本地缓存
  • 搜索历史本地缓存
  • 小说章节缓存(100章)-智能删除已阅读章节

每次进入首页自动刷新最新章节列表

目录结构

|
|—— api 追书神器API说明 
|—— cfg webpack配置
|—— dist 服务端
| |—— app.js 服务端启动入口文件
| |—— assets 打包后的资源文件
| |—— static 静态资源
| |__ index.html 网页入口
|
|——src 资源文件
| |—— images 图片资源
| |—— components 组件库
| |—— method  一些自定义方法,目前是过滤器
| |—— filters 自定义过滤器
| |—— redux 
| | |—— action
| | |—— reducer
| | |__ store
| |—— router 路由管理
| |—— styles 样式文件
| |__ index.jsx 入口
|_________________________________________________

一些注意事项

项目中使用追书神器的接口,需要使用http-proxy-middleware进行转发,开发环境下需要在cfg/base.js中的dev中添加下列配置即可

proxy: {
  '/api': {
    target: 'http://api.zhuishushenqi.com/',
    pathRewrite: {'^/api' : '/'},
    changeOrigin: true
  },
  '/chapter': {
    target: 'http://chapter2.zhuishushenqi.com/',
    pathRewrite: {'^/chapter' : '/chapter'},
    changeOrigin: true
  }
}

实际环境中,服务器端配置

var express = require('express');
var proxy = require('http-proxy-middleware');

var app = express();
app.use('/static', express.static('static'));
app.use('/assets', express.static('assets'));
app.use('/api', proxy({
  target: 'http://api.zhuishushenqi.com/',
  pathRewrite: {'^/api' : '/'}, 
  changeOrigin: true
}
));

app.use('/chapter', proxy({
  target: 'http://chapter2.zhuishushenqi.com/',
  pathRewrite: {'^/chapter' : '/chapter'},
  changeOrigin: true
}
));

app.get('/*', function (req, res) {
  res.sendFile(__dirname + '/index.html');
});
app.listen(3001);

支持

BUG提交请发送邮箱: [email protected]

欢迎issueprstar or follow!我将继续开源更多有趣的项目

你可以在这里打赏我

你的支持将有助于项目维护以及提高用户体验,感谢各位的支持!

特别鸣谢

感谢@hieixu对本项目的长期跟进,提出了许多issue改进用户体验以及打赏支持

oho-reader's People

Contributors

esme518 avatar shanamaid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oho-reader's Issues

换源可能导致阅读页一直显示“内容加载中”

复现步骤:

  1. 选择任意一本书,阅读到最后一章
  2. 选择换源,多次切换源站
    在切换到某些源站的时候,会先提示“已经是最后一章了”,并出现“内容加载中”。
    此时,只能通过后退到换源的页面并选择一个合适的源站才能解决问题。

原因猜想:
各个网站的章节不一致,本地记录的当前阅读进度在一些网站还没存在(out of index)。

再提个建议: 换源页面能否显示当前使用的源站

首页书籍列表拉动有问题

环境: iPhone 6 iOS 10.3.1 自带safari浏览器 ,自行搭建和项目提供的在线网站都测试过
前提条件: 已经添加了7本小说。
在网站首页的小说列表,按住页面,向下拉会刷新小说进度,往上拉无法拖动。
第7本小说无法在首页列表显示。

请求

需要滑动翻页功能(可根据起点网的手机网页版)

封面错误

url2Real 函数添加 decodeURIComponent

//转化封面url为实际url
export const url2Real = (url) => {
	if (url.search(/agent/i) === -1) {
      return 'http://api.zhuishushenqi.com' + url;
    }
    else{
      return decodeURIComponent(url.replace(/\/agent\//, ''));
    }
}

首页和搜索关键词排序的建议

首页排序 (能明显提高用户体验)
现状: 按小说添加的顺序排序
建议: 最近阅读和最近添加的小说排在前面

搜索关键词 (此条不重要)
现状: 按搜索的时间顺序排序
建议: 按搜索的时间逆序排序

行首空两格

获取到章节内容之后,做一下转换吧,如果有\n 的地方,换行的时候,空两格,这样看着舒服些

api 的来源是咋弄的

我之前写了个 node 后台抓取小说的爬虫,所以对你这个 api 的来源有点好奇,你是怎么弄到追书神器里的 api,并且通过它们验证的

阅读页不更新最新的章节列表

小说更新后,从书架点击进入阅读页,即使源站已经更新了,但是阅读页还是老的章节列表。
换源再次选择原来的源或其他更新的源即可更新到最新的章节。

是否计划提供浏览器缓存章节内容功能

章节内容缓存功能是我觉得最重要的一个功能,可以在保证在网络环境不好的情况下都能流畅阅读小说。
我在自己搭建的服务器测试了最新的代码,似乎没有相关配置。
再次感谢作者提供的软件,做了小小的打赏以表心意。

好666

添加一个iOS 或者安卓端的 webView 打开网页 就成全平台兼容了

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.