lijinma / wechat_spider

使用“代理”的方式来抓取微信公众账号文章,可以抓取阅读数、点赞数,基于 anyproxy。
949 stars 226 forks source link

WebSocket will not work #5

Open xl7dev opened 7 years ago

xl7dev commented 7 years ago

➜ wechat_spider git:(master) bin/wechat_spider the default rule for AnyProxy. Anyproxy rules initialize finished, have fun! The WebSocket will not work properly in the https intercept mode :( GUI interface started at : http://192.168.1.205:8002/ Http proxy started at 192.168.1.205:8001

received https CONNECT request mp.weixin.qq.com ==>will forward to local https server [internal https]proxy server for mp.weixin.qq.com established

lijinma commented 7 years ago

看你的情况应该是没问题,有报错信息吗?有截图吗?

xl7dev commented 7 years ago

就是抓不到https,单独使用anyproxy可以抓到https

xl7dev commented 7 years ago

全局模式下npm install wechat_spider -g,python2.7.13环境,运行wechat_spider出错 /usr/local/lib/node_modules/wechat_spider/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js:25 throw new Error('Please install sqlite3 package manually'); ^

Error: Please install sqlite3 package manually at new ConnectionManager (/usr/local/lib/node_modules/wechat_spider/node_modules/sequelize/lib/dialects/sqlite/connection-manager.js:25:13) at new SqliteDialect (/usr/local/lib/node_modules/wechat_spider/node_modules/sequelize/lib/dialects/sqlite/index.js:12:28) at new Sequelize (/usr/local/lib/node_modules/wechat_spider/node_modules/sequelize/lib/sequelize.js:233:18) at Object. (/usr/local/lib/node_modules/wechat_spider/lib/db.js:2:17) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object. (/usr/local/lib/node_modules/wechat_spider/lib/csv.js:1:72) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12)

lijinma commented 7 years ago

两个问题问你:

  1. anyproxy 如何执行的 anyproxy -i 吗?
  2. 你证书都装过了, 对吗?
xl7dev commented 7 years ago

搞错了,不好意思,证书装了,anyproxy -i也是提示 ➜ git:(master) ✗ anyproxy -i the default rule for AnyProxy. Anyproxy rules initialize finished, have fun! The WebSocket will not work properly in the https intercept mode :( GUI interface started at : http://192.168.1.205:8002/ Http proxy started at 192.168.1.205:8001

zhulinpinyu commented 7 years ago

我也是同样的问题 无法捕捉https的请求

lijinma commented 7 years ago

【问题已解决】:iOS 端证书安装设置的问题 iOS 10.3 增加了额外的配置:还需要在 设置->通用->证书信任设置 中把AnyProxy证书的开关打开 http://anyproxy.io/4.x/cn.html#ios-%3E=-10.3%E4%BF%A1%E4%BB%BBca%E8%AF%81%E4%B9%A6

xl7dev commented 7 years ago

是在设置->通用->关于本机->证书信任设置->打开AnyProxy证书吧

lijinma commented 7 years ago

@xl7dev 对的

xl7dev commented 7 years ago

@zhulinpinyu 后来重新安装了一下sequelize,sqlite3,spider这三个模块就可以了,不会报错

xiongzhp commented 7 years ago

@xl7dev 重新安装sequelize,sqlite3的最新版本吗?但为啥还要安装spider,-g 安装吗?

xiongzhp commented 7 years ago

我重装也是报错的

xl7dev commented 7 years ago

重装之前把上面我列的三个程序目录下的文件删除掉