下拉刷新
项目详情
navbar_avatar分享
repo_avatar
HelloGitHub 评分
0 人评分
基于 asyncio 和 aiohttp 的 Python3 异步爬虫框架
开源Apache-2.0
认领
收藏
分享
1.8k
星数
中文
Python
主语言
活跃
13
贡献者
9
Issues
组织
0.8.0
最新版本
184
Forks
Apache-2.0
协议
更多
ruia image
基于 asyncio 和 aiohttp 的 Python3 异步爬虫框架。它具有容易上手、非阻塞、扩展性强等特点,实例代码: ```python from ruia import TextField, Item, Spider class HackerNewsItem(Item): target_item = TextField(css_select='tr.athing') title = TextField(css_select='a.storylink') class HackerNewsSpider(Spider): start_urls = ['https://news.ycombinator.com/news?p=1'] async def parse(self, response): async for item in HackerNewsItem.get_items(html=response.html): yield item if __name__ == '__main__': HackerNewsSpider.start() ```
收录于:
第 35 期

评论

评分:
暂无精选评论