Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加二维码扫码登入功能;新增对BiliPlus缓存内容的下载支持 #63

Merged
merged 21 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
699914b
✨ 新增对BiliPlus缓存内容的下载支持
shadlc Jul 1, 2023
6934b44
Merge pull request #47 from shadlc/experiment/biliplus
Zeal-L Jul 1, 2023
99139b3
🚑 BiliPlus多项修复
shadlc Jul 3, 2023
8800a47
Merge pull request #48 from shadlc/experiment/biliplus
Zeal-L Jul 3, 2023
b2c050d
:pencil2: 修改相关版本号
Zeal-L Jul 4, 2023
9f59996
💥多项程序修复与改进
shadlc Jul 24, 2023
17467dc
🐛 修复BiliPlus Cookie检测可能出现的隐藏BUG
shadlc Jul 24, 2023
f34c478
Merge pull request #53 from shadlc/experiment/biliplus
Zeal-L Jul 24, 2023
69dc02c
⚰️注释biliplus特殊的哈希检验算法
shadlc Aug 8, 2023
9870b42
:fire: 移除Pipfile.lock文件
Zeal-L Aug 9, 2023
7aafce2
:construction: 添加gitignore
Zeal-L Aug 9, 2023
655579e
Merge branch 'experiment/biliplus' into develop
Zeal-L Aug 9, 2023
696e26a
:rocket: 移除保存文件夹名里的ID信息;元数据现在默认下载,并且以此来初始化我的库存。
Zeal-L Aug 9, 2023
f9491fa
:fire: 移除重复代码 (isCheckSumValid)
Zeal-L Aug 9, 2023
605addb
:bug::sparkles: 修复个别png保存为jpg的情况;添加二维码登入功能
Zeal-L Aug 10, 2023
a470000
:bug: 修复二维码登入中SESSDATA错误问题
Zeal-L Aug 10, 2023
ba5f40e
Rename BIliQrCode.py to BiliQrCode.py
Zeal-L Aug 10, 2023
a3b1828
:zap: 优化点击下载后的主窗口阻塞问题
Zeal-L Aug 10, 2023
6f438ed
Update README.md
Zeal-L Aug 10, 2023
1673fbb
Merge branch 'main' of https://github.com/Zeal-L/BiliBili-Manga-Downl…
Zeal-L Aug 10, 2023
fa0fb2d
:bug: 修复qt_resource 编译问题
Zeal-L Aug 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ body:
id: version
attributes:
label: 哔哩哔哩漫画下载器版本号
placeholder: v1.1.1
placeholder: v1.3.0
validations:
required: true
- type: dropdown
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
interval: "weekly"
134 changes: 134 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
.vscode/
Report.*

~$rEPORT.DOCX

codiga.yml
哔哩哔哩漫画下载器.exe


# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
# *.spec
myPyinstaller.json

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
20 changes: 11 additions & 9 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ verify_ssl = true
name = "pypi"

[packages]
piexif = ">=1.1.3"
py7zr = ">=0.20.4"
pypdf2 = ">=3.0.1"
pyside6 = ">=6.4.2"
requests = ">=2.28.1"
retrying = ">=1.3.4"
pillow = ">=9.4.0"
pypinyin = ">=0.48.0"
qt-material = ">=2.14"
piexif = "*"
py7zr = "*"
pypdf2 = "*"
pyside6 = "*"
requests = "*"
retrying = "*"
pillow = "*"
pypinyin = "*"
qt-material = "*"
beautifulsoup4 = "*"
qrcode = "*"

[dev-packages]
rich = "*"
Expand Down
1,137 changes: 0 additions & 1,137 deletions Pipfile.lock

This file was deleted.

82 changes: 57 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,15 @@
**由于作者某天实在是受不了B漫网页版的观看体验 ~~(时而混入漫画中的广告,无法便捷快速的放大图片,进度栏作死一样的反复横跳挡视线等等...)~~,再加上作者的仓鼠属性 😛**

