A spider
Project description
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 ->一款同步异步兼容的网络请求库
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dimtown_spider-0.1.2.tar.gz
(8.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dimtown_spider-0.1.2.tar.gz.
File metadata
- Download URL: dimtown_spider-0.1.2.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.20.0.post1 CPython/3.10.9 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96608544dd665c3d8b90a5d2f394dfe7a90ea03d8ba70bcbe1f7610704533e67
|
|
| MD5 |
423156768103a3d2ddbc2c269d2cdc22
|
|
| BLAKE2b-256 |
4e23d9e57fb6b6e4fead1df3886b529245eefac6d6b8802c645a225b256ead4c
|
File details
Details for the file dimtown_spider-0.1.2-py3-none-any.whl.
File metadata
- Download URL: dimtown_spider-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.20.0.post1 CPython/3.10.9 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8920fd1d779df524db33fd2ac0e966fb5faad827419b8ec815ff9ef7f3e5d61
|
|
| MD5 |
29322e3e7c0b5128bee44605e30bd2d7
|
|
| BLAKE2b-256 |
7bbe2e8a6f5e8d10ecfa9e1cf37917bde4394342bcc4f42b4b6bb4813730475e
|