wechat_spider
wechat_spider copied to clipboard
你好,抓取是提示 Validation error
这个问题解决了吗?我也出现了同样的问题,在等待三秒的地方出现了这个错误,然后貌似死循环了,一遍一遍的3秒周期性重复
这个问题我解决了,
return Post.create({ author: author, biz: biz, appmsgid: appmsgid, title: title, contentUrl: contentUrl.replace(/\\\//g, "/"), cover: cover.replace(/\\\//g, "/"), digest: digest.replace(" ", " "), idx: idx, sourceUrl: sourceUrl.replace(/\\\//g, "/"), createTime, createTime, }) }).then(function(post) { // console.log(post.get({ // plain: true // })); console.log("success insert one item to db!") }). //在这里添加catch错误的代码 catch(function(err){ console.log(err,title); });
添加了catch错误的代码以后,发现报错原因是:contentUrl: {type: Sequelize.STRING(1234), unique: true} 插入数据的时候这个字段不unique,所以把这里改成了contentUrl: Sequelize.STRING(1234)
但是发现了新的问题,,,程序陷入死循环,,没有出现完成抓取的界面,而是一遍一遍的重复抓取操作
我刚刚用了下,也是出现来这个问题,没有出现完成抓取的界面,而是一遍一遍的重复抓取操作,只抓取十多条,而且点赞数等都是空的。
这个问题你们后来怎么解决了@ @wuxianghou @mashuangshuang @lijinma @Aufree
从anyproxy里看了下,翻页的url变了,把翻页的函数改一下就应该好了.我正要去改的路上... ... @ @wuxianghou @mashuangshuang @lijinma @Aufree
大家都解决了吗?有没有贴出代码的呢