TV Listing API :JSON HELP?

Anyone know of a “free” web service where I can download the current TV schedule information for various streaming services such as SlingTV, ChannelMaster as well as local OTA (over the air) broadcasts. I have found various website that display the data, but I want to be able to filter arrange manipulate etc. Especially since some of them show the East Coast Times which confuses us poor West Coast people :slight_smile:

Ok… I found a few service to obtain what looks like the data I want… but it returns a JSON file about 300K in size … But I cannot figure out how to parse it. Since I am not sure of the “structure”, the JSON examples in the Xojo docs are not much help.

I do see there is a lot of data that I’m probably NOT going to care about, but there is a lot I do.

I would like to parse it into an SQLite database, and then use it from there

Can anyone take some time to give me some examples that apply to this exact situation?

here is a link to the data

http://api.tvmaze.com/schedule?country=US&date=2016-07-13

There are json editors around. Grab one and have a look so that you can recognize the structure visually a bit. At first glance the TV json looks rather hierarchical.

There seems to be an array of shows on the top level. With an ID, an URL and lots of other stuff. Try to parse the array first and then figure out what else is of interest to you.

Thanks… That helped ALOT

PAW

perhaps if I could speak or read German that might mean something to me, but thanks

You can change (of course) the language of the Page at the bottom of it (or by removing the /de pRt in the URL: https://luckymarmot.com/paw :wink:

Thanks… and perhaps you can change the language… if I knew enough German to determine that, but I don’t, and from the pictures I see nothing that applies to the question I asked, and the Beatrix helped point me to an answer for… .But again, Thanks

I obtained PAW in one of those multiple Mac program deals (rarely use them these days) but PAW has been a lifesaver for me with Web API stuff. +1 for PAW

This one seems helpful:
http://codebeautify.org/jsonviewer

complex JSON data is not very easy to understand by eye
It suggests that the data is grouped into
‘root’
–containing an ‘array’
of things containing these items of interest:

id : 851596

url : http://www.tvmaze.com/episodes/851596/nightline-2016-07-12-episode-138

name : Episode 138

season : 2016

number : 138

airdate : 2016-07-12

airtime : 00:37

airstamp : 2016-07-13T00:37:00-04:00

runtime : 30

image : null

summary :

show… another Json structure holding the show name, type, schedule and so on.

This is a single array element:

[code]{“id”:851596,“url”:“http://www.tvmaze.com/episodes/851596/nightline-2016-07-12-episode-138",“name”:"Episode 138”,“season”:2016,“number”:138,“airdate”:“2016-07-12”,“airtime”:“00:37”,“airstamp”:“2016-07-13T00:37:00-04:00”,“runtime”:30,“image”:null,“summary”:"",“show”:

{“id”:7500,“url”:“http://www.tvmaze.com/shows/7500/nightline",“name”:“Nightline”,“type”:“News”,“language”:“English”,“genres”:[],“status”:“Running”,“runtime”:30,“premiered”:“2004-10-30”,“schedule”:{“time”:“00:37”,“days”:[“Monday”,“Tuesday”,“Wednesday”,“Thursday”,“Friday”]},“rating”:{“average”:null},“weight”:0,“network”:{“id”:3,“name”:“ABC”,“country”:{“name”:"United States”,“code”:“US”,“timezone”:“America/New_York”}},“webChannel”:null,“externals”:{“tvrage”:null,“thetvdb”:71392,“imdb”:null},“image”:{“medium”:“http://tvmazecdn.com/uploads/images/medium_portrait/27/69482.jpg",“original”:“http://tvmazecdn.com/uploads/images/original_untouched/27/69482.jpg”},“summary”:"

“Nightline” is a half-hour program provides viewers with
in-depth reporting on one or more of the major stories in the news,
with occasional segments on pop culture. Journalists Dan Harris, Juju
Chang and Byron Pitts share hosting duties for this late-night program.

”,“updated”:1467329398,"_links":{“self”:{“href”:“http://api.tvmaze.com/shows/7500"},“previousepisode”:{“href”:“http://api.tvmaze.com/episodes/851596”},“nextepisode”:{“href”:"http://api.tvmaze.com/episodes/851597”}}},

“_links”:{“self”:{“href”:“http://api.tvmaze.com/episodes/851596”}}}[/code]

If it were XML it would look like this:

<?xml version="1.0" encoding="UTF-8" ?>
<id>851596</id>
<url>http://www.tvmaze.com/episodes/851596/nightline-2016-07-12-episode-138</url>
<name>Episode 138</name>
<season>2016</season>
<number>138</number>
<airdate>2016-07-12</airdate>
<airtime>00:37</airtime>
<airstamp>2016-07-13T00:37:00-04:00</airstamp>
<runtime>30</runtime>
<image />
<summary></summary>
<show>
    <id>7500</id>
    <url>http://www.tvmaze.com/shows/7500/nightline</url>
    <name>Nightline</name>
    <type>News</type>
    <language>English</language>
    <status>Running</status>
    <runtime>30</runtime>
    <premiered>2004-10-30</premiered>
    <schedule>
        <time>00:37</time>
        <days>Monday</days>
        <days>Tuesday</days>
        <days>Wednesday</days>
        <days>Thursday</days>
        <days>Friday</days>
    </schedule>
    <rating>
        <average />
    </rating>
    <weight>0</weight>
    <network>
        <id>3</id>
        <name>ABC</name>
        <country>
            <name>United States</name>
            `US`
            <timezone>America/New_York</timezone>
        </country>
    </network>
    <webChannel />
    <externals>
        <tvrage />
        <thetvdb>71392</thetvdb>
        <imdb />
    </externals>
    <image>
        <medium>http://tvmazecdn.com/uploads/images/medium_portrait/27/69482.jpg</medium>
        <original>http://tvmazecdn.com/uploads/images/original_untouched/27/69482.jpg</original>
    </image>
    <summary>
        <p>
            <strong>
                <em>"Nightline"</em>
            </strong> is a half-hour program provides viewers with
 in-depth reporting on one or more of the major stories in the news, 
with occasional segments on pop culture. Journalists Dan Harris, Juju 
Chang and Byron Pitts share hosting duties for this late-night program.
        </p>
    </summary>
    <updated>1467329398</updated>
    <_links>
        <self>
            <href>http://api.tvmaze.com/shows/7500</href>
        </self>
        <previousepisode>
            <href>http://api.tvmaze.com/episodes/851596</href>
        </previousepisode>
        <nextepisode>
            <href>http://api.tvmaze.com/episodes/851597</href>
        </nextepisode>
    </_links>
</show>
<_links>
    <self>
        <href>http://api.tvmaze.com/episodes/851596</href>
    </self>
</_links>

I entered the URL into PAW and can now easily investigate the JSON Output. PAW can even generate the needed Xojo Code (old and new Framework) to pull the Data from the Web.

This was just to show how PAW could help. Anyway, glad that Beatrix Post helped :slight_smile:

Again… websites not in English do not help us poor Americans not educated in languages other than English…
Being in German, I had no way to tell what it was…Looked like it might have been a simple FTP client.

I was finally able to parse the data… only to find out it is far from complete… is only has shows that air between 8pm and 10pm even though they infer it is a complete schedule… So now I have to see if I can find another source

That’s because the /de/ in the url.
https://luckymarmot.com/paw is in English

[quote=277007:@Marco Hof]That’s because the /de/ in the url.
https://luckymarmot.com/paw is in English[/quote]
Well actually no it doesn’t, it simply redirects to the GERMAN page. But no offense guys… we can stop beating this dead horse. What ever PAW is or is not, I have what I need…

Marco… TVMAZE was mentioned (complete with a link) in my 2nd posting, and as I mentioned, it is NOT complete… it lists all the channels but only one or two shows each… not the daily schedule as required.

[quote=277008:@Dave S]Well actually no it doesn’t, it simply redirects to the GERMAN page. But no offense guys… we can stop beating this dead horse. What ever PAW is or is not, I have what I need…

Marco… TVMAZE was mentioned (complete with a link) in my 2nd posting[/quote]
I noticed it. sorry. You were faster than my edit. :slight_smile: