dimtown-spider
⭐基于httpx的为次元小镇的异步爬虫⭐
⭐ 介绍
- 本项目采用
Apache License 2.0开源协议。在使用这个项目之前,请确保你已经仔细阅读并理解了协议的相关条款。本项目严禁用于任何商业用途,并且只能用于学习和研究。如果在使用本项目的过程中产生任何问题或结果,我们不承担任何责任。同时,我们鼓励用户为这个项目的改进和发展提供反馈和建议。
🦈 安装
安装
- pip 安装
pip install dimtown-spider -U
- poetry 安装
poetry add dimtown-spider
- pdm 安装
pdm add dimtown-spider
- 手动安装
git clone https://github.com/Cvandia/dimtown-spider.git
🐟 使用
可见以下示例:
# 测试程序
from dimtown import Cosplay
import asyncio
# keyword = input("请输入关键词:\n")
# sc = Search(keyword)
cs = Cosplay()
async def main():
# 获取文章链接列表
list_ = await cs.get_article_urls()
print(f"文章链接列表:{list_[0:5]}")
# 获取图片链接
img_list = await cs.get_img_url(list_[0])
print(f"图片链接:{img_list[0:5]}")
# articles = await cs.get_articles(page=1)
# for article in articles:
# print(article.title)
# print(article.url)
# print(article.img_urls)
# print("#" * 50)
asyncio.run(main())
🐖 注意事项
- 别爬太多
- 适度使用
- 健康生活
鸣谢
httpx ->一款同步异步兼容的网络请求库
Metadata
Release files for dimtown-spider 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dimtown_spider-0.1.2.tar.gz | 8.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dimtown_spider-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.9 kB
Release files / dimtown_spider-0.1.2.tar.gz
| Download URL | dimtown_spider-0.1.2.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96608544dd665c3d8b90a5d2f394dfe7a90ea03d8ba70bcbe1f7610704533e67
|
|
BLAKE2b-256 checksum How to use checksums |
4e23d9e57fb6b6e4fead1df3886b529245eefac6d6b8802c645a225b256ead4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.20.0.post1 CPython/3.10.9 Windows/10
|
Release files / dimtown_spider-0.1.2-py3-none-any.whl
| Download URL | dimtown_spider-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8920fd1d779df524db33fd2ac0e966fb5faad827419b8ec815ff9ef7f3e5d61
|
|
BLAKE2b-256 checksum How to use checksums |
7bbe2e8a6f5e8d10ecfa9e1cf37917bde4394342bcc4f42b4b6bb4813730475e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.20.0.post1 CPython/3.10.9 Windows/10
|