Git Product home page Git Product logo

Comments (8)

ReaJason avatar ReaJason commented on July 30, 2024

麻烦去请求里面拿 cookie,我刚试了 document.cookie 是拿不到登录的那个 sessionId 的。

image

from xhs.

ianho7 avatar ianho7 commented on July 30, 2024

麻烦去请求里面拿 cookie,我刚试了 document.cookie 是拿不到登录的那个 sessionId 的。

image

可以了,感谢!

from xhs.

ianho7 avatar ianho7 commented on July 30, 2024

@ReaJason 对了,请问目前有方法可以获取到笔记的浏览量/阅读数吗?

from xhs.

ReaJason avatar ReaJason commented on July 30, 2024

@ReaJason 对了,请问目前有方法可以获取到笔记的浏览量/阅读数吗?

小红书创作服务平台 这个上面能获取自己的,别人的没办法

from xhs.

ianho7 avatar ianho7 commented on July 30, 2024

@ReaJason 对了,请问目前有方法可以获取到笔记的浏览量/阅读数吗?

小红书创作服务平台 这个上面能获取自己的,别人的没办法

好的,谢谢

from xhs.

MoncozGC avatar MoncozGC commented on July 30, 2024

麻烦去请求里面拿 cookie,我刚试了 document.cookie 是拿不到登录的那个 sessionId 的。

image

请问一下,我是根据这个接口获取的cookie,但是在请求的时候会报错。
可以指导下嘛

代码:

xhs_client = XhsClient(cookie)

# 获取笔记内容
text = xhs_client.get_note_by_id("643b522c00000000130331c5")
print(text)

cookie截图
image

报错信息:
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.

ReaJason avatar ReaJason commented on July 30, 2024

请问一下,我是根据这个接口获取的cookie,但是在请求的时候会报错。 可以指导下嘛

代码:

xhs_client = XhsClient(cookie)

# 获取笔记内容
text = xhs_client.get_note_by_id("643b522c00000000130331c5")
print(text)

cookie截图 image

报错信息: 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.

MoncozGC avatar MoncozGC commented on July 30, 2024

你这种情况应该是网络问题,请尝试直接访问网页端看能否访问,或者电脑代理,把代理给关掉

确实是代理的问题,关闭代理就好了,不知道为什么网页端可以访问但是执行代码就会报错。
感谢~

from xhs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.