Comments (8)
麻烦去请求里面拿 cookie,我刚试了 document.cookie 是拿不到登录的那个 sessionId 的。
from xhs.
麻烦去请求里面拿 cookie,我刚试了 document.cookie 是拿不到登录的那个 sessionId 的。
可以了,感谢!
from xhs.
@ReaJason 对了,请问目前有方法可以获取到笔记的浏览量/阅读数吗?
from xhs.
@ReaJason 对了,请问目前有方法可以获取到笔记的浏览量/阅读数吗?
小红书创作服务平台 这个上面能获取自己的,别人的没办法
from xhs.
@ReaJason 对了,请问目前有方法可以获取到笔记的浏览量/阅读数吗?
小红书创作服务平台 这个上面能获取自己的,别人的没办法
好的,谢谢
from xhs.
麻烦去请求里面拿 cookie,我刚试了 document.cookie 是拿不到登录的那个 sessionId 的。
请问一下,我是根据这个接口获取的cookie,但是在请求的时候会报错。
可以指导下嘛
代码:
xhs_client = XhsClient(cookie)
# 获取笔记内容
text = xhs_client.get_note_by_id("643b522c00000000130331c5")
print(text)
报错信息:
requests.exceptions.SSLError: HTTPSConnectionPool(host='edith.xiaohongshu.com', port=443): Max retries exceeded with url: /api/sns/web/v1/feed (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)')))
from xhs.
请问一下,我是根据这个接口获取的cookie,但是在请求的时候会报错。 可以指导下嘛
代码:
xhs_client = XhsClient(cookie) # 获取笔记内容 text = xhs_client.get_note_by_id("643b522c00000000130331c5") print(text)报错信息: requests.exceptions.SSLError: HTTPSConnectionPool(host='edith.xiaohongshu.com', port=443): Max retries exceeded with url: /api/sns/web/v1/feed (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)')))
你这种情况应该是网络问题,请尝试直接访问网页端看能否访问,或者电脑代理,把代理给关掉
from xhs.
你这种情况应该是网络问题,请尝试直接访问网页端看能否访问,或者电脑代理,把代理给关掉
确实是代理的问题,关闭代理就好了,不知道为什么网页端可以访问但是执行代码就会报错。
感谢~
from xhs.
Related Issues (20)
- 出现requests.exceptions.ConnectionError HOT 2
- 笔记发布接口提示TypeError
- 请求发布图片笔记接口报406 HOT 1
- ubuntu22.04版本的openssl3.0出现这个问题
- get_note_by_id 返回461错误 HOT 1
- 获取话题的发布问题 HOT 2
- [get_note_by_id] 现在总是 return {} HOT 14
- report_note_metrics方法时好时坏 HOT 1
- 获取笔记评论 提示 超时 HOT 3
- 有获取创作者cookie的api吗 HOT 3
- 可以支持回复私信的功能吗? HOT 6
- 为什么这里可以不传 a1 参数 HOT 1
- xhs 发布图文提示“技术升级中”,请教这是什么原因导致的呢?
- 刚注册的新号,调用二维码接口获取到二维码之后,手机上扫码成功,但是获取二维码扫描状态的接口 返回 461 或者 471 ,怎么解决。。。
- 赞 成功了,对面收不到,这种这么办?
- 拉不了吗
- 是验证码。就是那个横着滑动的。edith.xiaohongshu.com/api/redcaptcha/v2/captcha/register 申请2张图,提交一个角度和触摸轨迹,就能继续了。验证码挺简单的,github上有开源的代码。
- 获取主页推荐 报错 HOT 1
- 调用 xhs_client.activate() 方法报错, 返回 code = -1 应该是加密错误 但是使用 pip install xhs 下载下来的包 调用 xhs_client.activate() 返回正常
- Ubuntu环境下运行basic_usage.py卡在context.new_page()的环节
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xhs.