Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #77118

Re: Python conquors the BBC [was Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?]

References (2 earlier) <9f7fceb8-cb57-4525-a9a4-e9bc83c05ed2@googlegroups.com> <53fd2083$0$30001$c3e8da3$5496439d@news.astraweb.com> <5f5e1c19-a731-4de1-aa09-fc773605546a@googlegroups.com> <mailman.13483.1409098894.18130.python-list@python.org> <a8c31b2c-910c-4f15-bf94-d478f5fe7495@googlegroups.com>
Date 2014-08-27 10:12 +0200
Subject Re: Python conquors the BBC [was Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?]
From Chris “Kwpolska” Warrick <kwpolska@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.13500.1409127129.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, Aug 27, 2014 at 2:58 AM, Twirlip2 <ahrodg@googlemail.com> wrote:
> It just pulls a lot of HTML and XML from the website, and extracts the
> addresses of various other pages, and eventually *.WMA streams, and
> hands the stream URLs over to XMPlay <http://www.un4seen.com/>.
>
> It 'knows' what pages to visit, because I have manually built up a plain
> text file containing a list of (at the moment) 274 BBC radio programmes,
> represented by 579 different mnemonic key strings - of which the user
> only needs to type in a sufficiently long initial segment to disambiguate.
>
> Anyone else could use the same list, or build up their own, or use mine as
> a basis for their own. (I just maintain it using a text editor.  I haven't
> [yet] attempted to do any database programming.)
>
> I have plenty of ideas for improving the program, but first I have to
> re-organise the present spaghetti code in a more logical fashion.

I have a better idea: use an existing solution.  get_iplayer, to be precise.

See here: http://www.infradead.org/get_iplayer/html/get_iplayer.html

It’s written in Perl.  They claim to have a Windows installer.  I have
not tested the Windows thing, but it worked fine when I set it up on
Linux, and managed to download a radio programme on August 12th.

Sample usage (on Linux, you might need to adjust for no grep)

$ get_iplayer --type=radio --refresh | grep 'Chris Evans'
12876:  The Chris Evans Breakfast Show - Borrowing Boyfriends, BBC
Radio 2, Discussion & Talk Shows,Entertainment,Music,Radio
12877:  The Chris Evans Breakfast Show - 21/08/2014, BBC Radio 2,
Discussion & Talk Shows,Entertainment,Music,Radio
12878:  The Chris Evans Breakfast Show - Peter Capaldi, Daniel
Radcliffe, Jon Hamm and Ruby Turner, BBC Radio 2, Discussion & Talk
Shows,Entertainment,Music,Radio
12879:  The Chris Evans Breakfast Show - John Bishop sits in, BBC
Radio 2, Discussion & Talk Shows,Entertainment,Music,Radio
12880:  The Chris Evans Breakfast Show - Babooshka!, BBC Radio 2,
Discussion & Talk Shows,Entertainment,Music,Radio
$ get_iplayer --type=radio 12878 --get

And kaboom, #12878, "Peter Capaldi, Daniel Radcliffe, Jon Hamm and
Ruby Turner", is downloaded and stored on your hard drive.

-- 
Chris “Kwpolska” Warrick <http://chriswarrick.com/>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Twirlip2 <ahrodg@googlemail.com> - 2014-08-26 11:01 -0700
  Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Terry Reedy <tjreedy@udel.edu> - 2014-08-26 14:46 -0400
    Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Twirlip2 <ahrodg@googlemail.com> - 2014-08-26 12:20 -0700
      Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Twirlip2 <ahrodg@googlemail.com> - 2014-08-26 12:44 -0700
        Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Twirlip2 <ahrodg@googlemail.com> - 2014-08-26 12:58 -0700
          Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-26 21:15 +0100
        Re: IDLE has suddenly become FAWLTY - so should I be hitting it with   a big stick, or what? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-08-27 10:03 +1200
          Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Twirlip2 <ahrodg@googlemail.com> - 2014-08-26 15:55 -0700
            Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Twirlip2 <ahrodg@googlemail.com> - 2014-08-27 08:25 -0700
          Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-27 10:01 +1000
            Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Twirlip2 <ahrodg@googlemail.com> - 2014-08-26 17:06 -0700
            Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Chris Angelico <rosuav@gmail.com> - 2014-08-27 10:18 +1000
        Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-08-27 00:20 +0100
          Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Twirlip2 <ahrodg@googlemail.com> - 2014-08-26 16:29 -0700
            Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Terry Reedy <tjreedy@udel.edu> - 2014-08-26 20:51 -0400
              Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Twirlip2 <ahrodg@googlemail.com> - 2014-08-26 18:11 -0700
                Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Terry Reedy <tjreedy@udel.edu> - 2014-08-27 00:03 -0400
                Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Twirlip2 <ahrodg@googlemail.com> - 2014-08-27 02:12 -0700
    Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Twirlip2 <ahrodg@googlemail.com> - 2014-08-26 12:26 -0700
      Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Zachary Ware <zachary.ware+pylist@gmail.com> - 2014-08-26 14:46 -0500
  Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Grant Edwards <invalid@invalid.invalid> - 2014-08-26 18:59 +0000
  Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Chris Angelico <rosuav@gmail.com> - 2014-08-27 09:07 +1000
    Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Twirlip2 <ahrodg@googlemail.com> - 2014-08-26 16:25 -0700
      Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what? Chris Angelico <rosuav@gmail.com> - 2014-08-27 09:42 +1000
      Python conquors the BBC [was Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-27 10:04 +1000
        Re: Python conquors the BBC [was Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?] Twirlip2 <ahrodg@googlemail.com> - 2014-08-26 17:08 -0700
          Re: Python conquors the BBC [was Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?] Chris Angelico <rosuav@gmail.com> - 2014-08-27 10:21 +1000
            Re: Python conquors the BBC [was Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?] Twirlip2 <ahrodg@googlemail.com> - 2014-08-26 17:58 -0700
              Re: Python conquors the BBC [was Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?] Twirlip2 <ahrodg@googlemail.com> - 2014-08-26 18:06 -0700
              Re: Python conquors the BBC [was Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?] Chris Angelico <rosuav@gmail.com> - 2014-08-27 12:36 +1000
                Re: Python conquors the BBC [was Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?] Rustom Mody <rustompmody@gmail.com> - 2014-08-26 20:13 -0700
                Re: Python conquors the BBC [was Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?] Chris Angelico <rosuav@gmail.com> - 2014-08-27 14:55 +1000
                Re: Python conquors the BBC [was Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?] Twirlip2 <ahrodg@googlemail.com> - 2014-08-27 01:50 -0700
              Re: Python conquors the BBC [was Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?] Chris “Kwpolska” Warrick <kwpolska@gmail.com> - 2014-08-27 10:12 +0200
                Re: Python conquors the BBC [was Re: IDLE has suddenly become FAWLTY - so should I be hitting it with a big stick, or what?] Twirlip2 <ahrodg@googlemail.com> - 2014-08-27 02:04 -0700

csiph-web