Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookies Issue #489

Closed
rjenk22 opened this issue May 10, 2022 · 2 comments
Closed

Cookies Issue #489

rjenk22 opened this issue May 10, 2022 · 2 comments

Comments

@rjenk22
Copy link

rjenk22 commented May 10, 2022

Hello,

i am trying to use node-website-scraper with your puppeteer plugin to scrape dynamic web applications, and using cookies for login.

If I have 6 cookies like this:
https://i.imgur.com/QTQl9Jx.png
Do I need to set 'Set-Cookie' six times? Because I am trying to set cookies to log into a site then scrape it, however the scraped output keeps outputting the login page.

Or is there a way to convert puppeteer json cookies to cookies I can set here? I can use puppeteer on its own and login to site and dump my cookies, and then use the cookies to see the page but I only get a single html file with puppeteer on its own, no css or js like your node-website-scraper so I want to use your program to clone the app as your program correctly clones it with all styling.

@s0ph1e
Copy link
Member

s0ph1e commented May 16, 2022

Hi @Christian-Martinez1

I think you may need to use cookie header instead of set-cookie, please check my comment.

Hope it helps

@rjenk22
Copy link
Author

rjenk22 commented May 16, 2022

Hi @Christian-Martinez1

I think you may need to use cookie header instead of set-cookie, please check my comment.

Hope it helps

Thank you for your reply Sophie! :) I believe I used both headers at the same time in case it was either one that was correct and it still didn't work, but I will try using just cookie. Thank you again!

Best,

Chris

@s0ph1e s0ph1e closed this as completed Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants