Get full-text articles from RSS Feed - iphone

Hello I am using GDataXML to parse RSS Feeds.
However most of todays feeds doesn't show the full text article. So most of the times I end up with just a tiny piece of the whole thing.
I see this feature in a lot of iPhone and iPad readers - it kinda fetches the article from the web and put it in full text.
So how do i do that?
My idea is this - the root element starts with the start of the article.
So if the root element have [article]
i need to go to the website, fetch the html code between the starting divs, and then display it in my app.
So how do i get the code between those divs? regular expressions or what? I want example thanks.
And finally how do i display images after I get the full article in html format?
Thanks guys and regards.

use MWFeedParser you will get RSS Feeds in
identifier, title, link, date, updated, summary, content, enclosures

I use MWFeedParser as well, because it will get all the elements of a feed entry, but you are correct that it will not do a "deep dive" into all of the links in the feed entry.
If you want to bring in the full content from the link, and the full content from the enclosures (such as audio or video from a podcast), you are basically talking about saving the web page for offline viewing. For a full html page, you would have to save that HTML, plus crawl the whole page and save the images, and change the path of those images so that you would be able to load it offline. It's not really the job of the RSS applications to save HTML content for offline use, but to get the elements of the RSS feed. Once you have all the links you want to save for offline use, you need to provide the code that will take a URL and save it offline.
I did a search for ios save html offline and found this post which seems pretty positive using ASIHttpRequest to save a page offline: https://stackoverflow.com/a/6698854/1072068. I would recommend you try using something like that once you get the parts of the rss feed entry from MWFeedParser.

Related

how to get news full content from rss feed in j2ee

I am developing a site which is supposed to get the news content of other sites, something like this. but without redirecting to the host for reading the news content.
now the problem is that I don't know what is the best way to get the content completely. I know that I can use RSS feed for each site but it has only a short description of each news not the whole story. I have also read the related questions in SO like these:
How to get the full content from the rss feed in javascript
How to extract the full content from a partial content rss
but none of them solved my problem .
now I wanna ask what is the best way to get the whole content of news from different sites if it is necessary to go directly to them?
I am sorry because of bad english and if my question is not clear enough I can explain it even more
thanks in advance
You could use web scraping library like boilerpipe to extract content from news sites, but scraping breaks easily(if the target site changes layout for example) and there might be legal issues in extracting full content from other sites and displaying in yours.
Edit: I tried boilerpipe api demo and the library seems very smart at extracting articles from web pages.

Wikipedia page parser for iPhone App project

i want parse a wikipedia page to retrieve information for my ios app, there is a parser or some tutorial that explain me how i can do it?...or to put the page in an xml format, i have look the http://www.mediawiki.org/wiki/MediaWiki page, but i haven't understood nothing, if anyone can help me please..maybe with some example...
Have you read the MediaWiki API page, the page that describes the Query action, and above all else their API FAQ? These links will tell you what URLs you should be using to get the data that you require.
Do you know how to download a URL with NSURLConnection?
To start with, try using their API to download a Wikipedia page of your choice in HTML format. There's an answer in their FAQ that tells you how to request HTML format. If you do that, you'll get something you could display in a web view and style as you'd like.

I want to get content of timesofindia website for my native app

I want to develop a native iPhone/iPad app for TimesOfIndia.
I want to get that news content and images.
How do I get that content ?
I don't know if this answers your question.. but it seems like TOI already has an iPhone application..
Check this website: http://timesofindia.indiatimes.com/mobileapplist/7404562.cms
If you want to get the news from any website, here are some steps you can use (and I am no expert):
Try to use a tool like wget to download a url to a file and then parse the html, like so: wget -O hindu.html www.thehindu.com (wget is available on linux machines). Parse the html or xml in that file and display the headlines and news on your app. Note that this downloading and parsing is best done on a server which could then be pushed (as data) onto the phones of your users.
RSS feed. Get an RSS style feed for the website whose content you want. You can then parse the RSS feed and push that onto the users device.
Try to build an aggregator (like news.google.com) or use an existing one. That way, you can have stories from multiple sources.

iPhone web services NSURL

hi I am working on an application which takes data from a website and it displays it in table. I have been sucessful in making like an RSS feed (made like a twitter feed so I think it is an xmlparser) but now I want to get data from a website which doesn't have RSS feed in it..I just want to get the titles from the webpage.... any suggestion how do I do it without the XMLParser...
thanks
I think that the best way is to create on your server a php/asp/... page that will scrape data from the remote website.
Then, in that page, you can use some CURL to scrape data.
See here.
Next, you return the data in the format you want (XML/jSon/etc...).
Finally, you can easily call that script from your code.
On the other hand, pay attention to not scrape anything as skimming is generally illegal and Apple ca reject your app because of that.
There is a nice post talking about it.

RSS feed per tag

Suppose stackoverflow.com wanted to have an RSS feed per each tag. They would probably have requests like stackoverflow.com/rss?tag=aspnet to return appropriate RSS feeds. This is the easy part.
Now when the user requested stackoverflow.com/rss?tag=aspnet he would see some XML. Instead it would be better to show a page where user can choose which RSS reader he wants to subscribe with (just like feedburner.com).
My question is: is there any ready-made code (html+javascript) that I can copy-paste to create such a subscription page? Basically I want to copy feedburner.com's subscription page onto my own site.
PS - I would be happy using feedburner.com, but it would require me to create a feed for each tag manually, which is impractical.