Re: Shell script to get PIDs from schedules

2014-11-02 Thread Chris Allison
Sorry, google switched back to html without me noticing, resending this. Peter, some good ideas there, but there is no need to scrape the web pages when all the schedule info you could possibly need is available in xml, json and yaml files at urls of this form:

Re: Shell script to get PIDs from schedules

2014-11-02 Thread Charles Johnson
On 02/11/14 08:52, Chris Allison wrote: Peter, some good ideas there, but there is no need to scrape the web pages when all the schedule info you could possibly need is available in xml, json and yaml files at urls of this form: www.bbc.co.uk/radio4/programmes/schedules/fm/this_week.json

Re: Shell script to get PIDs from schedules

2014-11-02 Thread Roger Bell_West
On Sun, Nov 02, 2014 at 08:52:09AM +, Chris Allison wrote: some good ideas there, but there is no need to scrape the web pages when all the schedule info you could possibly need is available in xml, json and yaml files at urls of this form:

Re: Shell script to get PIDs from schedules

2014-11-02 Thread Terry L. Ridder
Hello I may have missed something , but where is there any mention of the www.bbc.co.uk website programme schedules going away? This will be sorted out. I am a happy camper, the Sunday morning programs came down as normal and pain levels are manageable today, so all is good with the world.

Re: Shell script to get PIDs from schedules

2014-11-02 Thread Roger Bell_West
On Sun, Nov 02, 2014 at 09:10:57AM -0600, Terry L. Ridder wrote: I may have missed something , but where is there any mention of the www.bbc.co.uk website programme schedules going away? As I said in the mail that you quoted, it's in the HTTP headers when you request the actual schedules. It's

Re: Shell script to get PIDs from schedules

2014-11-02 Thread Jeremy Nicoll - ml get_iplayer
Terry L. Ridder artisticfo...@gmail.com wrote: Hello I may have missed something , but where is there any mention of the www.bbc.co.uk website programme schedules going away? You've missed this: if a computer program grabs website pages and 'scrapes' them, which is to say wades through all the

Re: Shell script to get PIDs from schedules

2014-11-02 Thread artisticforge .
Hello; checking with wireshark, only the json and xml versions have the warning. so yes, JSON and XML may go away at anytime but HTML will still be there. So parsing the HTML will not as easy as JSON or XML; the parsing should still provide the same results. So using the schedules is still a

Re: Shell script to get PIDs from schedules

2014-11-02 Thread artisticforge .
hello; JSON, XML and YAML, all have the following in the header sent by the server which most people would never see. HTTP/1.1 200 OK Server: Apache Content-Type: application/x-yaml Access-Control-Allow-Origin: * X-PAL-Host: pal131.telhc.bbc.co.uk:80 X-UA-Compatible: IE=edge

Re: Shell script to get PIDs from schedules

2014-11-02 Thread Dirk Husemann
this one seems to work: % curl -v -v http://www.bbc.co.uk/iplayer/js/episode/b04nhkz9 GET /iplayer/js/episode/b04nhkz9 HTTP/1.1 User-Agent: curl/7.37.1 Host: www.bbc.co.uk Accept: */* HTTP/1.1 200 OK * Server Apache is not blacklisted Server: Apache Content-Type: application/json Etag:

Re: Shell script to get PIDs from schedules

2014-11-02 Thread Sharon Kimble
Charles Johnson cehjohn...@gmail.com writes: On 02/11/14 08:52, Chris Allison wrote: Peter, some good ideas there, but there is no need to scrape the web pages when all the schedule info you could possibly need is available in xml, json and yaml files at urls of this form:

Re: Shell script to get PIDs from schedules

2014-11-02 Thread Jeremy Nicoll - ml get_iplayer
Dirk Husemann dirk+getipla...@d2h.net wrote: this one seems to work: % curl -v -v http://www.bbc.co.uk/iplayer/js/episode/b04nhkz9 GET /iplayer/js/episode/b04nhkz9 HTTP/1.1 Interesting, but not a schedule. You already knew the pid... -- Jeremy Nicoll - my opinions are my own.

Re: Shell script to get PIDs from schedules

2014-11-02 Thread Jeremy Nicoll - ml get_iplayer
Sharon Kimble boudic...@skimble.plus.com wrote: Thanks for this Charles. With your last command --8---cut here---start-8--- wget -q -O - http://www.bbc.co.uk/radio4/programmes/schedules/fm/this_week.json | jq '.[] | .[] | .[] | .[] | .programme as $P |

Re: Shell script to get PIDs from schedules

2014-11-02 Thread Dirk Husemann
On 2014-11-02 19:49, Jeremy Nicoll - ml get_iplayer wrote: Dirk Husemann dirk+getipla...@d2h.net wrote: this one seems to work: % curl -v -v http://www.bbc.co.uk/iplayer/js/episode/b04nhkz9 GET /iplayer/js/episode/b04nhkz9 HTTP/1.1 Interesting, but not a schedule. You already knew the

Re: Shell script to get PIDs from schedules

2014-11-02 Thread Jeremy Nicoll - ml get_iplayer
Dirk Husemann dirk+getipla...@d2h.net wrote: On 2014-11-02 19:49, Jeremy Nicoll - ml get_iplayer wrote: Interesting, but not a schedule. You already knew the pid... which you can get from the iplayer guide page: http://www.bbc.co.uk/iplayer/guide/bbc/20141029 Yes, but the point of the thread

Re: Shell script to get PIDs from schedules

2014-11-02 Thread Charles Johnson
On 02/11/14 18:47, Sharon Kimble wrote: --8---cut here---start-8--- wget -q -O - http://www.bbc.co.uk/radio4/programmes/schedules/fm/this_week.json | jq '.[] | .[] | .[] | .[] | .programme as $P | $P.display_titles.title,$P.short_synopsis,$P.pid' | tail

Re: Shell script to get PIDs from schedules

2014-11-02 Thread Dirk Husemann
On 2014-11-02 20:22, Jeremy Nicoll - ml get_iplayer wrote: Dirk Husemann dirk+getipla...@d2h.net wrote: On 2014-11-02 19:49, Jeremy Nicoll - ml get_iplayer wrote: Interesting, but not a schedule. You already knew the pid... which you can get from the iplayer guide page: