问题
I would like to automate printing a number of URLs. Headless Chrome works beautifully here ...
chrome --headless --disable-gpu --print-to-pdf="C:\tmp\test.pdf" https://time.com/
Except that the real site I want to run this on requires authentication. I was hoping that headless Chrome would share cookies with Chrome and therefore all will be hunky-dory. But I am wrong. The print indicates that JavaScript are cookies are disabled, so I can't print what I want.
Appreciate if someone could help me solve this! Many thanks in advance!!
来源:https://stackoverflow.com/questions/62602327/headless-chrome-sharing-credentials