在 python3 中从 Pubmed 下载 pdf 时出错

发布于 2025-01-15 22:03:52 字数 241 浏览 4 评论 0原文

我试图使用 fetch pdf 从 python 中下载 PubMed pdf 代码

mkr5="18368049"
os.system('python3 fetch_pdfs.py -pmids$mkr5')

这是我收到此错误的

fetch_pdfs.py: error: argument -pmids: expected one argument

I ma trying to download PubMed pdf from within python using fetch pdf
here is the code

mkr5="18368049"
os.system('python3 fetch_pdfs.py -pmids$mkr5')

I get this error

fetch_pdfs.py: error: argument -pmids: expected one argument

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

悲喜皆因你 2025-01-22 22:03:52

假设您想使用 mkr5 中的值作为 -pmids 的参数,您可以使用 f 字符串:

mkr5="18368049"
os.system(f'python3 fetch_pdfs.py -pmids {mkr5}')

Assuming you want to use the value in mkr5 as the argument for -pmids, you could use an f-string:

mkr5="18368049"
os.system(f'python3 fetch_pdfs.py -pmids {mkr5}')
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文