BobSammers wrote: > I was wondering whether it would be possible to bridge the gap between > the array / list mismatch, defaults, etc., massaging the JSON output > into a format that the existing parsers would all understand because it > mimicked the output of the XML reader. Whether this is feasible seems, > unfortunately, to be a moot point, if all the relevant feeds have been > removed. JSON maps better to Perlo data structure whereas with XML you have to direct parser as to wther data should be an arry or a hash. BCC developed XML well before JSON and so parsers used XML and then migrated to JSON. Point is moot - BBC have changed so that data layout is now done infront end application and html is pushed to browser because there are now iOS and Android Apps to support and the architecture had to change.
> For the ".inc" feed that remains, it looks like an HTML reader is what > would be needed now, unless the XML reader can be made to understand it. > The HTML that is sent does appear to be a well-formed (in the XML sense > and when it is enclosed in a single root element) fragment of HTML > rather than a complete web page. Without all the guff that web pages > normally come with, perhaps this would be less onerous to process and (I > hesitate to suggest) not really screen scraping in the usually > understood sense of the phrase. Extras started off parsing HTML pages using XMLin but it was simple formatting . It was painful then and it would be going back full circle only this time the formatting is much more convoluted and I just don't have the time. With html the data is not tagged with its meaning - it is just tagged as to where it is to be formatted. For example, at present with the ".inc" - to determine if a program is available in iPlayer - you need to find the program and then check (i.e. scan many different html tags looking for a specific sequence) if there is an overlay graphic (the pink thing) on the program icon OR if the text "episodes available" is in a specific location as opposed to the XML version which is parsed in one line, programs are hash keys each of which had a boolean which is called something like "episodesavailable". BBC keeps promising a new 3rd party API (checkout Nitro which is used by Android app) but haven't provided keys to public even though it was promised in 2015. ------------------------------------------------------------------------ bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806 View this thread: http://forums.slimdevices.com/showthread.php?t=72709 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/plugins
