My first Channel (mst3k.bundle) had a simple target, one in which each URL of interest (basically, link to YouTube video) was embedded in plaintext on the original, user-viewed page. I’d like to take my understanding to the next level, in particular targeting sites with non-apparent video urls. WebVideoURL would probably dispense with the need for such knowledge, but I understand it is no longer around. Unfortunately (as noted elsewhere), Plex Channel plugin development’s documentation, such as it is, is dated and somewhat hidden – found it on 3rd party site a couple of weeks before stumbling upon it in Plex Forum. (It would be nice if someone at Plex would coalesce/update the docs in a GitHub Wiki, for example located at github.com/plexinc. I’ll even throw in a gift certificate to Sweet Pea’s. )
At any rate, seems clear that to make significant headway with Plex channel development one really has to (1) study bundle code, and (2) review development forum messages. To that end, I’ve begun looking at some of the major network channel bundles.
Take ABC.bundle, for example. The channel code itself is pretty straightforward, BUT I am noticing the real secret sauce appears to be PRIOR background work to undercover the relevant urls to call (to then retrieve, e.g., via JSON.ObjectFromURL, JSON data containing the real urls for target videos):
Besides combing the source HTML, I’ve looked at a few of the web API calls (e.g., on http://abc.go.com/shows) and the returned JSON, but I’m not seeing anything corresponding to the above. So how, EXACTLY, was that and other deep links teased out from ABC.com (and similar sites)? Thanks.
I can’t say for ABC channel, but judging by the example code you’ve posted above, it’s highly specific and as such prone to break, although apart from some numeric IDs hardcoded, those are actually URL templates - note the %ss in the strings. If the channel you want to study shows signs its creators used some arcane knowledge to make it work, I’d suggest to try examine some other channel code for starters
Generally, when you develop a channel, you need to examine the browser’s Network tab to look for any API calls, find out where they originate from (Javascript, Flash, etc), study source and replicate that in the channel.
As for the web documentation, the one that we used to have had exactly the same scope as the one attached in a sticky thread here in PDF format, just maybe a bit newer or older, so apart from the searching comfort, you aren’t missing out on anything, I think.
Thanks sander1, that was one of my (top) working theories.
I had scoped out some of my target stuff (on CNBC.com) with WireShark, watching Flash Manifest & Fragments being returned from otherwise hidden URLs (with Chrome browser set to iOS user agent). However, those video fragments have been coming from theplatform.com or from akami servers, so I’ve set that strategy aside for the time being (because what I really need is link to JSON or XML with list of video URLs).
In passing I note that approaching stuff like ABC.com (i.e., deeply hidden JSON) by looking for API calls in Chrome’s Developer XHR tab was non-productive for my target. I found a few JSONs that way, but they were not the JSONs I was looking for. I’m looking for ones with URLs to actual video files of interest, and those are not showing up in XHR’d API calls (for this target).
I’m already running Squid for other (vpn/ad-blocking/Privoxy) reasons. So I think I need to scratch same machine WireShark sniffing, scratch XHR API sniffing from Chrome, and just do verbose capture my target’s http traffic … and I think I’ll try it from my real iPad going thru my Squid.
And sorry for my silence/delay on this thread, I’ve been very “head down” with my latest tech binge, PBX/VOIP/SIP/IAX. Just taking a break from that now.