DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: IDEA: OMDB movie parser  (Read 19,538 times)

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 144
    • Military Service Badge - US Army
    • Military Service Badge - US Marine Corp
IDEA: OMDB movie parser
« on: April 09, 2017, 05:41 AM »
I deal with a lot of classic movies on a website I help moderate. I currently use a GreaseMonkey script to generate a basic BBCode NFO. [https://gist.github.com/cletusc/8d26902f46fe6b3ed850] This no longer works as intended since IMDB changed the layout of the pages. It still works well enough but I have been for a long time looking for something stand alone.

So the idea is to use OMDB.com API to gather the information and the parse the information into a given template. Be nice if each had a spot to make a template as you wanted. Here is an example of the OMDB api data return.

{"Title":"Soul Eater","Year":"2008–2009","Rated":"TV-14","Released":"07 Apr 2008","Runtime":"24 min","Genre":"Animation, Action, Adventure","Director":"N/A","Writer":"N/A","Actors":"Laura Bailey, Chiaki Omigawa, Micah Solusod, Brittney Karbowski","Plot":"Set in the Shinigami technical school for weapon meisters, the series revolves around 3 duo's. These pairs are a partnership between a weapon meister and a human weapon. Trying to reach a ranking of \"Death Scythe\" (and thus fit for use by the Shinigami) they must collect the souls of 99 evil humans and 1 witch. However, forces outside of the Academy make it more challenging of a feat.","Language":"Japanese","Country":"Japan","Awards":"N/A","Poster":"https://images-na.ssl-images-amazon.com/images/M/MV5BMWMzYmJiY2UtYzNhZS00ZTAzLTg3ODEtYWRiNmFjNjg0MWEwL2ltYWdlXkEyXkFqcGdeQXVyNTAyODkwOQ@@._V1_SX300.jpg","Metascore":"N/A","imdbRating":"8.0","imdbVotes":"8,175","imdbID":"tt1214085","Type":"series","totalSeasons":"1","Response":"True"}


Example of a possible template.


http://www.imdb.com/title/%imdbID%/

Runtime: %Runtime%
Genre(s): %Genre%
Language(s): %Language%
Country: %Country%
Plot:

%plot%




Cast:
%cast%

I admit I would rather have IMDB for all the cast/director links but figure OMDB might be easier to work with.

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: OMDB movie parser
« Reply #1 on: April 09, 2017, 07:43 AM »
So the idea is to use OMDB.com API to gather the information and the parse the information into a given template. Be nice if each had a spot to make a template as you wanted. Here is an example of the OMDB api data return.

Here's a quick proof of concept I threw together.  Was this something like what you had in mind?

2017-04-09_024211.png

I admit I would rather have IMDB for all the cast/director links but figure OMDB might be easier to work with.

Unfortunately, IMDB do not have any sort of official API.  Hence the need for sites like this OMDB API.

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: OMDB movie parser
« Reply #2 on: April 09, 2017, 08:46 AM »
Added a bit more functionality.

2017-04-09_034703.png

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 144
    • Military Service Badge - US Army
    • Military Service Badge - US Marine Corp
Re: IDEA: OMDB movie parser
« Reply #3 on: April 09, 2017, 01:13 PM »
This is exactly what I was thinking.

Is it possible to have access to all the information that the OMDB API uses? Each person could mock up their own way for presenting the information. I know I tend to add the poster along with maybe the rating so access it all would be nice.

How hard is it to add right click function? The idea all the call terms could be on a context menu.

Since you threw in the series is it possible to add the episode function?

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: OMDB movie parser
« Reply #4 on: April 11, 2017, 06:23 PM »
This is exactly what I was thinking.

Good to know I was on the right track.

Is it possible to have access to all the information that the OMDB API uses?

I added all the tags/tokens I could find.  Let me know if I missed any.

How hard is it to add right click function? The idea all the call terms could be on a context menu.

I've included an "Insert tokens" button with menu.

Since you threw in the series is it possible to add the episode function?

The episode stuff will take a bit of thought as the data it returns is different than movie or tv series data.

Here's the download:  http://skwire.dcmembers.com/apps/omdb_tool/OMDbTool.zip

2017-04-11_132918.png
« Last Edit: May 27, 2017, 03:21 AM by skwire »

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 144
    • Military Service Badge - US Army
    • Military Service Badge - US Marine Corp
Re: IDEA: OMDB movie parser
« Reply #5 on: April 11, 2017, 10:42 PM »
Love it. Just maybe a way to increase font size for large monitors and people (me) who's eyesight is no longer the greatest.

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: OMDB movie parser
« Reply #6 on: April 17, 2017, 03:00 AM »
Love it. Just maybe a way to increase font size for large monitors and people (me) who's eyesight is no longer the greatest.

Please re-download and check the Options menu.  I think this is ready for a website release.  Thanks for the idea.

http://skwire.dcmembers.com/apps/omdb_tool/OMDbTool.zip
« Last Edit: May 27, 2017, 03:22 AM by skwire »

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 144
    • Military Service Badge - US Army
    • Military Service Badge - US Marine Corp
Re: IDEA: OMDB movie parser
« Reply #7 on: April 17, 2017, 03:13 AM »
Looks great. Thanks for the font size change.

Great as is and more than happy to live with this. Only thing that I can see to improve is the series option.

By the way if you do a series option then most of the time I would do a search by entering something like this "Supernatural S10e21".

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: OMDB movie parser
« Reply #8 on: April 17, 2017, 03:28 AM »
Only thing that I can see to improve is the series option.

Did you actually mean the episode option?

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 144
    • Military Service Badge - US Army
    • Military Service Badge - US Marine Corp
Re: IDEA: OMDB movie parser
« Reply #9 on: April 17, 2017, 03:29 AM »
Yes. Episode.

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 144
    • Military Service Badge - US Army
    • Military Service Badge - US Marine Corp
Re: IDEA: OMDB movie parser
« Reply #10 on: May 26, 2017, 08:34 PM »
Error: No API key provided.

-edit

Looks like it might be a bust at this point unless you wanted to add an option for people to be able to put in an API key for the site. As I will never be a donor this is a dead project for me now.

Thanks for making it.

Only other suggestion would be Trakt.com and their use of an API.

http://docs.trakt.apiary.io/#introduction/create-an-app
« Last Edit: May 26, 2017, 09:02 PM by nickodemos »

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: OMDB movie parser
« Reply #11 on: May 27, 2017, 03:24 AM »
Error: No API key provided.

-edit

Looks like it might be a bust at this point unless you wanted to add an option for people to be able to put in an API key for the site. As I will never be a donor this is a dead project for me now.

The API fees were reasonable so we've covered it for the next two years at 100,000 API hits per month.  I'm going to guess this tool isn't too widespread so that should be enough for now.  Download v1.0.1 here:

http://skwire.dcmembers.com/apps/omdb_tool/OMDbTool.zip

Cheers.  =]

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: OMDB movie parser
« Reply #12 on: June 01, 2017, 08:18 PM »
@nickodemos: Any luck with the latest version I released?

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 144
    • Military Service Badge - US Army
    • Military Service Badge - US Marine Corp
Re: IDEA: OMDB movie parser
« Reply #13 on: June 01, 2017, 10:23 PM »
Yeah. Running perfectly. Thought I commented when you posted it but I guess I was happy that it worked again I forgot to.

;D

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: OMDB movie parser
« Reply #14 on: June 01, 2017, 11:04 PM »
Great.  Thanks for the update.  :Thmbsup:

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: IDEA: OMDB movie parser
« Reply #15 on: January 05, 2018, 01:02 AM »
Website | Download
v1.0.2 - 2018-01-04
    + Added "Save as..." and "Auto-save" buttons to make it easier to save data to text files.
    + Moved options from a menu to their own panel.  Choose File > Preferences or press F4.
    * Cleaned up the main interface a bit.

Original address: https://www.donationcoder.com/forum/index.php?topic=43705.0