**因此 将将将~ 🎉 一个好用的哔哩哔哩漫画下载器就此诞生!**
<div align=center>
<img src="https://user-images.githubusercontent.com/72005386/222969436-a31d4d16-2d24-40ba-bb0b-06c883ba7406.png" width=90%>
<img src="https://user-images.githubusercontent.com/72005386/222970947-25bad523-5fac-4a95-972e-2186b774f535.jpg" width=90%>
</div>

## :sparkles: 主要功能 / 特性
- **~~(白嫖)~~ 黑科技下载未解锁章节!**
- **已打包成单个可执行文件,双击即用!**
- **易操作的图形界面!~~(不用再费劲的部署环境跑命令行)~~**
- **无需漫画ID,可直接关键词搜索漫画!并附带搜索词高亮!**
- **丰富的漫画详情信息,并提供元数据下载!**
- **可配置的多线程下载,速度拉满!**
- **实现了应对网络波动等情况的异常重试,以及应用了指数级退让来避免在短时间大量重试被拉黑名单**
- **本地漫画管理功能,一键检查更新!**
- **丰富的漫画详情信息,本地漫画管理功能,一键检查更新!**
- **通过正则匹配过滤重复的章节名称内容,以及过滤非法字符!**
- **提供多种可选的保存格式:**
- PDF
Expand All @@ -41,23 +37,48 @@
- **一键清空用户数据,妈妈再也不用担心我删不干净软件了!~~(bushi)~~**
- **多种主题选择**

## 📸 相关截图
**使用哔站解析**
<div align=center>
<img src="https://github.com/Zeal-L/BiliBili-Manga-Downloader/assets/72005386/39f4e66f-50f1-410b-8761-971eeb9cf30e" width=80%>
</div>

**使用BiliPlus解析**
<div align=center>
<img src="https://github.com/Zeal-L/BiliBili-Manga-Downloader/assets/72005386/4686f08b-2e88-4070-8d90-661c0a4392b6" width=80%>
</div>

**下载进度界面**
<div align=center>
<img src="https://github.com/Zeal-L/BiliBili-Manga-Downloader/assets/72005386/9c99e3c8-4283-4b0d-a5cd-23dab08b78b6" width=80%>
</div>

