Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to parse text content with no parent html tag #50

Open
madhurgarg opened this issue Aug 9, 2014 · 0 comments
Open

No way to parse text content with no parent html tag #50

madhurgarg opened this issue Aug 9, 2014 · 0 comments

Comments

@madhurgarg
Copy link

Many websites has text content of paras inside double quotes, instead of enclosing

HTML tags. It is not parse such sites.

For the following HTML :-

"A new " report "by intelligence firm " Recorded Future "examined Al-Qaeda's changes in encryption in response to the Snowden leaks, noting "an increased pace of innovation, specifically new competing jihadist platforms and three major new encryption tools from three different organizations - GIMF, Al-Fajr Technical Committee, and ISIS - within a three to five-month time frame of the leaks."

It is not possible to extract the text because TFHppleElement node with class 'article' has all the text without parent HTML tag in its content.

It has various child nodes with "a", "em" tags, the rest is in its content.

See http://appleinsider.com/articles/14/08/02/al-qaeda-prefers-android-over-apples-ios for example.

TFHppleElement * div = [[doc searchWithXPathQuery:@"//div[@Class='article']"] objectAtIndex:0];
po div.content (it won't print text which is hyperlinked or italicised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant