Comments (9)
我这边还没出现这种情况.你可以检查一下新浪是否登录成功了,或者把cookie.json这个文件删了重新登录试试
from sinapichostingapi.
会不会是登录需要验证码的问题啊
from sinapichostingapi.
检查了cooki.json是空的,然后我微博账户新注册的,登录需要验证码,应该是验证码的问题了
from sinapichostingapi.
cookie.json里存的是标准的json吗,我用php把cookie序列化之后保存进去启动的时候直接报错诶
from sinapichostingapi.
提供一个临时的解决方案
同目录下创建一个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不行)
把cookie的值复制到上面那个文件,清空cookie.json内容,运行后就行了
from sinapichostingapi.
至于验证码的问题可能要等我空闲下来才能解决....
from sinapichostingapi.
@shirakun 嘤嘤嘤,刚刚翻了下你github,没想到是你,之前用过你的ssl证书...感谢
from sinapichostingapi.
好了,顺便我ssl相关的代码都在自己的gitlab里,你是如何通过github知道我的?
from sinapichostingapi.
@shirakun 看到你的联系方式(email)感觉很眼熟,和那个ssl网址一致.......
from sinapichostingapi.
Related Issues (5)
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 sinapichostingapi.