wechat_spider icon indicating copy to clipboard operation
wechat_spider copied to clipboard

你好,抓取是提示 Validation error

Open mashuangshuang opened this issue 7 years ago • 6 comments

image

mashuangshuang avatar May 24 '17 09:05 mashuangshuang

这个问题解决了吗?我也出现了同样的问题,在等待三秒的地方出现了这个错误,然后貌似死循环了,一遍一遍的3秒周期性重复

wuxianghou avatar Jun 08 '17 09:06 wuxianghou

这个问题我解决了, 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 avatar Jun 08 '17 10:06 wuxianghou

我刚刚用了下,也是出现来这个问题,没有出现完成抓取的界面,而是一遍一遍的重复抓取操作,只抓取十多条,而且点赞数等都是空的。

janily avatar Jun 17 '17 09:06 janily

这个问题你们后来怎么解决了@ @wuxianghou @mashuangshuang @lijinma @Aufree

LiuHD avatar Jul 23 '17 17:07 LiuHD

从anyproxy里看了下,翻页的url变了,把翻页的函数改一下就应该好了.我正要去改的路上... ...  @ @wuxianghou @mashuangshuang @lijinma @Aufree

YaffsYale avatar Sep 01 '17 05:09 YaffsYale

大家都解决了吗?有没有贴出代码的呢

renyineng avatar Dec 25 '17 02:12 renyineng