美文网首页
获取网页信息

获取网页信息

作者: 那一处风景ljz | 来源:发表于2017-03-22 13:49 被阅读13次
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation{
NSString *htmlString = @"document.documentElement.innerHTML";//获取当前网页的html
[webView evaluateJavaScript: htmlString completionHandler:^(id result, NSError *error){
}];
}

// thisURL = document.URL;
// thisHREF = document.location.href;
// thisSLoc = self.location.href;
// thisDLoc = document.location;
// thisTLoc = top.location.href;
// thisPLoc = parent.document.location;
// thisTHost = top.location.hostname;
// thisHost = location.hostname;
// thisTitle = document.title;
// thisProtocol = document.location.protocol;
// thisPort = document.location.port;
// thisHash = document.location.hash;
// thisSearch = document.location.search;
// thisPathname = document.location.pathname;
// thisHtml = document.documentElement.innerHTML;
// thisBodyText = document.documentElement.innerText;//获取网页内容文字
// thisBodyText = document.body.innerText;//获取网页内容文字 怎么和上一个一样

相关文章

  • 获取网页信息

    // thisURL = document.URL;// thisHREF = document.lo...

  • urllib

    urllib是获取网页信息的库。 下面的例子1是提取百度首页的网页信息。例子1: 有时候需要提交表单获取网页信息,...

  • 2018-09-13爬虫——数据大盗

    Urllib库 什么是Urllib? 它是python自带的标准库,主要用它来获取网页信息。 怎么获取网页信息??...

  • 爬取NCBI中GEO中的数据

    获取GEO中GSE网页的信息 获取GEO中GSM的信息 汇总写成函数 获取附加材料文件

  • 极简爬虫教程

    爬虫总体上可以分为步:获取网页、解析网页(也就是找到想要的信息)、保存信息 一、准备工作 1.获取网页 需要用到r...

  • 自建应用对接企业微信流程梳理

    js-sdk全选验证流程: 通过网页授权后获取网页授权code后获取用户信息流程:

  • js获取浏览器相关宽高

    涵盖知识点:1、获取屏幕相关信息2、获取网页,文档相关信息3、获取元素相关信息4、DTD声明对document.b...

  • nodejs爬虫

    nodejs相关模块 获取网页内容(http\request\superagent等) 筛选网页信息(cheeri...

  • 获取商品网页的信息

    有两个需要关注的点: BeautifulSoup的findall()方法 获取review的数量,有没有更简洁的方法?

  • 获取是否关注公众号

    获取微信用户的信息(普通版) 获取微信用户的信息(包含是否关注公众号信息) 参考链接:微信网页授权登录获取包含是否...

网友评论

      本文标题:获取网页信息

      本文链接:https://www.haomeiwen.com/subject/kpjonttx.html