Jump to content
Sign in to follow this  
hankydysplasia

Easy way to create web searches with results in Alfred?

Recommended Posts

I'm not a programmer, but I have many websites I would love to use more thoroughly with Alfred.

 

I would love an easy way to populate Alfred with search results like the wikipedia and Google Autocomplete workflows do.

 

Take pubmed for example.  When I open a search query, and inspect the web page elements, everything under class="title" is what I would want to blow into Alfred.  These are all also links so the action would obviously be following the link.  On Rotten Tomatoes, it's similarly identifiable.  I just need a shell created so that I can put that information in.

 

I tried to adapt the wikipedia script for PubMed, but with no programming knowledge, failed.  Here was information I was trying to use:

http://www.ncbi.nlm.nih.gov/books/NBK25500/

 

Any chance this could be implemented in a drag and drop method or some way to get the result you want into the workflow builder?

Share this post


Link to post

I suspect that it'd rely much too much on the human-intelligence ability to distinguish between different attributes of a web page to ever be drag-and-droppable. But there are many, many libraries that simplify the process of parsing a web page in various languages (as a self-promotional aside, PyAl includes BeautifulSoup, which is excellent for this). I'll see if I can't use the page you provided to generate a well-documented sample workflow that scrapes search results—though it'd be particularly helpful if you could provide the search URL you used—a bit later on this weekend. (I hate that I can't do it now, but I'm a bit slammed, and not in a positive, life-affirming way.)

Share this post


Link to post

phyllisstein is correct that there is a little more to it than what drag and drop could accomplish but its still not terribly hard to accomplish with code. That being said, if he doesn't want to work on it or doesn't have time, I could also throw this together for you this weekend.

Share this post


Link to post
phyllisstein is correct that there is a little more to it than what drag and drop could accomplish but its still not terribly hard to accomplish with code. That being said, if he doesn't want to work on it or doesn't have time, I could also throw this together for you this weekend.

 

I shall do my damnedest. With a fructifying project dictating a lot of informant-wrangling, classes beginning, and Sublime going into v3 and breaking all my packages, it may be hard to eke out a moment. But we'll see how far my Adderall scrip and sheer bloody-mindedness take me.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  
×
×
  • Create New...