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

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使用Eclipse Helios for Web项目   java指定行。作为编译器设置的分隔符?   osm映射中带有osmdroid的java标记   java Android ClassNotFoundException在路径:DexPathList上未找到类   java从j2me调用GWT方法   更新到java 8后的aspectj问题   如何仅从根元素java,com提取文本内容。滴虫软件。是的。html   安卓公司。谷歌。火基。数据库DatabaseException:未能转换java类型的值。将字符串改为长字符串   从java中的方法返回arraylist变量   java如果将引用重新分配给同步块内的锁对象,会是什么?   java下载。使用spring mvc的资源文件中的xlsx文件   java Eclipse提供了什么工具来运行Eclipse中未包含的程序?   spring boot Java泛型如何读取传递给泛型方法的类型上的字段或调用方法   Javacard中的javaecdsa签名