Extract url,title,images etc from news search result

109 views
Skip to first unread message

Nishant Kumar

unread,
Aug 24, 2013, 12:37:10 PM8/24/13
to google-ajax...@googlegroups.com

google.load("elements", "1", {packages : ["newsshow"]});

function onLoad() {
var a=new Array();
a[0]="india";      
a[1]="us";
a[2]="brazil";
flag=1;
s=" sports";
p=" politics";
e=" entertainment";
t=" science and technology";
w=" ";

  var options = new Array();
for(i=0;i<a.length;i++){
options[i]={
    "queryList" : [
      {
       "q" : a[i] + t
      },

    ]
  }
}
  var content = document.getElementById('content');
for(i=0;i<a.length;i++){
  var newsShow = new google.elements.NewsShow(content, options[i]);


  
}

google.setOnLoadCallback(onLoad);
  
I am using this code saved in html format to get news acordding to specific queries. This shows me the results on browser page, but I want to extract url, images and title from those news updates. PLs help me with this soon
Thanks in advance for any Help

Jeremy Geerdes

unread,
Aug 26, 2013, 12:37:45 PM8/26/13
to google-ajax...@googlegroups.com
The Google News API underlying the NewsShow can be utilized directly to do what you're wanting to do. The problem is that the API's TOS prohibit the use of robots, crawlers, and other similar applications which make automated queries to the service and the storage of results except in response to a user's interaction with the app. You'll want to review the full TOS, and if your application meets its terms, you should be able to use the documentation to get the information you need.


You'll also want to remember that the News Search API has been deprecated and will be discontinued no later than May 2014. So any application you build using it will not work past that date.

jg





--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-searc...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/0f2444b3-7504-46ac-ba38-5f833f3c3148%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!
Reply all
Reply to author
Forward
0 new messages