Hello,

On Sun, 25 Feb 2018, Stroller wrote:
>> On 25 Feb 2018, at 21:00, David Haller <[email protected]> wrote:
>> ... 
>>> I would have assumed the podcast feed (RSS or whatever?) would
>>> contain both the link to the episode, with a filename like this, and
>>> also a human readable name, such as "Episode #566 - The Zoo Economy".
>> 
>> $ youtube-dl --download-archive .yt-dl-archive -f mpeg 
>> 'https://www.npr.org/rss/podcast.php?id=510289'
[..]
>> $ 
>> 
>> The --download-archive .yt-dl-archive records the already-downloaded
>> media (their source (npr) and ids) in the file .yt-dl-archive in the
>> current directory (adjust path to your liking...)
>
>That's miles better, thanks.

I forgot: I had to add the '-f mpeg' option+arg, which normally is not
neccessary with youtube-dl, but I got this error,
(probably because I specified some formats in the config):

$ yt-dl 'https://www.npr.org/rss/podcast.php?id=510289'
[generic] podcast: Requesting header
WARNING: Falling back on generic information extractor.
[generic] podcast: Downloading webpage
[generic] podcast: Extracting information
[download] Downloading playlist: Planet Money
[generic] playlist Planet Money: Collected 300 video ids (downloading 300 of 
them)
[download] Downloading video 1 of 300
[generic] 20180223_pmoney_pmpod826: Requesting header
[redirect] Following redirect to 
https://16543.mc.tritondigital.com:443/NPR_510289/media-session/6e22c004-4ae9-44ef-a8f3-fb8b7d1175fd/anon.npr-mp3/npr/pmoney/2018/02/20180223_pmoney_pmpod826.mp3?orgId=1&d=1227&p=510289&story=588345420&t=podcast&e=588345420&ft=pod&f=510289
[generic] 20180223_pmoney_pmpod826: Requesting header
ERROR: requested format not available

So, I ran it with '-F' to check available formats:

$ yt-dl -F 'https://www.npr.org/rss/podcast.php?id=510289'
[generic] podcast: Requesting header
WARNING: Falling back on generic information extractor.
[generic] podcast: Downloading webpage
[generic] podcast: Extracting information
[download] Downloading playlist: Planet Money
[generic] playlist Planet Money: Collected 300 video ids (downloading 300 of 
them)
[download] Downloading video 1 of 300
[generic] 20180223_pmoney_pmpod826: Requesting header
[redirect] Following redirect to 
https://16543.mc.tritondigital.com:443/NPR_510289/media-session/0f30aa0c-1995-432c-b33a-f431b41e2155/anon.npr-mp3/npr/pmoney/2018/02/20180223_pmoney_pmpod826.mp3?orgId=1&d=1227&p=510289&story=588345420&t=podcast&e=588345420&ft=pod&f=510289
[generic] 20180223_pmoney_pmpod826: Requesting header
[info] Available formats for 20180223_pmoney_pmpod826:
format code  extension  resolution note
mpeg         mp3        audio only 
[download] Downloading video 2 of 300
^C
ERROR: Interrupted by user

Relevant:

[info] Available formats for 20180223_pmoney_pmpod826:
format code  extension  resolution note
mpeg         mp3        audio only 

So, there I went with '-f mpeg' ;)

>> And 'https://www.npr.org/rss/podcast.php?id=510289' is the url you get
>> if you subscribe to the podcast.
>
>Where did you find this, please? On NPR's site? I seem to be finding loads of 
>different URLs for it on there.

I went to: https://www.npr.org/sections/money/ clicked on "subscribe
to podcast" at the top under the section-logo which took me to
https://www.npr.org/sections/money/ and because I'm "paranoid", I
looked at the sourcecode of the big blue "Subscribe" button and found
this:

====
    <li class="subscribe" data-sharepop="" data-selector=".sharepop.subscribe">
      <button data-metrics="{&quot;category&quot;:&quot;podcast 
directory&quot;,&quot;action&quot;:&quot;toggle subscribe 
menu&quot;}">subscribe<b> to podcast</b></button>
    </li>
    <div class="sharepop-four">
  [..]
                <li>
                  <a target="_blank" 
href="https://www.npr.org/templates/rss/podcast.php?id=510289"; 
data-metrics="...">RSS link</a></li>
            </ul>
        </div>
    </div>
====

Ok, I activated JS now and clicked on the button, which is a drop-down
and the last is the above "RSS link" and clicking on it took me to the
rss feed https://www.npr.org/rss/podcast.php?id=510289, same as
opening the url from the source-code.

Seamonkey (and Thunderbird?) shows a "subscribe" feed UI, but looking
at the "source" of that, I get a pretty normal RSS file listing the
info and URLs to the mp3 streams.

Parsing the rss yourself would not be that hard either ;) But all the
bookeeping of what you already have, handling renaming, etc...

HTH,
-dnh

-- 
Machine Always Crashes, If Not, The Operating System Hangs (MACINTOSH)
        -- Topic on #Linux

Reply via email to