Hpple Implementation/unrecognized Selector
I am working with the hpple html parser here: https://github.com/topfunky/hpple To test the function I've added it to a simple project and am able to compile and open the simulator
Solution 1:
Here's your problem:
NSData *htmlData = [NSString stringWithContentsOfURL:[NSURL URLWithString: urlRequest] encoding:NSUTF8StringEncoding error:nil];
TFHpple *xpathParser = [[TFHpple alloc] initWithHTMLData:htmlData];
TFHpple
's initWithHTMLData
is supposed to take an NSData
. You declare htmlData
to be an NSData
, but the actual object you're assigning to it is an NSString
.
This should fix it:
NSData *htmlData = [NSData dataWithContentsOfURL:[NSURL URLWithString: urlRequest]];
Post a Comment for "Hpple Implementation/unrecognized Selector"