Hpple失去了一些内容

时间:2014-04-29 12:11:57

标签: html ios hpple

我需要获取标记<span></span>

之间的内容

HTML代码截图:screencast.com

但解析后我得到以下一行:

Xcode调试器屏幕截图:screencast.com

为什么会这样?是否有可能获得内容?

Сode示例:

NSURL *tutorialsUrl = [NSURL URLWithString:@"http://people.onliner.by/2014/04/29/voda-2/"];
NSData *tutorialsHtmlData = [NSData dataWithContentsOfURL:tutorialsUrl];
TFHpple *tutorialsParser = [TFHpple hppleWithHTMLData:tutorialsHtmlData];
NSString *tutorialsXpathQueryString = @"//div[@class='comment-actions']/a/span";

NSArray *tutorialsNodes = [tutorialsParser searchWithXPathQuery:tutorialsXpathQueryString];
for (TFHppleElement *element in tutorialsNodes) {
    _code = [element content];
}

0 个答案:

没有答案