Gentoo Archives: gentoo-user

From: David Haller <gentoo@×××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] media-sound/podracer doesn't name downloaded podcasts
Date: Sun, 25 Feb 2018 21:00:55
Message-Id: 20180225210035.bkg22je25j7votla@grusum.endjinn.de
In Reply to: Re: [gentoo-user] media-sound/podracer doesn't name downloaded podcasts by Stroller
1 Hello,
2
3 On Sun, 25 Feb 2018, Stroller wrote:
4 >> On 25 Feb 2018, at 14:40, David M. Fellows <fellows@×××.ca> wrote:
5 >>>
6 >>> However the files are named by ID, which is meaningless to humans:
7 >>>
8 >>> $ ls podcasts/2018-02-24/ | head 20150424_blog_pmoney.mp3
9 >>> 20150429_blog_pmoney.mp3 20150501_blog_pmoney.mp3
10 >>> 20150506_blog_pmoney.mp3 20150508_blog_pmoney.mp3
11 >>> 20150513_blog_pmoney.mp3 20150516_blog_pmoney.mp3
12 >>> 20150522_blog_pmoney2.mp3 20150522_blog_pmoney.mp3
13 >>> 20150527_blog_pmoney.mp3 $
14 >>
15 >> Those look like dates to me. Probably the date the program was first aired.
16 >
17 >Yeah, they're the filenames of the files on NPR's website.
18 >
19 >https://www.npr.org/sections/money/
20 >
21 >If you go to the page for any of the individual episodes and then
22 >hover over the "download" link you'll see them to have this kind of
23 >naming convention (it may have changed slightly since 2015, though).
24 >
25 >I would have assumed the podcast feed (RSS or whatever?) would
26 >contain both the link to the episode, with a filename like this, and
27 >also a human readable name, such as "Episode #566 - The Zoo Economy".
28
29 $ youtube-dl --download-archive .yt-dl-archive -f mpeg 'https://www.npr.org/rss/podcast.php?id=510289'
30 [generic] podcast: Requesting header
31 WARNING: Falling back on generic information extractor.
32 [generic] podcast: Downloading webpage
33 [generic] podcast: Extracting information
34 [download] Downloading playlist: Planet Money
35 [generic] playlist Planet Money: Collected 300 video ids (downloading 300 of them)
36 [download] Downloading video 1 of 300
37 [generic] 20180223_pmoney_pmpod826: Requesting header
38 [redirect] Following redirect to https://16543.mc.tritondigital.com:443/NPR_510289/media-session/9309ea03-306a-49b4-82ac-28f16c6b5fa5/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
39 [generic] 20180223_pmoney_pmpod826: Requesting header
40 [download] Destination: 826_-_The_Vodka_Proof__20180225__20180223_pmoney_pmpod826.mp3
41 [download] 21.1% of 18.96MiB at 2.28MiB/s ETA 00:06^C
42 ERROR: Interrupted by user
43 $
44
45 The --download-archive .yt-dl-archive records the already-downloaded
46 media (their source (npr) and ids) in the file .yt-dl-archive in the
47 current directory (adjust path to your liking...).
48
49 And 'https://www.npr.org/rss/podcast.php?id=510289' is the url you get
50 if you subscribe to the podcast.
51
52 Oh, and I've set the output format by:
53
54 ==== ~/.config/youtube-dl/config ====
55 --output '%(title)s__%(upload_date)s__%(id)s.%(ext)s'
56 ====
57
58 HTH,
59 -dnh
60
61 --
62 Give a man fire, and he will be warm for a day, set a man on fire, and he
63 will be warm for the rest of his life. -- Terry Pratchett

Replies

Subject Author
Re: [gentoo-user] media-sound/podracer doesn't name downloaded podcasts Stroller <stroller@××××××××××××××××××.uk>