Jump to content

Recommended Posts

Alfred 2 making that IMDB web search a little boring? How about a shiny new workflow for IMDB search suggestions? It leverages IMDB's own suggest protocol to deliver snappy results right into Alfred. (Really, it's fast. They're using static JSON files on a CDN.)

 

Selecting a result will take you directly to the page for the film or name you're looking for, or if there are no suggestions, you can jump to a plain IMDB search page instead.

 

Download

 

GitHub Repo

 

f8qIhKG.png

 

Share this post


Link to post

Would love this to function correctly. I use IMDB everyday and was glad to see this, shame it stops after 4 characters.

 

It's a little glitch from how the API works. (It only matches the first 4-5 characters and returns an error after that.) I've been planning to find a fix, but it looks like Dexwell implemented something for it. You might want to check it out. (I'm going to have a look at the code and see if I can merge some of the changes and push an update to my repo.)

Edited by redwall_hp

Share this post


Link to post

Did you know that it's forbidden to use their JSON data?

 

I wanted to create the same workflow, but I asked an IMDB tech guy and he told me that it's forbidden to use those JSONs or any other way of scraping data from their site without their written approval :( I thought you should know this and be careful with this workflow ;)

Share this post


Link to post

I think the "spirit" of the use is fine, as it's not like the workflow is scraping content off their info pages and publishing it elsewhere, or anything like that. It's just taking a publicly-available resource and using it to more easily jump to pages on their site. It's just like the user is searching from their home page, only now it's a reflex away instead of a dozen keystrokes.

 

If IMDB/Amazon objects, I will take it down, though. <_<

Share this post


Link to post

Hi, first of all thanks for your work!

 

I think the fallback search is kinda buggy right now, isn't it? 

 

This is my query

 Screen%20Shot%202013-04-06%20at%2015.31.

 

And the fallback search leads me to this site: http://www.imdb.com/find?s=all&q=movie 

 

And I'd expect it to have the Iron Man 3 page as first selection instead of the fallback search, otherwise I wouldn't need suggestions in the first place, right?

 

Thanks again :)

Share this post


Link to post

Seems like the problem may have something to do with this part of the code:

I don't get why this is so hard to make it search the default 'all' category. Can't someone look at how the default IMDb search works inside Alfred already? Shouldn't be that hard to get such a simple search working....

 

Well, why don't you get to it yourself then? Everybody here makes the stuff for free, for fun and in their free time. I wouldn't demand anything here, rather ask nicely.

Share this post


Link to post

Awesome! It would be better if it would show the rating (perhaps even including other websites ratings, such as rotten tomatoes)

 

Actually, it would be just perfect if we could customize what appears.

 

Since I'm a movie fanatic I would love to query something like "Skyfall" and have the following:

Skyfall (2012) - 7,8 / 92% / 86% (name, year, imdb rating, rotten tomatoes critics, audience)

Daniel Craig, Javier Bardem / Sam Mendes / Neal Purvis / Roger Deakins / Thomas Newman (cast, direction, script, photography, music)

 

And, even better, type a person, "Scorsese" for example, and have a list of his movies below, instead of a list of people.

Edited by juanpazos

Share this post


Link to post

Nice ideas juanpazos. But I think at the moment there is no "smart" way to do this. As far as I know IMDB provides only a poor API which is not able to give you what you want.

 

Good example, movie "zigzack", only one result: http://sg.media-imdb.com/suggests/z/zigz.json

First of all, nice they provide JSON, thats fine. But you can see, that there aren't many informations to grab in this JSON. No rating, no list of starts, etc.

 

Second example, second problem: http://sg.media-imdb.com/suggests/z/zigza.json

One more letter and ... "access denied". Max. four characters allowed.

 

Hopefully IMDB improves their API in near future, then we are able to make a really good imdb-suggest-workflow for Alfred 2.

 

Until then we could force it with html-parsing. I'd not recommend to do this.

Edited by eusi

Share this post


Link to post

Does anyone who uses this workflow look at this topic? If so, did it stop working for you in the last few days? I reached out to the developer but he supposedly hasn't used this site in years. Can anyone take a crack at fixing it? I would, but I have no idea how to code.

Share this post


Link to post
1 hour ago, sr_navarre said:

Does anyone who uses this workflow look at this topic? If so, did it stop working for you in the last few days? I reached out to the developer but he supposedly hasn't used this site in years. Can anyone take a crack at fixing it? I would, but I have no idea how to code.

 

If you have upgraded to Alfred 3 recently, it should be the problem. Here's a link with the fixed workflow.

Edited by xilopaint

Share this post


Link to post

Does anyone know how to escape the query properly with this workflow? Apostrophes will break it, and I'm not sure where to try and fix it in the workflow itself. 

 

Not a huge deal of course, it's just inconsistent with some of the other search workflows that I use.

Share this post


Link to post

Hi,

 

This is probably my most used workflow, so thanks! Recently I've been having some trouble with it, though. Instead of presenting me with a list of search suggestions, I just get the top line "Search IMDB for {my query}" and the second line displays the last name I searched for when the workflow was still working normally. I'm attaching a picture to demonstrate what happens when I search for "the godfather."

 

1566457277_ScreenShot2019-04-09at5_57_49PM.thumb.png.d1347eba9a4d49b0aa755de947cb6824.png

 

I'm using the latest stable version of the Mac OS , and nothing has changed as far as I know. Do you have any ideas?

 

Thanks!

Share this post


Link to post
17 hours ago, sr_navarre said:

Hi,

 

This is probably my most used workflow, so thanks! Recently I've been having some trouble with it, though. Instead of presenting me with a list of search suggestions, I just get the top line "Search IMDB for {my query}" and the second line displays the last name I searched for when the workflow was still working normally. I'm attaching a picture to demonstrate what happens when I search for "the godfather."

 

1566457277_ScreenShot2019-04-09at5_57_49PM.thumb.png.d1347eba9a4d49b0aa755de947cb6824.png

 

I'm using the latest stable version of the Mac OS , and nothing has changed as far as I know. Do you have any ideas?

 

Thanks!

 

Have you ever tried this workflow?

Share this post


Link to post
On 4/10/2019 at 12:05 AM, sr_navarre said:

I've been having some trouble with it, though. Instead of presenting me with a list of search suggestions, I just get the top line "Search IMDB for {my query}" and the second line displays the last name I searched for when the workflow was still working normally.

The workflow recently broke the same way on my Mac: Whenever I try to do a search, I get "Search IMDB for {my query}" together with always the same results, regardless of what search terms I use.

 

If anyone has an idea of how to fix the workflow, I would be very grateful. I've tried the "Movie and TV Show Search" workflow linked above, but for my purposes, the "IMBD Search Suggest" workflow works much better (e.g., it is much faster, and it allows you to search for actor names, too).

 

Share this post


Link to post
Posted (edited)
10 hours ago, Blake said:

The workflow recently broke the same way on my Mac: Whenever I try to do a search, I get "Search IMDB for {my query}" together with always the same results, regardless of what search terms I use.

 

If anyone has an idea of how to fix the workflow, I would be very grateful. I've tried the "Movie and TV Show Search" workflow linked above, but for my purposes, the "IMBD Search Suggest" workflow works much better (e.g., it is much faster, and it allows you to search for actor names, too).

 

 

I don't know anything about PHP but I would bet the issue is related to the following line:

 

preg_match("/^imdb\$.*?\((.*?)\)$/ms", $jsonp, $matches);

Edited by xilopaint

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.

×
×
  • Create New...