Git Product home page Git Product logo

Comments (6)

furuiyang0715 avatar furuiyang0715 commented on July 30, 2024

我尝试过
(1) 在后端做一个 session_id: playwright 的映射, 但是由于 playwright 的内部机制,导致全局只能实例化一次(https://crifan.github.io/web_automation_tool_playwright/website/issues_summary/sync_inside_asyncio.html)
(2) 用 selenium 代替 playwright 的作用
(3) 每请求一次就重启一次 flask

目前我紧急使用的是第三种办法。想请教下第(2) 种办法是否可替换。

from xhs.

ReaJason avatar ReaJason commented on July 30, 2024

管理多个账号时建议以下两个操作:

  1. 由于其实只有 a1 参与到签名中,你可以手动将所有的 cookie 设置为同一个 a1 值应该是都可以正确签名的
  2. 建议修改签名函数,就不要传 web_session cookie 字段到浏览器了,防止浏览器由于频繁切换会话可能会导致容易出现验证码。

from xhs.

furuiyang0715 avatar furuiyang0715 commented on July 30, 2024

可以的,太感谢了!

from xhs.

leylatop avatar leylatop commented on July 30, 2024

使用 Flask 签名的流程,是这样的吗?

  1. 跑docker 服务:docker run -it -d -p 5005:5005 reajason/xhs-api:latest
  2. 跑server.py:py example/basic_sign_server.py,会log出一个a1的值;
  3. 将a1值替换usage 的cookie中的a1,然后跑usage:py example/basic_sign_usage.py

from xhs.

leylatop avatar leylatop commented on July 30, 2024

使用 Flask 签名的流程,是这样的吗?

  1. 跑docker 服务:docker run -it -d -p 5005:5005 reajason/xhs-api:latest
  2. 跑server.py:py example/basic_sign_server.py,会log出一个a1的值;
  3. 将a1值替换usage 的cookie中的a1,然后跑usage:py example/basic_sign_usage.py
    这是我的报错信息,哪位可以帮忙解答一下?
    image

from xhs.

hjhjhghghg avatar hjhjhghghg commented on July 30, 2024

使用 Flask 签名的流程,是这样的吗?

  1. 跑docker 服务:docker run -it -d -p 5005:5005 reajason/xhs-api:latest
  2. 跑server.py:py example/basic_sign_server.py,会log出一个a1的值;
  3. 将a1值替换usage 的cookie中的a1,然后跑usage:py example/basic_sign_usage.py
    这是我的报错信息,哪位可以帮忙解答一下?
    image

你是不是把小红书前端的cookie和创作者的cookie搞混了

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.