使用chrome从url获取pdf
chrome-printtopdf的Python项目详细描述
#chrome-chrome-printtoppdf
<需要python 3.5+
pip安装chrome-printtoppdf
是的。查看“asyncio”api的源代码。
``python
from chrome_printtopdf import get_pdf_chrome_sync
pdf file=get_pdf_chrome_sync('http://example.org',
chrome_binary='/path/to/chrome bin')
with open('example.org.pdf','wb')作为f:
f.write(pdf_file.read())
```
<需要python 3.5+
pip安装chrome-printtoppdf
是的。查看“asyncio”api的源代码。
``python
from chrome_printtopdf import get_pdf_chrome_sync
pdf file=get_pdf_chrome_sync('http://example.org',
chrome_binary='/path/to/chrome bin')
with open('example.org.pdf','wb')作为f:
f.write(pdf_file.read())
```