How to get entire news content from a news website

柔情痞子 提交于 2019-12-04 12:44:27

Use Jaunt Api .

The Api has easy-to-learn structure and also the code is efficient as well as fast. You should give it a try.

Angudroid

Try to use a third service like http://import.io/ or http://www.mozenda.com

As you said apps like Flipboard, Breaking news sport etc are based on services like import.io

With this you can transform information from the web into usable data easily !

U can use their RSS feeds to get news content

Some of this app used JSON in retrieving the content from the web and pass into android app. check this link

They use an API that allows them to retrieve news (load from a server). For example yahoo, google, etc Not tested yet but it works (I'm sure) see yahoo API

In your case, You should write another view to display news details according to the news ID: Read their documentation carefully

Some Websites will write their own public API, which everyone can access with some HTTP header values sent. After sending HTTP request, they return the response in XML / JSON formats which you have to parse them inside your Android app and produce them on UI.

If in case they do not provide any API as such, then you need write a server side Crawler which crawls and parses the information(HTML Tagged information) from their websites and store them. Again then you need to write your own Web services(RESTful / SOAP) that send the parsed information to Android app via URL's or something.

This can be achieved using RSS feed.

visit here and see page source, here you can get all news in item tags like this

<item> <title>..</title> <description>...</description> </item>

where each item tag is for each news, you can fetch both title and description from there.

and you can get data from any link using HTTPPOST or HTTPGET mehods

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!