Skip to content

写了个简单路由,把开发机的Cookie发布到自建docker服务器后,无法登录了 #8996

Answered by shawn8888
shawn8888 asked this question in Q&A
Discussion options

You must be logged in to vote

OK,解决了!
问题还是出在useragent上。不知道为什么,RSSHub没有设置 Puppeteer 的useragent
手动添加的方法是:

            const page = await browser.newPage();
            await page.setUserAgent('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36');            

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TonyRL
Comment options

TonyRL Feb 5, 2022
Collaborator

Answer selected by shawn8888
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants