|
@@ -536,6 +536,12 @@ func saveData(href, uuid string, result map[string]interface{}) {
|
|
|
_id := tools.NewObjectId()
|
|
|
bidcheckrepeat.BidAdd(href, uuid, tools.BsonTOStringId(_id)) //数据id存redis
|
|
|
result["_id"] = _id
|
|
|
+ competehref := qutil.ObjToString(result["competehref"])
|
|
|
+ tmphref := qutil.ObjToString(result["href"])
|
|
|
+ strid := tools.BsonTOStringId(_id)
|
|
|
+ if competehref != "" && tmphref == "#" {
|
|
|
+ result["href"] = `https://www.jianyu360.com/article/content/` + qutil.CommonEncodeArticle("content", strid) + `.html`
|
|
|
+ }
|
|
|
savelock.Lock()
|
|
|
SaveCache = append(SaveCache, result)
|
|
|
if len(SaveCache) > 200 {
|