## 📝 使用指南
- **本软件的正式版只能下载免费章节和用户已解锁的章节**
- 不过呢有需要的可以尝试预发布版本 (~~黑科技~~实验性功能) 详情请见 [v1.2.0-alpha](https://github.com/BiliBili-Manga-Downloader-Dev-Team/BiliBili-Manga-Downloader/releases/tag/v1.2.0-alpha)
- **本软件有两种下载解析方法:**
- **B站解析**
- 只能下载免费章节和用户已解锁的章节
- **首先获得你的Cookie**
- 方法一 - B漫手机客户端扫码登入
- 方法二 - 手动获取Cookie:
1. 以谷歌浏览器为例,打开B漫首页并且登入
2. 点击 `F12` 打开开发者工具
3. 点击 `应用` 标签
4. 在边栏中找到 `Cookie` ,点击 `https://manga.bilibili.com`
5. 在右侧的详情中找到 `SESSDATA`,复制 `值` 粘贴到程序设置选项中的 `我的Cookie` ,回车确认
6. 如果提示 `Cookie有效!` 那么就成功了!
7. 否则请再次确认上述步骤,检查是否正确复制内容不含空格,还有疑问的话欢迎联系作者或提 `Issues`
- **BiliPlus解析**
- 利用 [biliplus](https://www.biliplus.com/) 提供的 [ComicWebReader](https://www.biliplus.com/manga/) 在线漫画平台的api来尝试获取未解锁的漫画章节
- 该网站现有 4w+ 已关联 `Bilibili` 帐号的访客,也就是说很有概率你想看的漫画已经有人购买了,所以你可以白嫖
- **特别提示: 毕竟是要提供 Cookie 给第三方网站托管,因此可能会有潜在的安全风险。敏感人群请不要使用自己主账号的 Cookie**
- `BiliPlus` 的 `Cookie` 获取方法跟上述一致,在 [ComicWebReader](https://www.biliplus.com/manga/) 登入后在开发者工具中找到 `access_key` 粘贴到程序设置选项中的 `BiliPlus Cookie` 即可

- **兼容性:目前只在64位的Winodw 10上测试通过,不过其他>=windows 10的版本应该都能运行,发现问题的欢迎提Issues**
- **首先获得你的Cookie**
1. 以谷歌浏览器为例,打开B漫首页并且登入
2. 点击顶部地址栏左侧的🔒图标
3. 点击Cookie选项
4. 在弹出的界面中依次展开"bilibili.com" -> "Cookie"
5. 找到"SESSDATA"值,复制"内容"粘贴到程序设置选项中的"我的Cookie",回车确认
6. 如果提示"Cookie有效!"那么就成功了!
7. 否则请再次确认上述步骤,检查是否正确复制内容不含空格,还有疑问的话欢迎联系作者或提Issues
- **搜索 / 选择章节 / 下载 的功能介绍我想已经不言而喻了,这就是图形化界面的好处!**
- **值得注意的是:本软件不支持断点续传和下载任务缓存的功能 ~~(毕竟一章漫画太小了,好像也没什么必要,断了不如重下)~~,所以请确保不要在下载中途关闭!**
- 如果程序意外中断,可以选择把下了一半的文件都删掉(一般在目标漫画文件夹的根目录下),重新下载
- **程序缓存和日志历史文件存在 `C:\Users\AppData\Roaming\BiliBili-Manga-Downloader\` 目录下,可以通过"清空用户数据"功能一键删除**
- **如果想用"本地库存"功能,需要注意的是:下载好的漫画的文件夹名以及章节名都不能更改,否则将会无法正确读取漫画数据**
- **如果想用"本地库存"功能,需要注意的是:下载好的漫画章节名以及保存的 `元数据.json` 都不能更改,否则将会无法正确读取漫画数据**
- **🔥 下面我要隆重的推荐一款搭配本软件使用的漫画浏览器 ~~(可以说就是为了这点儿醋 我才包的这顿饺子)~~**
- <div align=center><img src="https://user-images.githubusercontent.com/72005386/222974497-18b568e7-5b2e-416f-8d14-22ec68323570.png" width=100%></div>
- **NeeView** 是一款 Windows 下开源的图片浏览器,其特色是可以像翻书一样同时浏览两张照片,还支持压缩包看图、鼠标手势、触摸操作、多线程和超前查看、支持 PDF / 视频。 原生支持中文
Expand All @@ -73,11 +94,11 @@
## 💡 TODO List ~~(在可见的未来...)~~
- **PS: 也欢迎小伙伴们多多的在Issues里提意见,不管是Bug还是操作逻辑,界面优化等等作者统统笑纳~**
- 🟦 缓存更多资源,减少网络请求
- 🟦 添加二维码扫码登入功能
- 🟦 添加一个启动程序加载进度条
- 🟦 添加我的追漫界面,以及追漫功能
- 🟦 对于有特典的漫画,提供特典下载界面
- **已解决**
- ✅ ~~添加二维码扫码登入功能~~
- ✅ ~~添加不同的界面主题~~
- ✅ ~~添加检测cookie无效或者过期功能,并且弹窗~~
- ✅ ~~鼠标移动到漫画封面改变鼠标图标,提示用户可以点击跳转~~
Expand All @@ -103,9 +124,8 @@
2. 这一步可能会花费一定时间,中途需要手动确认安全漏洞检查
2. 打包好的程序会被移动到项目的根目录 "哔哩哔哩漫画下载器.exe"
- **彻底清除项目 ~~(删库跑路)~~**
1. 执行 `pipenv uninstall --all`
2. 执行 `pipenv --rm `
3. 执行 `cd .. && rm -rf BiliBili-Manga-Downloader/`
1. 执行 `pipenv --rm `
2. 执行 `cd .. && rm -rf BiliBili-Manga-Downloader/`

## 🔨 PR 格式
- 遵循项目已有代码的 python doc 格式
Expand All @@ -118,17 +138,29 @@

## ⚰️ 更新记录

![Alt](https://repobeats.axiom.co/api/embed/da4fa229ddede4560beefbe2dee47490257186e5.svg "Repobeats analytics image")
### v1.2.0-alpha - *2022-07-4*
- 非生产准备就绪的实验性版本
- 新增功能: 利用 [biliplus](https://www.biliplus.com/) 提供的 [ComicWebReader](https://www.biliplus.com/manga/) 在线漫画平台的api来尝试获取未解锁的漫画章节
![Alt](https://repobeats.axiom.co/api/embed/cc62fded834eb06fc9b30cf7ffd54eeb53d700fc.svg "Repobeats analytics image")

### v1.3.0 - *2022-08-11*
- 新增功能:
- 二维码登入
- 利用 [biliplus](https://www.biliplus.com/) 提供的 [ComicWebReader](https://www.biliplus.com/manga/) 在线漫画平台的api来尝试获取未解锁的漫画章节
- 优化配置: 移除保存文件夹名里的漫画ID信息;元数据现在默认保存,并且以此来初始化我的库存
- 老用户需要重新下载一章漫画,然后把以前下载好的移动到新文件夹中
- 修复bug:
- 修复个别`png`保存为`jpg`的情况
- 修复`BiliPlus Cookie`检测可能出现的隐藏`bug` ([#61][i61])
- 修复`BiliPlus`可以看未解锁的漫画章节,软件无法下载 ([#52][i52])

[i52]: https://github.com/Zeal-L/BiliBili-Manga-Downloader/issues/52
[i61]: https://github.com/Zeal-L/BiliBili-Manga-Downloader/issues/61

### v1.2.0 - *2022-06-20*
- 新增功能: 现在可以一键保存漫画的元数据了,包括漫画封面,漫画信息, 等等 (json格式) ([#39][i39])
- 重大优化: 对于 `文件夹-图片形式` 和 `7z压缩包` 的保存方式取消了对漫画原图像的二次压缩,现在图像保存的质量和原图一致。~~(虽然用肉眼看不出来)~~ 由于 `PDF` 保存格式的特殊性,仍然会进行二次压缩和信道转换

[i39]: https://github.com/Zeal-L/BiliBili-Manga-Downloader/issues/39


### v1.1.0 - *2022-05-19*
- 新增功能: 添加了多种主题选择
- 新增功能: 一键检查软件更新
Expand Down
2 changes: 2 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ echo -e "\033[34m\n 重新编译UI文件 ... \n\033[0m"
pipenv run pyside6-rcc src/ui/PySide_src/resource.qrc -o src/ui/PySide_src/resource_rc.py
pipenv run pyside6-uic src/ui/PySide_src/mainWindow.ui -o src/ui/PySide_src/mainWindow_ui.py
pipenv run pyside6-uic src/ui/PySide_src/myAbout.ui -o src/ui/PySide_src/myAbout_ui.py
pipenv run pyside6-uic src/ui/PySide_src/qrCode.ui -o src/ui/PySide_src/qrCode_ui.py

echo -e "\033[34m\n 修复UI文件中的导入问题 ... \n\033[0m"
sed -i 's/resource_rc/src.ui.PySide_src.resource_rc/' src/ui/PySide_src/mainWindow_ui.py
sed -i 's/resource_rc/src.ui.PySide_src.resource_rc/' src/ui/PySide_src/myAbout_ui.py
sed -i 's/resource_rc/src.ui.PySide_src.resource_rc/' src/ui/PySide_src/qrCode_ui.py

echo -e "\033[34m\n 显示项目目录 ... \n\033[0m"
pipenv run pipenv --where
Expand Down