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?

有帮助吗?

解决方案 2

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

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top