联系客服: iP138.com客服89932929 iP138.com客服1586314992
iP查询接口

网页提取接口支持HTTPS(赠送100次)

简介:新闻网页正文抽取,可提取互联网上99% 已上文章,智能识别包含的标题及正文内容。 互联网上几百万个站点,每个站点还有N个不同的文章页面模版,您只需要接入我们的接口,就无需再为编写获取文章内容的正则而苦恼了,直接提取标题及正文内容。

已连接应用数:2309

  • API接口QQ交流群:177096428   iP138 api接口
  • 数据修正QQ处理群:94181690    iP138数据修正

ASP调用网页提取接口示例:

                                            <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
                                            <% Option Explicit
                                            '=========================================================
                                            ' File      : .asp
                                            ' Version   : 1.0.0.0
                                            ' Create    : 
                                            ' Modify    : 
                                            '=========================================================
                                            ' 1.0.0.0   : 
                                            '========================================================= %>
                                            <% Dim url,datatype,token,queryurl

                                            url = "http%3a%2f%2fwww.sina.com.cn%2f"
                                            token = "00d5cb1fac5dc5cbfe2ff218292a2dfd33"    '用户中心查看您的token
                                            queryurl = "https://api.ip138.com/text/?url="&url&"&type="&1&"&token="&token

                                            Response.Write (GetURL(queryurl))

                                            Function GetURL(queryurl)
                                                on error resume next
                                                dim Retrieval
                                                Set Retrieval = Server.CreateObject("MSXML2.ServerXMLHTTP")
                                                        Retrieval.setTimeouts 600000, 600000, 600000, 600000
                                                        Retrieval.Open "GET", queryurl, false
                                                        Retrieval.Send
                                                        GetURL = Retrieval.ResponseBody
                                                Set Retrieval = Nothing
                                                GetURL=BytesToBstr(GetURL,"utf-8")
                                            End Function

                                            Function BytesToBstr(strBody,CodeBase)
                                                    dim objStream
                                                    set objStream = Server.CreateObject("Adodb.Stream")
                                                    objStream.Type = 1
                                                    objStream.Mode =3
                                                    objStream.Open
                                                    objStream.Write strBody
                                                    objStream.Position = 0
                                                    objStream.Type = 2
                                                    objStream.Charset = CodeBase
                                                    BytesToBstr = objStream.ReadText 
                                                    objStream.Close
                                                    set objStream = nothing
                                            End Function
                                            %>