A13X A13X - 3 months ago 8
jQuery Question

JQuery .load() not working with Google search results

I'm working on a Chrome Extension and I was essentially hoping to populate a

tag in the popup with some Related Links, set up by taking some search results links from Google.com by using jQuery.load(search_url) to inject them into the

I guess the first question would be to ask if Google has set up their page so you can't pull content from it (legality issues?). Otherwise, I'm pulling from the "r" class which contains one of the search results hyperlink. Here's the code:

$(document).ready(function(){$('#links').load("https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&es_th=1&ie=UTF-8#q=keyWords .r");});

(Keywords will eventually be replaced with the relevant keywords to search for).


I worked on a project where I made it open links for my chrome extension as well. I used this simpler function and it worked without problems:

window.open(*string variable here*);