这似乎是一个愚蠢的问题,但是我一直在寻找这个问题很长时间,但没有发现任何帮助。我想下载给定论文中引用的所有论文。Google学术搜索中有这样的功能吗?甚至只是列出所有引用的论文链接的页面?
我正在使用scholarlypython 中的模块来搜索关键字。我正在返回一个生成器对象,如下所示:
import pandas as pd
import numpy as np
import scholarly
search_query = scholarly.search_keyword('Python')
print(next(search_query))
{'_filled': False,
'affiliation': 'Juelich Center for Neutron Science',
'citedby': 75900,
'email': '@fz-juelich.de',
'id': 'zWxqzzAAAAAJ',
'interests': ['Physics', 'C++', 'Python'],
'name': 'Gennady Pospelov',
'url_picture': 'https://scholar.google.com/citations?view_op=medium_photo&user=zWxqzzAAAAAJ'}
Run Code Online (Sandbox Code Playgroud)
我想访问元素“citedby”,但是当我尝试next(search_query)['citedby']这样做时,它会返回TypeError: 'Author' object is not subscriptable.
我的问题是如何访问生成器对象中的元素?以及如何将该对象转换为 Pandas 数据框?
如何使用Mathematica和Google学者查找2011年发布的论文数量?
在Google学术搜索中进行典型的关键字搜索(请参见屏幕截图)后,我想获得一个字典,其中包含出现在页面上的每个出版物的标题和网址(例如results = {'title': 'Cytosolic calcium regulates ion channels in the plasma membrane of Vicia faba guard cells', 'url': 'https://www.nature.com/articles/338427a0'}。
要从Google学术搜索检索结果页面,我使用以下代码:
from urllib import FancyURLopener, quote_plus
from bs4 import BeautifulSoup
class AppURLOpener(FancyURLopener):
version = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36'
openurl = AppURLOpener().open
query = "Vicia faba"
url = 'https://scholar.google.com/scholar?q=' + quote_plus(query) + '&ie=UTF-8&oe=UTF-8&hl=en&btnG=Search'
#print url
content = openurl(url).read()
page = BeautifulSoup(content, 'lxml')
print page
Run Code Online (Sandbox Code Playgroud)
此代码以(非常难看的)HTML格式正确返回结果页面。但是,由于无法确定如何使用BeautifulSoup(我不太熟悉)来解析结果页面并检索数据,因此我无法继续前进。
请注意,问题在于解析和从结果页面提取数据,而不是Google Scholar本身,因为上面的代码可以正确检索结果页面。 …
我有一份我需要下载的学术论文标题清单.我想写一个循环来从网上下载他们的PDF文件,但找不到办法.
以下是我到目前为止所考虑的一步一步(答案是欢迎使用R或Python):
# Create list with paper titles (example with 4 papers from different journals)
titles <- c("Effect of interfacial properties on polymer–nanocrystal thermoelectric transport",
"Reducing social and environmental impacts of urban freight transport: A review of some major cities",
"Using Lorenz curves to assess public transport equity",
"Green infrastructure: The effects of urban rail transit on air quality")
#Loop step1 - Query paper title in Google Scholar to get URL of journal webpage containing the paper
#Loop step2 - …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 BeautifulSoup 从 Google 学者的作者那里获取所有出版物的完整作者列表。由于作者的主页只有每篇论文的截断作者列表,我必须打开论文的链接才能获得完整的列表。结果,我每隔几次尝试就会遇到 CAPTCHA。
有没有办法避免验证码(例如,每次请求后暂停 3 秒)?或者制作原始的 Google Scholar 个人资料页面以显示完整的作者列表?
我对R包学者有疑问
什么有效:
get_citation_history(SSalzberg)
Run Code Online (Sandbox Code Playgroud)
什么不:
get_article_cite_history(SSalzberg, "any article")
Run Code Online (Sandbox Code Playgroud)
代码:
article <- "Ultrafast and memory-efficient alignment of short DNA sequences to the human genome"
SSalzberg <- "sUVeH-4AAAAJ" (Google Scholar ID)
get_article_cite_history(SSalzberg, article)
Run Code Online (Sandbox Code Playgroud)
错误信息:
Error in min(years):max(years) : result would be too long a vector
In addition: Warning messages:
1: In min(years) : no non-missing arguments to min; returning Inf
2: In max(years) : no non-missing arguments to max; returning -Inf
Run Code Online (Sandbox Code Playgroud)
我不理解该函数上下文中的错误消息,我尝试了另一篇文章与另一位作者没有成功.我不知道我在这里失踪了什么....谢谢