用于抓取google scholar的python库。
google-scholar-scraper的Python项目详细描述
版本0.2适用于python3。
安装
$ pip install google-scholar-scraper
命令行用法
$ gsscraper "neeman grothendieck duality"
将以xml格式返回与此查询匹配的google scholar的第一个结果 格式。
$ gsscraper "neeman grothendieck duality" -n 5
将返回与此查询匹配的来自google scholar的五个结果。(最大值为 10个结果。)
库使用
importgsscraperquery="neeman grothendieck duality"gsscraper.get_result(query)# (a)gsscraper.get_results(query,5)# (b)gsscraper.get_result_as_xml(query)# (c)
这里,
- will return a Python dict with keys “title”, “author”, etc.;
- will return a list of such Python dicts;
- will return a list of strings in XML format.
许可证
平均绩点