Jump to content
 
Search In
  • More options...
Find results that contain...
Find results in...

Programmers Corner


Recommended Posts

Here we go again...  So, links like those below don't work anymore?  They worked yesterday...

The json one gives me a "504 Gateway Timeout", while the xml one gives me a "502 Bad Gateway".  Again, they've both been working swell for quite a while.  Hope it's temporary...

https://api.tcm.com/tcmws/v1/schedule/month/us/est/2021-6-17.json

https://api.tcm.com/tcmws/v1/schedule/month/us/est/2021-6-14.xml

 

Link to comment
Share on other sites

For such a big operation they have been more inept across all the bases than I could have ever imagined.  But yes it has not been updated for about a month now.  Ixnay.  I saw this coming as there was a bit of redundancy to it.  Except they chopped off the wrong part!  Now we are down to whatever they pipe at us through the new prototype downstream feed for their website, rather than use the perfectly good mature feed.  Enjoy...

Link to comment
Share on other sites

On 6/16/2021 at 10:57 AM, MovieCollectorOH said:

For such a big operation they have been more inept across all the bases than I could have ever imagined.  But yes it has not been updated for about a month now.  Ixnay.  I saw this coming as there was a bit of redundancy to it.  Except they chopped off the wrong part!  Now we are down to whatever they pipe at us through the new prototype downstream feed for their website, rather than use the perfectly good mature feed.  Enjoy...

Thanks for the reply, OH...  Good to hear from you.  A month?  Hmm...  I've been using the api.tcm.com feed since the new web site layout change without issue - at least for the bits I use.  It's just that all of a sudden, this week it doesn't work at all.  Even if I google "tcm api" none of the how-to links work!  Decision from the top?  Who knows, but if it was technical fault, one would think it would be fixed by now...  : (

So, what are you using?   I seem to recall another api they had - at one point I was comparing it to api,tcm.com.

Link to comment
Share on other sites

7 hours ago, Curtis DeHaven said:

Thanks for the reply, OH...  Good to hear from you.  A month?  Hmm...  I've been using the api.tcm.coi feed since the new web site layout change without issue - at least for the bits I use.  It's just that all of a sudden, this week it doesn't work at all.  Even if I google "tcm api" none of the how-to links work!  Decision from the top?  Who knows, but if it was technical fault, one would think it would be fixed by now...  : (

So, what are you using?   I seem to recall another api they had - at one point I was comparing it to api,tcm.com.

Hi, that is it.  No more.  Now it is just the reduced data for the new-fangled website (no more themes).  I didn't really use the themes myself, I just go movie by movie, but that is not the point - I know many others did.  So having themes included was kind of a nice addition to an already overextended public project for me. 

Now the themes in the data is no more.  The new schedule's data is only missing the themes (though for some of the API files, the file dates appeared to have been there for at least 10 years).  That in itself I find very unusual, as we have been observing the fact that they continued to use themes on a regular basis on their end - ever since November or so last year.  Makes me wonder why somebody there wishes to bury their head in the sand and hide it, I have my own ideas but I won't vent about it here as it will inevitably feed someone else's narcissism.

Link to comment
Share on other sites

2 hours ago, MovieCollectorOH said:

Hi, that is it.  No more.  Now it is just the reduced data for the new-fangled website (no more themes).  I didn't really use the themes myself, I just go movie by movie, but that is not the point - I know many others did.  So having themes included was kind of a nice addition to an already overextended public project for me. 

Now the themes in the data is no more.  The new schedule's data is only missing the themes (though for some of the API files, the file dates appeared to have been there for at least 10 years).  That in itself I find very unusual, as we have been observing the fact that they continued to use themes on a regular basis on their end - ever since November or so last year.  Makes me wonder why somebody there wishes to bury their head in the sand and hide it, I have my own ideas but I won't vent about it here as it will inevitably feed someone else's narcissism.

What do you mean by "themes"?

