Question

We have own form in our webpage. We want to show google(www.google.com/scholar) results into our webpage. We tried

  • jQuery, Ajax

  • HTML framing (iFrame, frameset)

    and all of these have SAMEORIGIN issues.

We also tried using a new tab and found it has same problem here . All these solutions seem to work only with http://www.google.com/custom and no other google websites.

Is there any alternative to do so?

Was it helpful?

Solution 2

I answer it myself. There are no solutions so far.

OTHER TIPS

Google prevents you from doing this. You could set up some server side code to scrape the results but this would almost definitely be blocked by Google. If this suits your needs you can create a form that submits your search to that page and opens it in a new tab like so:

<form action="http://scholar.google.co.uk/scholar" method="get" target="_blank">
  <input type="text" name="q">
  <input type="submit" value="Search">
</form>

Live example here: http://jsfiddle.net/v8qG8/

Update:

I mentioned that Google would block the scraping of its services, however I just found the third party library which does that. Not sure on Google's opinion on it though. http://www.icir.org/christian/scholar.html

You may also want to look at Google's custom API. You can get 100 free searches a day and then you pay $5 / 1000 search after that. If you cache the results or do low volume this may work for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top