1.获取网页html
NSString *lJs = @"document.documentElement.innerHTML";//获取当前网页的html
self.currentHTML = [webView stringByEvaluatingJavaScriptFromString:lJs];
2.获取网页上的图片
NSData *data = [self.currentHTML dataUsingEncoding:NSUTF8StringEncoding];
TFHpple *xpathParser = [[TFHpple alloc] initWithHTMLData:data];
NSArray *elements = [xpathParser searchWithXPathQuery:@"//img"];
NSMutableArray *imageArray = [[NSMutableArray alloc] init];
for (TFHppleElement *element in elements) {
NSDictionary *elementContent =[element attributes];
NSLog(@"elementContent = %@",elementContent);
NSArray *allkeys = [elementContent allKeys];
for (int i = 0 ; i < allkeys.count; i++) {
NSSt