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

你好,为什么点击爬取一点动静没有,是不是cokkie设置有问题,而且怎么停止爬取呢 #5

Open
lushan1314 opened this issue Jan 7, 2023 · 4 comments

Comments

@lushan1314
Copy link

如题

@lushan1314
Copy link
Author

cache-control: no-cache, private
content-encoding: gzip
content-type: text/html; charset=UTF-8
date: Sat, 07 Jan 2023 23:07:06 GMT
server: nginx
set-cookie: XSRF-TOKEN=eyJpdiI6InU1RWgzYnB4a2ZDOFBtQXhOdzh4SUE9PSIsInZhbHVlIjoiZVM4eGJPK3JpNzNVMVF1amVtbzcwYVJ1bnNOSFR2TytLZnhLNlBQWnJOT1VNUnBiN0RSaTFwZWRxblVKTnl6SVhYcnh3Ymc5MC96cXBqOXB4Z2RVSHE4NXQrWnZPZ2lWbkZrcDVwTE50REVabzN3QnJpRy9LVVY4WTVablA0OUwiLCJtYWMiOiJhMWNmN2E4YjM5MGYzMmM1YzE1NzI4MzFmZDUxMzViMDY1ZmYyMDUyMGJmMzIwZDE4ZWZiODFjZWRkNmMzMDBkIiwidGFnIjoiIn0%3D; expires=Sun, 08-Jan-2023 01:07:06 GMT; Max-Age=7200; path=/; samesite=lax
set-cookie: laravel_session=eyJpdiI6ImFsdVBFL1hSSEtDU0Rya1Bqdklzbnc9PSIsInZhbHVlIjoiNUk1SUptMHRqYnNjZVZqOUN0NGx4cncyOUdjSVBGZlVQTnJncmRMTXQrSFBVeWZkVnNkVk9IeUVVRW5OSm1wZ29VRjhkNVB6U3c2VmxoellIUnRKRklRazlBcWFWNlphc1RXVG5SMVZLck15RVZnRXFrYWwxdEhuQ3JWbW5SUEMiLCJtYWMiOiJjYWNjZDk5NTBlOThkZjIzMjM4YzQ0ODc5NTE0MzAxZmQyMThiZTAxYjNlNDkyNjRlNTgxYWVkMDUxYTkwOTFiIiwidGFnIjoiIn0%3D; expires=Sun, 08-Jan-2023 01:07:06 GMT; Max-Age=7200; path=/; httponly; samesite=lax
strict-transport-security: max-age=31536000

大佬你好,请问上面的cokkie我应该如何添加?说明上是写着;分开,但是每个cookie有好几个参数,是必须要加上

expires=Sun, 08-Jan-2023 01:07:06 GMT; Max-Age=7200; path=/; httponly; samesite=lax

这一段么?

另外,网站是https的

@lushan1314
Copy link
Author

如果不加cookie,会报一堆如下的错误

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested targe

@lushan1314
Copy link
Author

三个文件夹啥也没有,空空如也。wget命令倒是能爬取一些东西

@xnx3
Copy link
Owner

xnx3 commented Jan 17, 2023

有的是时间路径等,你只需将name、以及值写上即可,比如
XSRF-TOKEN=eyJpdiI6InU1RWgzYnB4a2ZDOFBtQXhOdzh4SUE9PSIsInZhbHVlIjoiZVM4eGJPK3JpNzNVMVF1amVtbzcwYVJ1bnNOSFR2TytLZnhLNlBQWnJOT1VNUnBiN0RSaTFwZWRxblVKTnl6SVhYcnh3Ymc5MC96cXBqOXB4Z2RVSHE4NXQrWnZPZ2lWbkZrcDVwTE50REVabzN3QnJpRy9LVVY4WTVablA0OUwiLCJtYWMiOiJhMWNmN2E4YjM5MGYzMmM1YzE1NzI4MzFmZDUxMzViMDY1ZmYyMDUyMGJmMzIwZDE4ZWZiODFjZWRkNmMzMDBkIiwidGFnIjoiIn0%3D;laravel_session=eyJpdiI6ImFsdVBFL1hSSEtDU0Rya1Bqdklzbnc9PSIsInZhbHVlIjoiNUk1SUptMHRqYnNjZVZqOUN0NGx4cncyOUdjSVBGZlVQTnJncmRMTXQrSFBVeWZkVnNkVk9IeUVVRW5OSm1wZ29VRjhkNVB6U3c2VmxoellIUnRKRklRazlBcWFWNlphc1RXVG5SMVZLck15RVZnRXFrYWwxdEhuQ3JWbW5SUEMiLCJtYWMiOiJjYWNjZDk5NTBlOThkZjIzMjM4YzQ0ODc5NTE0MzAxZmQyMThiZTAxYjNlNDkyNjRlNTgxYWVkMDUxYTkwOTFiIiwidGFnIjoiIn0%3D;

至于后面的path、expire的不用管,忽略它就好

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