谷歌学者作者和引文的简单访问

scholarl的Python项目详细描述


学术

scholarly是一个模块,它允许您以友好的pythonic方式从Google Scholar检索作者和出版物信息。

用法

因为scholarly不使用官方api,所以不需要密钥。简单:

importscholarlyprint(next(scholarly.search_author('Steven A. Cholewiak')))

方法

  • search_author——按名称搜索作者并返回author对象的生成器。
>>>search_query=scholarly.search_author('Marty Banks, Berkeley')>>>print(next(search_query)){'_filled':False,'affiliation':'Professor of Vision Science, UC Berkeley','citedby':17758,'email':'@berkeley.edu','id':'Smr99uEAAAAJ','interests':['vision science','psychology','human factors','neuroscience'],'name':'Martin Banks','url_picture':'https://scholar.google.com/citations?view_op=medium_photo&user=Smr99uEAAAAJ'}
  • search_keyword——按关键字搜索并返回author对象的生成器。
>>>search_query=scholarly.search_keyword('Haptics')>>>print(next(search_query)){'_filled':False,'affiliation':'Stanford University','citedby':31731,'email':'@cs.stanford.edu','id':'4arkOLcAAAAJ','interests':['Robotics','Haptics','Human Motion Understanding'],'name':'Oussama Khatib','url_picture':'https://scholar.google.com/citations?view_op=medium_photo&user=4arkOLcAAAAJ'}
  • search_pubs_query——搜索文章/出版物和出版物对象的返回生成器。
>>>search_query=scholarly.search_pubs_query('Perception of physical stability and center of mass of 3D objects')>>>print(next(search_query)){'_filled':False,'bib':{'abstract':'Humans can judge from vision alone whether an object is ''physically stable or not. Such judgments allow observers ''to predict the physical behavior of objects, and hence ''to guide their motor actions. We investigated the visual ''estimation of physical stability of 3-D objects (shown ''in stereoscopically viewed rendered scenes) and how it ''relates to visual estimates of their center of mass ''(COM). In Experiment 1, observers viewed an object near ''the edge of a table and adjusted its tilt to the ''perceived critical angle, ie, the tilt angle at which ''the object …','author':'SA Cholewiak and RW Fleming and M Singh','eprint':'http://jov.arvojournals.org/article.aspx?articleid=2213254','title':'Perception of physical stability and center of mass of 3-D ''objects','url':'http://jov.arvojournals.org/article.aspx?articleid=2213254'},'citedby':14,'id_scholarcitedby':'15736880631888070187','source':'scholar','url_scholarbib':'https://scholar.googleusercontent.com/scholar.bib?q=info:K8ZpoI6hZNoJ:scholar.google.com/&output=citation&scisig=AAGBfm0AAAAAXGSbUf67ybEFA3NEyJzRusXRbR441api&scisf=4&ct=citation&cd=0&hl=en'}

示例

下面是一个简单的例子,演示如何检索作者的个人资料,然后检索引用他最受欢迎(被引用)论文的标题。

# Retrieve the author's data, fill-in, and printsearch_query=scholarly.search_author('Steven A Cholewiak')author=next(search_query).fill()print(author)# Print the titles of the author's publicationsprint([pub.bib['title']forpubinauthor.publications])# Take a closer look at the first publicationpub=author.publications[0].fill()print(pub)# Which papers cited that publication?print([citation.bib['title']forcitationinpub.get_citedby()])

安装

使用pip从pypi安装:

pip install scholarly

或者pip从github安装:

pip install git+https://github.com/OrganicIrradiation/scholarly.git

或者使用git克隆包:

git clone https://github.com/OrganicIrradiation/scholarly.git

要求

需要arrowBeautiful Soupbibtexparserrequests[security]

许可证

这个项目的原始代码是由Bello Chalmers根据WTFPL许可证发布的。按照这种思路,所有代码都在Unlicense下发布。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
命令行参数的java ArrayIndexOutOfBoundsException   java令牌构造不正确   在emacs中更改javamode的缩进样式   如果FileInputStream未关闭,java应用程序将崩溃?   java在listview中显示图像:应用程序可能在其主线程上做了太多工作   Commons Lang中的java数值验证   Java小程序未在HTML中显示   Eclipse Java版本设置不正确   AWS JVM CPU限制上的java Docker   如何通过java graphics 2d将图片剪切成圆形?我希望结果与objectfit类似:css中的cover   java Strut2验证,覆盖css_xhtml主题   JMS发布者/订阅者模型中的java并发使用者   java无堆栈信息V(未知源)   java如何在JSON数组中拥有与JSON响应相同的顺序?