Closed howie6879 closed 5 years ago
项目名称:Ruia
项目地址:https://github.com/howie6879/ruia
项目后续更新计划:
项目描述: Python轻量异步爬虫框架,An async web scraping micro-framework based on asyncio.
推荐理由:
示例代码:
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()
- 截图: ![image](https://user-images.githubusercontent.com/17047388/51813206-1917db00-22f0-11e9-978f-84dfb5b73cde.png)
您推荐的项目,已成功发布在 HelloGitHub 第 35 期,并把您添加到了贡献者列表中。
欢迎继续推荐如此优秀的项目、告诉其他小伙伴加入到 HelloGitHub 项目中。谢谢 🙏
项目推荐
项目名称:Ruia
项目地址:https://github.com/howie6879/ruia
项目后续更新计划:
项目描述: Python轻量异步爬虫框架,An async web scraping micro-framework based on asyncio.
推荐理由:
示例代码:
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']
if name == 'main': HackerNewsSpider.start()