Hi everybody!
I’m building app for read news. I want extract only the content of the news, but when I try, I can’t. I use htmlString.replace and other things, but this approach doesn’t works for all the sites.
Your question is too ambiguous to understand, please always provide code you’ve tried and describe whats the result of that and what you are actually looking for.
In general though, what I feel is you should learn more about “Template reference variables” and the @ViewChild, @ContentChild, @ViewChildren and @ContentChildren decorators. I’d suggest you not to manipulate the DOM directly either, if possible.
Well, we are pretty liberal about that here. If it ends up in an Ionic app, we can talk about it.
@armandof Can you provide an example what you are already doing? Using an RSS feed or an external service to do the parsing (http://feed43.com/ is old but works great!) might be a good idea.
As I understand the question, it is about how to write a scraper. I believe that is a rather elaborate topic that is best addressed away from a device.
Apologies for inappropriate phrasing, but I think OP would be best served dealing with this on a server and not having an on-device Ionic app be concerned with any of this whatsoever.
Not a good idea. Besides the possible legal problems that I won’t discuss, you have to know yourself what you are doing, sites change. So every time one of the sites breaks you would have to push an update to all your users. Much easier to just change something in the backend to make it work again.