ダウンロードする必要がある学術論文のタイトルのリストがあります。Web から 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 - Download the PDF from the journal webpage and save in your computer
for (i in titles){
journal_URL <- query i in google (scholar)
download.file (url = journal_URL, pattern = "pdf",
destfile=paste0(i,".pdf")
}
合併症:
ループ ステップ 1 - Google Scholar の最初のヒットは、論文の元の URL である必要があります。ただし、Google Scholar はボットに少しうるさいと聞いたので、別の方法として、Google にクエリを実行して最初の URL を取得することもできます (正しい URL が返されることを願っています)。
ループ step2 - 一部の論文はゲートされているため、認証情報 (user=__ , passwd=__) を含める必要があると思います。しかし、大学のネットワークを使用している場合、この認証は自動的に行われるはずですよね?
ps。PDFをダウンロードするだけです。文献情報 (引用レコード、h-index など) を取得することに興味はありません。計量書誌データを取得するためのガイダンスがここ (R ユーザー)とここ (python ユーザー)にあります。