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?]

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <kwpolska@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; '(at': 0.04; 'subject:IDLE': 0.04; 'subject:Python': 0.06; 'linux,': 0.07; 'plenty': 0.07; 'utf-8': 0.07; 'bishop': 0.09; 'editor.': 0.09; 'fashion.': 0.09; 'subject: [': 0.09; 'cc:addr:python-list': 0.11; 'stored': 0.12; '<>.': 0.14; 'windows': 0.15; 'attempted': 0.16; 'grep': 0.16; 'idea:': 0.16; 'perl.': 0.16; 'segment': 0.16; 'wrote:': 0.18; 'discussion': 0.18; 'wed,': 0.18; 'solution.': 0.20; 'written': 0.21; 'aug': 0.22; 'pages,': 0.22; 'cc:addr:python.org': 0.22; 'logical': 0.24; 'own.': 0.24; 'fine': 0.24; 'initial': 0.24; "haven't": 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'daniel': 0.26; 'downloaded': 0.26; 'header :In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'xml': 0.29; 'message-id:@mail.gmail.com': 0.30; 'program,': 0.31; 'code': 0.31; '(on': 0.31; 'own,': 0.31; 'subject:what': 0.31; 'anyone': 0.31; 'file': 0.32; 'text': 0.33; 'worked': 0.33; 'addresses': 0.33; 'plain': 0.33; 'sense': 0.34; 'subject:the': 0.34; 'could': 0.34; 'subject:with': 0.35; 'skip:s 30': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'adjust': 0.36; 'url:org': 0.36; 'list': 0.37; 'improving': 0.38; 'mine': 0.38; 'list,': 0.38; 'eventually': 0.60; 'manually': 0.60; 'radio': 0.60; 'august': 0.61; 'john': 0.61; 'from:charset:utf-8': 0.61; 'first': 0.61; 'here:': 0.62; 'show': 0.63; 'more': 0.64; 'different': 0.65; 'programme': 0.65; 'skip:\xe2 10': 0.65; 'sample': 0.67; 'containing': 0.69; '8bit%:43': 0.74; 'drive.': 0.84; 'it\xe2\x80\x99s': 0.84; 'subject:BBC': 0.84; 'visit,': 0.84; 'thing,': 0.91; 'hands': 0.96
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=yNIf2AyZQf/ndjfCPL7Pm0g1ISdLsy4sgo6ALnJLspE=; b=bZwhVE7W1uOAl/86siOtBYmmWY5d/VVf9xfD8JAHtrC+OKJgI9oeaI+qjD0YcVp9O7 ppJqsqOVigf/yvI07V2ETdhyp0xUezPxAlgDW8gzrQIkkOnaqSoiq4lkKdwmAQFKRc8E iqLDzpipXR99CXj2dOUmPx2CAso89OYjZwiysfCfpJxZXJmyLLC1g4PB5s/oKAzIMpdO yYPHiMzYOC96WxwpBl1LMEaFKfdiIsPps4XWViTJKoF3fSWsDoiGzpJH7dGbqY7qRRcS /6tKCWzGu0a7sZ8vDcvR1hZ1ShOTL6wAZQsFQ+Cs8bmXzQwF45d2tQtWbhRTaAbqyKaV xvMw==
MIME-Version 1.0
X-Received by 10.43.75.7 with SMTP id yy7mr13828446icb.15.1409127127342; Wed, 27 Aug 2014 01:12:07 -0700 (PDT)
In-Reply-To <a8c31b2c-910c-4f15-bf94-d478f5fe7495@googlegroups.com>
References <4eec9365-4103-4474-a47f-ea665b265b1e@googlegroups.com> <mailman.13479.1409094426.18130.python-list@python.org> <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 Wed, 27 Aug 2014 10:12:07 +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>
To Twirlip2 <ahrodg@googlemail.com>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.13500.1409127129.18130.python-list@python.org> (permalink)
Lines 53
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1409127129 news.xs4all.nl 2897 [2001:888:2000:d::a6]:59797
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:77118

Show key headers only | 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