Android RSS parsing - Google News RSS feeds are not “most recent” as opposed to search results. How to solve?

坚强是说给别人听的谎言 提交于 2019-12-11 09:26:04

问题


1) Check this news output link:
www.google.com/search?q=example&num=10&hl=en&gl=us&authuser=0&tbm=nws&source=lnt&sbd:1&sa=X&ved=0CBUQpwVqFQoTCJi2r5XYl8gCFYeNDQodbDQF1g&biw=1242&bih=599&dpr=1.1

The parameters used are tbs=sbd:1, &tbm=nws&source=lnt - This SHOULD give you a time-sorted list of news. The most recent at the top. (Sorted by date as the parameter - sbd:1). However, when you click it, it goes back to sorted by relevance for some reason. Please check the meaning of URL tags here: https://stenevang.wordpress.com/2013/02/22/google-search-url-request-parameters/

2) Now, check the corresponding RSS link: news.google.com/news/feeds?num=10&q=example&tbs=sbd:1&tbm=nws&source=lnt&output=rss

Search for the title tag (in the above link) in your browser. You will note that the news stories have been REORDERED based on what Google calls "relevance" (even though sbd:1 is specified) . The most recent is NOT at the top.

Does anyone know why this happens? Is there a way to solve this? I want the most recent news titles at the top of the page on RSS. How to achieve this?!

Thanks in advance.


回答1:


Strange! In my browser, adding &tbs=sbd:1 in the RSS feed's URL is ordering the items perfectly. Without it, problems occurs! Even when I push "num" to "30" for example!

http://news.google.com/news/feeds?num=30&q=example&tbs=sbd:1&tbm=nws&source=lnt&output=rss



来源:https://stackoverflow.com/questions/32810527/android-rss-parsing-google-news-rss-feeds-are-not-most-recent-as-opposed-to

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