parsehub 2.1.1__tar.gz → 2.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {parsehub-2.1.1/src/parsehub.egg-info → parsehub-2.1.2}/PKG-INFO +17 -2
- {parsehub-2.1.1 → parsehub-2.1.2}/README.md +16 -1
- {parsehub-2.1.1 → parsehub-2.1.2}/pyproject.toml +1 -1
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/coolapk.py +2 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/xhs.py +2 -2
- {parsehub-2.1.1 → parsehub-2.1.2/src/parsehub.egg-info}/PKG-INFO +17 -2
- {parsehub-2.1.1 → parsehub-2.1.2}/LICENSE +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/setup.cfg +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/__init__.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/__init__.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/cli.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/cli_config.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/config/__init__.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/config/config.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/errors.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/__init__.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/base/__init__.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/base/base.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/base/ytdlp.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/__init__.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/bilibili.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/coolapk.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/douyin.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/facebook.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/instagram.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/kuaishou.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/pipix.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/snapchat.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/threads.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/tieba.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/tiktok.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/twitter.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/weibo.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/weixin.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/xhs.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/xiaoheihe.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/youtube.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/zhihu.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/parsers/parser/zuiyou.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/__init__.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/bilibili.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/douyin.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/instagram.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/kuaishou.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/pipix.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/threads.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/tieba.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/tiktok.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/twitter.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/weibo.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/weixin.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/xiaoheihe.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/zhihu.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/provider_api/zuiyou.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/types/__init__.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/types/callback.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/types/media_file.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/types/media_ref.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/types/platform.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/types/post.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/types/result.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/utils/downloader.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/utils/helpers.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub/utils/media_info.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub.egg-info/SOURCES.txt +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub.egg-info/dependency_links.txt +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub.egg-info/entry_points.txt +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub.egg-info/requires.txt +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/src/parsehub.egg-info/top_level.txt +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/test/test_cli.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/test/test_cli_config.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/test/test_core_offline.py +0 -0
- {parsehub-2.1.1 → parsehub-2.1.2}/test/test_downloader.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: parsehub
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.2
|
|
4
4
|
Summary: 轻量、异步、开箱即用的社交媒体聚合解析库
|
|
5
5
|
Author-email: 梓澪 <zilingmio@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -310,6 +310,21 @@ except ParseError as exc:
|
|
|
310
310
|
|
|
311
311
|
---
|
|
312
312
|
|
|
313
|
+
## 🤝 参与贡献
|
|
314
|
+
|
|
315
|
+
欢迎提交 Pull Request 或 Issue!
|
|
316
|
+
|
|
317
|
+
- Bug 反馈请附上相关 URL 和日志信息
|
|
318
|
+
|
|
319
|
+
### 开发规范
|
|
320
|
+
|
|
321
|
+
提交代码前请至少执行:
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
ruff format && ruff check --fix && uv run mypy
|
|
325
|
+
uv run pytest
|
|
326
|
+
```
|
|
327
|
+
|
|
313
328
|
## 🤝 参考项目
|
|
314
329
|
|
|
315
330
|
- [Evil0ctal/Douyin_TikTok_Download_API](https://github.com/Evil0ctal/Douyin_TikTok_Download_API)
|
|
@@ -321,7 +336,7 @@ except ParseError as exc:
|
|
|
321
336
|
|
|
322
337
|
## 📜 开源协议
|
|
323
338
|
|
|
324
|
-
本项目基于 [MIT License](LICENSE)
|
|
339
|
+
本项目基于 [MIT License](LICENSE) 开源
|
|
325
340
|
|
|
326
341
|
---
|
|
327
342
|
|
|
@@ -268,6 +268,21 @@ except ParseError as exc:
|
|
|
268
268
|
|
|
269
269
|
---
|
|
270
270
|
|
|
271
|
+
## 🤝 参与贡献
|
|
272
|
+
|
|
273
|
+
欢迎提交 Pull Request 或 Issue!
|
|
274
|
+
|
|
275
|
+
- Bug 反馈请附上相关 URL 和日志信息
|
|
276
|
+
|
|
277
|
+
### 开发规范
|
|
278
|
+
|
|
279
|
+
提交代码前请至少执行:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
ruff format && ruff check --fix && uv run mypy
|
|
283
|
+
uv run pytest
|
|
284
|
+
```
|
|
285
|
+
|
|
271
286
|
## 🤝 参考项目
|
|
272
287
|
|
|
273
288
|
- [Evil0ctal/Douyin_TikTok_Download_API](https://github.com/Evil0ctal/Douyin_TikTok_Download_API)
|
|
@@ -279,7 +294,7 @@ except ParseError as exc:
|
|
|
279
294
|
|
|
280
295
|
## 📜 开源协议
|
|
281
296
|
|
|
282
|
-
本项目基于 [MIT License](LICENSE)
|
|
297
|
+
本项目基于 [MIT License](LICENSE) 开源
|
|
283
298
|
|
|
284
299
|
---
|
|
285
300
|
|
|
@@ -25,6 +25,8 @@ class Coolapk:
|
|
|
25
25
|
if title_element and (title := title_element.text.strip()):
|
|
26
26
|
content = soup.find(class_="feed-article-message")
|
|
27
27
|
if content is None:
|
|
28
|
+
if "s=" in url or "shareKey=" in url:
|
|
29
|
+
raise ValueError("获取内容失败")
|
|
28
30
|
raise ValueError("获取内容失败, 分享时请保留 shareKey 或 s 参数")
|
|
29
31
|
markdown_content = MarkdownConverter(heading_style="ATX").convert(str(content))
|
|
30
32
|
text_content = "".join(BeautifulSoup(markdown(markdown_content), "lxml").find_all(string=True))
|
|
@@ -122,7 +122,7 @@ class XHSAPI:
|
|
|
122
122
|
|
|
123
123
|
@staticmethod
|
|
124
124
|
def get_trace_id(img_url: str) -> str:
|
|
125
|
-
match = re.search(r"/(
|
|
125
|
+
match = re.search(r"/[a-f0-9]{32}/(.*)/([^/!]+)(?:!.*)?", img_url)
|
|
126
126
|
if match:
|
|
127
127
|
return f"{match.group(1)}/{match.group(2)}"
|
|
128
128
|
|
|
@@ -169,7 +169,7 @@ class XHSPost:
|
|
|
169
169
|
if __name__ == "__main__":
|
|
170
170
|
|
|
171
171
|
async def main() -> None:
|
|
172
|
-
url = "
|
|
172
|
+
url = ""
|
|
173
173
|
xhs = XHSAPI()
|
|
174
174
|
print(await xhs.extract(url))
|
|
175
175
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: parsehub
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.2
|
|
4
4
|
Summary: 轻量、异步、开箱即用的社交媒体聚合解析库
|
|
5
5
|
Author-email: 梓澪 <zilingmio@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -310,6 +310,21 @@ except ParseError as exc:
|
|
|
310
310
|
|
|
311
311
|
---
|
|
312
312
|
|
|
313
|
+
## 🤝 参与贡献
|
|
314
|
+
|
|
315
|
+
欢迎提交 Pull Request 或 Issue!
|
|
316
|
+
|
|
317
|
+
- Bug 反馈请附上相关 URL 和日志信息
|
|
318
|
+
|
|
319
|
+
### 开发规范
|
|
320
|
+
|
|
321
|
+
提交代码前请至少执行:
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
ruff format && ruff check --fix && uv run mypy
|
|
325
|
+
uv run pytest
|
|
326
|
+
```
|
|
327
|
+
|
|
313
328
|
## 🤝 参考项目
|
|
314
329
|
|
|
315
330
|
- [Evil0ctal/Douyin_TikTok_Download_API](https://github.com/Evil0ctal/Douyin_TikTok_Download_API)
|
|
@@ -321,7 +336,7 @@ except ParseError as exc:
|
|
|
321
336
|
|
|
322
337
|
## 📜 开源协议
|
|
323
338
|
|
|
324
|
-
本项目基于 [MIT License](LICENSE)
|
|
339
|
+
本项目基于 [MIT License](LICENSE) 开源
|
|
325
340
|
|
|
326
341
|
---
|
|
327
342
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|