521xueweihan / HelloGitHub

:octocat: 分享 GitHub 上有趣、入门级的开源项目。Share interesting, entry-level open source projects on GitHub.
https://hellogithub.com
92.88k stars 9.63k forks source link

自荐项目 - Python异步爬虫框架Ruia #429

Closed howie6879 closed 5 years ago

howie6879 commented 5 years ago

项目推荐

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)
521xueweihan commented 5 years ago

您推荐的项目,已成功发布HelloGitHub 第 35 期,并把您添加到了贡献者列表中。

欢迎继续推荐如此优秀的项目、告诉其他小伙伴加入到 HelloGitHub 项目中。谢谢 🙏