wget给出'ERROR 403:Forbidden'的替代方案

bio*_*ech 4 wget text-mining web-scraping

我正在尝试使用wget从多个Pubmed论文中获取文本,但似乎NCBI网站不允许这样做.任何替代品?

Bernardos-MacBook-Pro:pangenome_papers_pubmed_result bernardo$ wget -i ./url.txt
--2016-05-04 10:49:34--  http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4560400/
Resolving www.ncbi.nlm.nih.gov... 130.14.29.110, 2607:f220:41e:4290::110
Connecting to www.ncbi.nlm.nih.gov|130.14.29.110|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
2016-05-04 10:49:34 ERROR 403: Forbidden.

--2016-05-04 10:49:34--  http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4547177/
Reusing existing connection to www.ncbi.nlm.nih.gov:80.
HTTP request sent, awaiting response... 403 Forbidden
2016-05-04 10:49:34 ERROR 403: Forbidden.
Run Code Online (Sandbox Code Playgroud)

Fii*_*iil 10

像这样设置自定义用户代理:

wget --user-agent="Mozilla" http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4560400/
Run Code Online (Sandbox Code Playgroud)