1
(void)webViewDidFinishLoad:(UIWebView *)webView
{
    NSString *lJs = @"document.documentElement.innerHTML";

    NSString *lHtml = [webView stringByEvaluatingJavaScriptFromString:lJs];

    NSLog(@"html内容:%@",lHtml1);  

    // youku,tudou,ku6 ,souhu
    NSString *lJs2 = @"(document.getElementsByTagName(\"video\")[0]).src";  

    NSString *lm3u8 = [webView stringByEvaluatingJavaScriptFromString:lJs2];

    NSLog(@"video source:%@",lm3u8);
}

Android WebViewでそのコードを使用するには?

4

0 に答える 0