I had some time to play around with this project today.  I ended up sniffing around with the F12 debugger tool and ended up using the same link they're apparently using for the web site's daily schedule - link below...  At first glance, I see some duplicates this weekend.  They even appear in the web site's schedule - sigh.  Anyway, I can still use it for my needs.

https://tcmws.tcm.com/tcmws/NewSchedule/est

 

Link to comment
Share on other sites

On 6/18/2021 at 9:29 AM, Curtis DeHaven said:

What do you mean by "themes"?

I had some time to play around with this project today.  I ended up sniffing around with the F12 debugger tool and ended up using the same link they're apparently using for the web site's daily schedule - link below...  At first glance, I see some duplicates this weekend.  They even appear in the web site's schedule - sigh.  Anyway, I can still use it for my needs.

https://tcmws.tcm.com/tcmws/NewSchedule/est

 

Thanks. I was using the API for many months until it stopped working this week. Guess I'll have to try parse the link you posted until (maybe) the API comes back.

  • Like 1
Link to comment
Share on other sites

17 hours ago, kaiju said:

Thanks. I was using the API for many months until it stopped working this week. Guess I'll have to try parse the link you posted until (maybe) the API comes back.

Glad to help.   

I don't think this feed (tcmws.tcm.com) has as much data as the older feed (api.tcm.com), but it seems to have enough for my needs.  MovieCollector, above mentioned themes, but it does have at least some of them - the TCM-ese for that would be the element, "Franchise".  The older feed had a more detailed element, "FranchiseUmbrella" (?) that offered sort of a sub-category, but it seems to be missing from this one. 

Interestingly, it does offer two programming schedules, differentiated by the element, "NetworkFeedCode" where its value is either "CAN" (Canada maybe?) or "N".  While they seem to be largely identical I have seen where the programming for "CAN" and "N" are different.  I've been parsing for the "N" programming feed.

The data returned is in JSON.  I prefer XML, so I use a NewtonSoft library to convert the JSON to XML.  At first NewtonSoft complained about the JSON, saying something about how the root element needs to be a single object.  The JSON returned does not have a single root object, but rather is an array of objects, so I add the text strings, '{"programs":' and '}' (minus the single quotes) to the beginning and end of the JSON respectively, creating a single object, "programs" as the root.  After that, it dropped into my application nicely, though I had to change a couple of field names.

Hope this helps...

Link to comment
Share on other sites

That's probably close.  I don't have it up at the moment.  In my case it was just a handful of different commands in a Linux Bash script to build it, and a Cron entry to make it run each day.  Pretty much a set it and forget it type of deal.  I think I took a weekend to figure it out and build what you see there and get it online for the others.  I haven't actually looked at it that deeply or thought about how it works since last November or so.  The same also goes for my "new feed" schedule which is current and up to date:
https://www.moviecollectoroh.com/nightly/sched-new.htm
That one did take a few minor tweaks over time as it evolved, but nothing that major.  The JSON protocol actually keeps things incredibly simple and uniform.  Sounds like you are on track.

Link to comment
Share on other sites

as always the lack of any usable documentation is unfortunate. The new feed seems to not have any of the customization options of the api (such as timezone, number of days, etc) and the individual movies apparently  no longer have Color or even the url link for the movie itself (or the Maltan rating info). Oh well, back to the drawing board.

Link to comment
Share on other sites

29 minutes ago, alfansome said:

as always the lack of any usable documentation is unfortunate. The new feed seems to not have any of the customization options of the api (such as timezone, number of days, etc) and the individual movies apparently  no longer have Color or even the url link for the movie itself (or the Maltan rating info). Oh well, back to the drawing board.

Hover your mouse over the titles on my "new feed" schedule and you can see what I did for URLs.
https://www.moviecollectoroh.com/nightly/sched-new.htm

Link to comment
Share on other sites

 Share

© 2023 Turner Classic Movies Inc. A Time Warner Company. All Rights Reserved Terms of Use | Privacy Policy | Cookie Settings
×
×
  • Create New...