topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 6:27 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: OMDB movie parser  (Read 14344 times)

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
IDEA: OMDB movie parser
« on: April 09, 2017, 12: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.ss...kwOQ@@._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

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: OMDB movie parser
« Reply #1 on: April 09, 2017, 02: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.pngIDEA: OMDB movie parser

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

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: OMDB movie parser
« Reply #2 on: April 09, 2017, 03:46 AM »
Added a bit more functionality.

2017-04-09_034703.pngIDEA: OMDB movie parser

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: IDEA: OMDB movie parser
« Reply #3 on: April 09, 2017, 08:13 AM »
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

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: OMDB movie parser
« Reply #4 on: April 11, 2017, 01: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.dcmemb...db_tool/OMDbTool.zip

2017-04-11_132918.pngIDEA: OMDB movie parser
« Last Edit: May 26, 2017, 10:21 PM by skwire »

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: IDEA: OMDB movie parser
« Reply #5 on: April 11, 2017, 05: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

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: OMDB movie parser
« Reply #6 on: April 16, 2017, 10:00 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.

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 26, 2017, 10:22 PM by skwire »

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: IDEA: OMDB movie parser
« Reply #7 on: April 16, 2017, 10:13 PM »
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

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: OMDB movie parser
« Reply #8 on: April 16, 2017, 10:28 PM »
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: 145
    • View Profile
    • Donate to Member
Re: IDEA: OMDB movie parser
« Reply #9 on: April 16, 2017, 10:29 PM »
Yes. Episode.

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: IDEA: OMDB movie parser
« Reply #10 on: May 26, 2017, 03: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.ap...uction/create-an-app
« Last Edit: May 26, 2017, 04:02 PM by nickodemos »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: OMDB movie parser
« Reply #11 on: May 26, 2017, 10:24 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.

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

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: OMDB movie parser
« Reply #12 on: June 01, 2017, 03:18 PM »
@nickodemos: Any luck with the latest version I released?

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: IDEA: OMDB movie parser
« Reply #13 on: June 01, 2017, 05: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

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: OMDB movie parser
« Reply #14 on: June 01, 2017, 06:04 PM »
Great.  Thanks for the update.  :Thmbsup:

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: OMDB movie parser
« Reply #15 on: January 04, 2018, 07:02 PM »
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.