Coder Social home page Coder Social logo

Comments (9)

J3n5en avatar J3n5en commented on June 9, 2024

我这边还没出现这种情况.你可以检查一下新浪是否登录成功了,或者把cookie.json这个文件删了重新登录试试

from sinapichostingapi.

shirakun avatar shirakun commented on June 9, 2024

会不会是登录需要验证码的问题啊

from sinapichostingapi.

shirakun avatar shirakun commented on June 9, 2024

检查了cooki.json是空的,然后我微博账户新注册的,登录需要验证码,应该是验证码的问题了

from sinapichostingapi.

shirakun avatar shirakun commented on June 9, 2024

cookie.json里存的是标准的json吗,我用php把cookie序列化之后保存进去启动的时候直接报错诶

from sinapichostingapi.

J3n5en avatar J3n5en commented on June 9, 2024

提供一个临时的解决方案
同目录下创建一个string2jar.js

const tough = require('tough-cookie')
const FileCookieStore = require("tough-cookie-filestore")
const cookieJar = new tough.CookieJar(new FileCookieStore("./cookie.json"));


const cookieString = 等下结果填这里
const cookieList = cookieString.split('; ')
for (i in cookieList){
  cookieJar.setCookieSync(cookieList[i], 'http://picupload.service.weibo.com');
}

然后手动登录微博,打开 http://weibo.com/minipublish 打开控制台,得到cookie(亲测documen.cookie不行)
image

把cookie的值复制到上面那个文件,清空cookie.json内容,运行后就行了

from sinapichostingapi.

J3n5en avatar J3n5en commented on June 9, 2024

至于验证码的问题可能要等我空闲下来才能解决....

from sinapichostingapi.

J3n5en avatar J3n5en commented on June 9, 2024

@shirakun 嘤嘤嘤,刚刚翻了下你github,没想到是你,之前用过你的ssl证书...感谢

from sinapichostingapi.

shirakun avatar shirakun commented on June 9, 2024

好了,顺便我ssl相关的代码都在自己的gitlab里,你是如何通过github知道我的?

from sinapichostingapi.

J3n5en avatar J3n5en commented on June 9, 2024

@shirakun 看到你的联系方式(email)感觉很眼熟,和那个ssl网址一致.......

from sinapichostingapi.

Related Issues (5)

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.