8

How can we build a system to perform web searches (e.g. Google search) in a notebook so that it looks and functions like a normal search interface operating in the browser?

b3m2a1
  • 46,870
  • 3
  • 92
  • 239

1 Answers1

10

I started on this, after building out a search paclet for this answer.

The basic idea is to simply provide nicer access to the basic underlying paclet. The code all lives here.

We can use it like so:

Get["https://raw.githubusercontent.com/b3m2a1/mathematica-tools/master/SearchBrowser.wl"];
SearchBrowser[]

empty browser

And then just type and search:

search example

One convenient thing is that we can dynamically bind the search results, and use the different types of search (such as video):

SearchBrowser[Dynamic[sr]]

cat result

and then we can still access the results outside of the interface:

sr[[1]]

enter image description here

b3m2a1
  • 46,870
  • 3
  • 92
  • 239
  • 4
    I admire your productivity and the ability to stay focused to bring your projects to a usable point. +1 – Kuba Oct 20 '17 at 04:59
  • 2
    @Kuba it's the power of procrastination :) – b3m2a1 Oct 20 '17 at 05:00
  • Ah, so you have something more important to do? Makes sense :) – Kuba Oct 20 '17 at 05:01
  • Not working for me. E.g., if I try your example of searching Web for Qwant, I get an error message: "ServiceConnect: The service Qwant is unknown, try providing authentication options." Is there something more I need to do besides loading SearchBrowser.wl? – murray Oct 20 '17 at 20:20
  • @murray Hm... the Initialization clearly isn't doing its job. It's trying to install the Qwant paclet. If you use the PacletInstall from the linked answer then try again it will work. – b3m2a1 Oct 20 '17 at 20:21
  • @murray Try it again now. It turns out it was a context issue. – b3m2a1 Oct 20 '17 at 20:26
  • OK now with fixed version, thanks. – murray Oct 20 '17 at 20:42