POST /news/fetchcontent| 参数 | 位置 | 类型 | 必填 | 真实默认值 | 说明 |
|---|---|---|---|---|---|
| appkey | query | string | 否 | 无 | 付费后获取的 APPKEY |
| url | body / application/json | string | 是 | 无 | 需要抓取正文的文章链接 |
| contentwithhtml | body / application/json | ["boolean", "string", "null"] | 否 | false | 返回的文章是否包含 HTML 标签 |
| htmlsourcecontent | body / application/json | ["boolean", "string", "null"] | 否 | false | 是否返回文章页面原始 HTML 内容,供您二次解析或分析正文失败时使用,需要注意接口的性能问题 |
| url | body / application/x-www-form-urlencoded | string | 是 | 无 | 需要抓取正文的文章链接 |
| contentwithhtml | body / application/x-www-form-urlencoded | ["boolean", "string", "null"] | 否 | false | 返回的文章是否包含 HTML 标签 |
| htmlsourcecontent | body / application/x-www-form-urlencoded | ["boolean", "string", "null"] | 否 | false | 是否返回文章页面原始 HTML 内容,供您二次解析或分析正文失败时使用,需要注意接口的性能问题 |
{
"url": "https://cdn.gugudata.com/demo/fetchcontentimages/v1/article-e65ee1f448ca5233.html",
"contentwithhtml": false,
"htmlsourcecontent": false
}application/json{
"type": "object",
"required": [
"DataStatus",
"Data"
],
"properties": {
"DataStatus": {
"type": "object",
"required": [
"RequestParameter",
"StatusCode",
"StatusDescription",
"ResponseDateTime",
"DataTotalCount"
],
"properties": {
"RequestParameter": {
"type": "string",
"description": "请求参数,一般用于调试"
},
"StatusCode": {
"type": "integer",
"description": "接口返回状态码"
},
"StatusDescription": {
"type": "string",
"description": "接口返回状态说明"
},
"ResponseDateTime": {
"type": "string",
"description": "接口数据返回时间"
},
"DataTotalCount": {
"type": "integer",
"description": "此条件下的总数据量,此接口返回 1"
}
}
},
"Data": {
"type": "object",
"required": [
"Url",
"Title",
"Content",
"HTMLSourceContent",
"PublishDate"
],
"properties": {
"Url": {
"type": "string",
"description": "文章 Url"
},
"Title": {
"type": "string",
"description": "文章标题"
},
"Content": {
"type": "string",
"description": "智能分析出的文章正文部分(包含 HTML 标签时,标签为 Unicode 编码)"
},
"HTMLSourceContent": {
"type": "string",
"description": "文章的原始 HTML 内容(HTML 标签为 Unicode 编码)"
},
"PublishDate": {
"type": "string",
"description": "文章发表时间"
}
},
"description": "文章结果对象。"
}
}
}application/json{
"$ref": "#/components/schemas/CommonResponse"
}application/json{
"$ref": "#/components/schemas/CommonResponse"
}application/json{
"$ref": "#/components/schemas/CommonResponse"
}application/json{
"$ref": "#/components/schemas/CommonResponse"
}application/json{
"type": "object",
"properties": {
"DataStatus": {
"type": "object",
"required": [
"RequestParameter",
"StatusCode",
"StatusDescription",
"ResponseDateTime",
"DataTotalCount"
],
"properties": {
"RequestParameter": {
"type": "string",
"description": "请求参数,一般用于调试"
},
"StatusCode": {
"type": "integer",
"description": "接口返回状态码"
},
"StatusDescription": {
"type": "string",
"description": "接口返回状态说明"
},
"ResponseDateTime": {
"type": "string",
"description": "接口数据返回时间"
},
"DataTotalCount": {
"type": "integer",
"description": "此条件下的总数据量,此接口返回 1"
}
}
},
"Data": {
"type": "null",
"description": "文章结果对象。"
}
}
}application/json{
"type": "object",
"properties": {
"DataStatus": {
"type": "object",
"required": [
"RequestParameter",
"StatusCode",
"StatusDescription",
"ResponseDateTime",
"DataTotalCount"
],
"properties": {
"RequestParameter": {
"type": "string",
"description": "请求参数,一般用于调试"
},
"StatusCode": {
"type": "integer",
"description": "接口返回状态码"
},
"StatusDescription": {
"type": "string",
"description": "接口返回状态说明"
},
"ResponseDateTime": {
"type": "string",
"description": "接口数据返回时间"
},
"DataTotalCount": {
"type": "integer",
"description": "此条件下的总数据量,此接口返回 1"
}
}
},
"Data": {
"type": "null",
"description": "文章结果对象。"
}
}
}| 业务码 | 含义 | 说明 |
|---|---|---|
| 100 | 成功 | HTTP 200;仍应检查业务状态。 |
| 501 | 参数错误 | HTTP 400 |
| 901 | 依赖失败 | HTTP 503 |