|
@@ -95,7 +95,8 @@ function downloadDetailPage(data)
|
|
local update="%s"
|
|
local update="%s"
|
|
for i=1,3 do --3次下载任务不成功,退出
|
|
for i=1,3 do --3次下载任务不成功,退出
|
|
local content = download(data["href"],{})
|
|
local content = download(data["href"],{})
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ data["s_title"]=""
|
|
data["detail"]=findContentText("%s",content)
|
|
data["detail"]=findContentText("%s",content)
|
|
data["contenthtml"]=findOneHtml("%s",content)
|
|
data["contenthtml"]=findOneHtml("%s",content)
|
|
data["l_np_publishtime"]=com.strToTimestamp(data["publishtime"])
|
|
data["l_np_publishtime"]=com.strToTimestamp(data["publishtime"])
|
|
@@ -103,6 +104,12 @@ function downloadDetailPage(data)
|
|
local checkAttr={"title","href","publishtime","detail","contenthtml"}
|
|
local checkAttr={"title","href","publishtime","detail","contenthtml"}
|
|
local b,err=com.checkData(checkAttr,data)
|
|
local b,err=com.checkData(checkAttr,data)
|
|
if b then
|
|
if b then
|
|
|
|
+ local attachments = com.getFileAttachmentsArrayWithTag(data["href"],"dl","<dl>"..data["contenthtml"].."</dl>",false)
|
|
|
|
+ if table.getn(attachments)>0 then
|
|
|
|
+ data["projectinfo"]={
|
|
|
|
+ ["attachments"]=attachments
|
|
|
|
+ }
|
|
|
|
+ end
|
|
return data
|
|
return data
|
|
else
|
|
else
|
|
timeSleep(60)--延时60秒再次请求
|
|
timeSleep(60)--延时60秒再次请求
|