Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
epub-crawler
比较版本
f7ac236016d87c3e136dd2891d492d49b9ea8112...4b1fffa0aa6f3bcefe3772983e210488969cf66f
E
epub-crawler
项目概览
OpenDocCN
/
epub-crawler
9 个月 前同步成功
通知
1
Star
22
Fork
6
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
epub-crawler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
源分支
4b1fffa0aa6f3bcefe3772983e210488969cf66f
选择Git版本
...
目标分支
f7ac236016d87c3e136dd2891d492d49b9ea8112
选择Git版本
比较
Commits (4)
https://gitcode.net/OpenDocCN/epub-crawler/-/commit/0f000b5df40172a71c713ac01bf88f01ed940c86
2022-05-30 16:44:19
2022-05-30T16:44:19+08:00
wizardforcel
562826179@qq.com
https://gitcode.net/OpenDocCN/epub-crawler/-/commit/44a8fe6e2c5087fc33ec9b7e9b8a095f3489df0d
2022-05-30 16:45:11
2022-05-30T16:45:11+08:00
wizardforcel
562826179@qq.com
https://gitcode.net/OpenDocCN/epub-crawler/-/commit/7c92745047c2b3f3148744a9c1eeb6b5d16faa2b
2022-05-30 16:45:40
2022-05-30T16:45:40+08:00
wizardforcel
562826179@qq.com
https://gitcode.net/OpenDocCN/epub-crawler/-/commit/4b1fffa0aa6f3bcefe3772983e210488969cf66f
2022-05-30 16:45:57
2022-05-30T16:45:57+08:00
wizardforcel
562826179@qq.com
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
1 deletion
+8
-1
CHANGELOG.md
CHANGELOG.md
+4
-0
EpubCrawler/__init__.py
EpubCrawler/__init__.py
+1
-1
EpubCrawler/__main__.py
EpubCrawler/__main__.py
+3
-0
未找到文件。
history
.md
→
CHANGELOG
.md
浏览文件 @
4b1fffa0
# 历史记录
v2022.5.30.0
+
修复带有 XML 标签的文档爬取失败的问题
v2022.3.25.0
+
新增缓存功能
...
...
EpubCrawler/__init__.py
浏览文件 @
4b1fffa0
...
...
@@ -10,4 +10,4 @@ from . import util
__author__
=
"ApacheCN"
__email__
=
"apachecn@163.com"
__license__
=
"SATA"
__version__
=
"2022.
3.25
.0"
__version__
=
"2022.
5.30
.0"
EpubCrawler/__main__.py
浏览文件 @
4b1fffa0
...
...
@@ -65,6 +65,9 @@ def get_toc(html, base):
return
res
def
get_article
(
html
,
url
):
# 预处理掉 XML 声明和命名空间
html
=
re
.
sub
(
r
'<\?xml[^>]*\?>'
,
''
,
html
)
html
=
re
.
sub
(
r
'xmlns=".+?"'
,
''
,
html
)
root
=
pq
(
html
)
if
config
[
'remove'
]:
...
...