7
$\begingroup$

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?

$\endgroup$
9
$\begingroup$

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

$\endgroup$
  • 4
    $\begingroup$ I admire your productivity and the ability to stay focused to bring your projects to a usable point. +1 $\endgroup$ – Kuba Oct 20 '17 at 4:59
  • 2
    $\begingroup$ @Kuba it's the power of procrastination :) $\endgroup$ – b3m2a1 Oct 20 '17 at 5:00
  • $\begingroup$ Ah, so you have something more important to do? Makes sense :) $\endgroup$ – Kuba Oct 20 '17 at 5:01
  • $\begingroup$ 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? $\endgroup$ – murray Oct 20 '17 at 20:20
  • $\begingroup$ @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. $\endgroup$ – b3m2a1 Oct 20 '17 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.