最近离职期间,鉴于摸鱼插件不是很好用,就自己写了个,欢迎各位大佬指正

2021-03-25 16:45:22 +08:00
 676529483

灵感来自于Thief-Book-VSCode,但经常出现卡住、编码等问题,就萌生了自己写个插件的想法,二者区别如下:

区别 Thief-Book-VSCode shadow reader
大文件 全部加载 部分加载
支持编码 utf8 GB\Big5\UTF
支持书量 1 本 多本
全文搜索 不支持 向后
在线书籍 不支持 支持并可自定义仓库
更新时间 2019 2021

vscode 插件市场搜索shadow reader可得,Github 地址
欢迎各位大佬试用指正

2913 次点击
所在节点    分享创造
10 条回复
icetea12138
2021-03-26 10:08:04 +08:00
大佬不考虑考虑 idea 吗?
isSamle
2021-03-26 11:05:01 +08:00
还以为加载了爬虫哈哈,全网搜索搜不出来
676529483
2021-03-26 11:29:06 +08:00
@icetea12138 idea 如果需要的人多的话,可以写
676529483
2021-03-26 11:30:17 +08:00
@isSamle 当前网络没啥书,可以提供一点书籍 pr 或者建议,我可以去爬下
isSamle
2021-03-26 13:44:22 +08:00
@676529483 可以试下加个书源管理,自由添加一些常用的书源网站,然后用爬虫抓内容下来,搞个缓存到本地可以避免一直爬也行,不同网站的爬虫可能不好清理前端标签,然后版权方面不知道会不会有问题😂,我之前是自己写了个爬虫运行到 cmd 去不过用的本来就是盗版书源 http://note.youdao.com/noteshare?id=11eeac80bf7f4570a087ae850f9ea4e1,如果能整合到一起去直接爬取也是挺好的
676529483
2021-03-26 13:52:05 +08:00
@isSamle 有具体的项目地址吗?这个我打开是 exe 文件,可能没办法作为扩展发布
isSamle
2021-03-26 15:20:01 +08:00
@676529483 很简单的 python 脚本

----------------------------------------------------------------------------------------------------------------------------------------------
#coding=utf-8
import requests
import re
print('数据来源于 https://www.biqubao.com/ 如需到此网更新书籍')
bookurl = input('该本小说网站(直接回车自动跳转一本):')
if bookurl == '':
bookurl = 'https://www.biqubao.com/book/34203/'
homeurl = 'https://www.biqubao.com/'
A = requests.get(bookurl).content.decode('gb2312')
B = re.split(r'<dd><a href=|</a></dd>',A)
PAGE = []
for html in B:
if 'html' in html and '\n' not in html:
PAGE.append(html)

def page_new(P):
PP=int(P)-1
ok = re.split(r'"/|">',PAGE[PP])
oneurl = homeurl+ok[1]
print('_'*70)
print('|'+ok[2]+oneurl)
D = requests.get(oneurl).content.decode('gb2312')
E = re.split(r'<br />|&nbsp;&nbsp;&nbsp;&nbsp;|</div>|<h1>|</h1>|\n',D)
for text in E:
if text !='' and '<a href=' not in text:
really = 0
for i in text:
if '\u4e00' <= i <= '\u9fff':
really +=1
if really > 0:
print('|'+text)
print('——'*15)

textpage = 0
if __name__ == '__main__':
while True:
old = textpage
textpage = input('跳转书页|回车下一章 next>>')
if textpage == '':
textpage = int(old) +1
page_new(textpage)
676529483
2021-03-26 22:48:44 +08:00
@isSamle 这个笔趣网爬取难度不大,版权方面确实不清楚,才不敢随便搞。我去参考下其他插件
676529483
2021-04-01 14:49:34 +08:00
@isSamle 我刚刚更新了版本,已经支持笔趣阁了,欢迎更新试用,多提意见
isSamle
2021-04-01 16:32:22 +08:00
@676529483 好的哈哈哈,非常棒,我看看

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/765086

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX