Re: [gentoo-user] media-sound/podracer doesn't name downloaded podcasts

2018-02-25 Thread Paul Colquhoun
On Sunday, 25 February 2018 10:59:47 PM AEDT Stroller wrote:
> Hello,
> 
> As per my thread a month ago [1], I've now installed Podracer and gave it a
> spin last night.
> 
> I started by trying to download NPR's Planet Money podcast: 
> https://www.npr.org/sections/money/
> 
> I tried 3 different URLs that I found on that page, none of them worked:
> 
> • https://www.npr.org/feeds/127413729/feed.json
> • https://www.npr.org/podcasts/510289/planet-money/
> • https://www.npr.org/rss/rss.php?id=127413729
> 
> The podcast is also listed in iTunes, I found:
> https://itunes.apple.com/us/podcast/planet-money/id290783428
> 
> Using that URL in my .podracer/subscriptions, Podracer downloaded 300 mp3
> files, I assume every Podcast in the show's archive.
> 
> However the files are named by ID, which is meaningless to humans:
> 
> $ ls podcasts/2018-02-24/ | head
> 20150424_blog_pmoney.mp3
> 20150429_blog_pmoney.mp3
> 20150501_blog_pmoney.mp3
> 20150506_blog_pmoney.mp3
> 20150508_blog_pmoney.mp3
> 20150513_blog_pmoney.mp3
> 20150516_blog_pmoney.mp3
> 20150522_blog_pmoney2.mp3
> 20150522_blog_pmoney.mp3
> 20150527_blog_pmoney.mp3
> $
> 
> If anyone has any suggestions, I'd be grateful. I'll perhaps try Flexget
> later today if I haven't thought of anything else.
> 
> Stroller.
> 
> [1]
> https://archives.gentoo.org/gentoo-user/message/bcd7c0ae62e60a0583f10ae3daf
> 7f0e4


Have you looked at the ID3 tags for the files? If they are properly tagged with 
the name, its 
an easy script to pull the ID3 tag and use it to rename the files.


-- 
Reverend Paul Colquhoun, ULC. http://andor.dropbear.id.au/
  Asking for technical help in newsgroups?  Read this first:
 http://catb.org/~esr/faqs/smart-questions.html#intro



Re: [gentoo-user] media-sound/podracer doesn't name downloaded podcasts

2018-02-25 Thread David Haller
Hello,

On Sun, 25 Feb 2018, Stroller wrote:
>> On 25 Feb 2018, at 21:00, David Haller  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=1227=510289=588345420=podcast=588345420=pod=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=1227=510289=588345420=podcast=588345420=pod=510289
[generic] 20180223_pmoney_pmpod826: Requesting header
[info] Available formats for 20180223_pmoney_pmpod826:
format code  extension  resolution note
mpeg mp3audio 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 mp3audio 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:



  subscribe to podcast


  [..]

  https://www.npr.org/templates/rss/podcast.php?id=510289; 
data-metrics="...">RSS link





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



Re: [gentoo-user] media-sound/podracer doesn't name downloaded podcasts

2018-02-25 Thread Stroller

> On 25 Feb 2018, at 21:00, David Haller  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'
> [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/9309ea03-306a-49b4-82ac-28f16c6b5fa5/anon.npr-mp3/npr/pmoney/2018/02/20180223_pmoney_pmpod826.mp3?orgId=1=1227=510289=588345420=podcast=588345420=pod=510289
> [generic] 20180223_pmoney_pmpod826: Requesting header
> [download] Destination: 
> 826_-_The_Vodka_Proof__20180225__20180223_pmoney_pmpod826.mp3
> [download]  21.1% of 18.96MiB at  2.28MiB/s ETA 00:06^C
> ERROR: Interrupted by user
> $ 
> 
> 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.

> 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.

Stroller.




Re: [gentoo-user] media-sound/podracer doesn't name downloaded podcasts

2018-02-25 Thread Stroller

> On 25 Feb 2018, at 13:51, Jack  wrote:
> … 
> If the web site has a page listing all the shows, with links to the files, 
> you might be able to save that file, and then edit/parse/?? it to match the 
> show name to the file name.

Yes, I figure so, but that rather undermines using a podcast program.

If I have to parse the webpage, I might as well pull out both the show titles 
and URLs and wget / rename them myself.

Stroller.




Re: [gentoo-user] media-sound/podracer doesn't name downloaded podcasts

2018-02-25 Thread David Haller
Hello,

On Sun, 25 Feb 2018, Stroller wrote:
>> On 25 Feb 2018, at 14:40, David M. Fellows  wrote:
>>> 
>>> However the files are named by ID, which is meaningless to humans:
>>> 
>>> $ ls podcasts/2018-02-24/ | head 20150424_blog_pmoney.mp3
>>> 20150429_blog_pmoney.mp3 20150501_blog_pmoney.mp3
>>> 20150506_blog_pmoney.mp3 20150508_blog_pmoney.mp3
>>> 20150513_blog_pmoney.mp3 20150516_blog_pmoney.mp3
>>> 20150522_blog_pmoney2.mp3 20150522_blog_pmoney.mp3
>>> 20150527_blog_pmoney.mp3 $
>> 
>> Those look like dates to me. Probably the date the program was first aired.
>
>Yeah, they're the filenames of the files on NPR's website.
>
>https://www.npr.org/sections/money/
>
>If you go to the page for any of the individual episodes and then
>hover over the "download" link you'll see them to have this kind of
>naming convention (it may have changed slightly since 2015, though).
>
>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'
[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/9309ea03-306a-49b4-82ac-28f16c6b5fa5/anon.npr-mp3/npr/pmoney/2018/02/20180223_pmoney_pmpod826.mp3?orgId=1=1227=510289=588345420=podcast=588345420=pod=510289
[generic] 20180223_pmoney_pmpod826: Requesting header
[download] Destination: 
826_-_The_Vodka_Proof__20180225__20180223_pmoney_pmpod826.mp3
[download]  21.1% of 18.96MiB at  2.28MiB/s ETA 00:06^C
ERROR: Interrupted by user
$ 

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...).

And 'https://www.npr.org/rss/podcast.php?id=510289' is the url you get
if you subscribe to the podcast.

Oh, and I've set the output format by:

 ~/.config/youtube-dl/config 
--output '%(title)s__%(upload_date)s__%(id)s.%(ext)s'


HTH,
-dnh

-- 
Give a man fire, and he will be warm for a day, set a man on fire, and he
will be warm for the rest of his life. -- Terry Pratchett



Re: [gentoo-user] media-sound/podracer doesn't name downloaded podcasts

2018-02-25 Thread Stroller

> On 25 Feb 2018, at 14:40, David M. Fellows  wrote:
>> 
>> However the files are named by ID, which is meaningless to humans:
>> 
>> $ ls podcasts/2018-02-24/ | head 20150424_blog_pmoney.mp3
>> 20150429_blog_pmoney.mp3 20150501_blog_pmoney.mp3
>> 20150506_blog_pmoney.mp3 20150508_blog_pmoney.mp3
>> 20150513_blog_pmoney.mp3 20150516_blog_pmoney.mp3
>> 20150522_blog_pmoney2.mp3 20150522_blog_pmoney.mp3
>> 20150527_blog_pmoney.mp3 $
> 
> Those look like dates to me. Probably the date the program was first aired.

Yeah, they're the filenames of the files on NPR's website.

https://www.npr.org/sections/money/

If you go to the page for any of the individual episodes and then hover over 
the "download" link you'll see them to have this kind of naming convention (it 
may have changed slightly since 2015, though).

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".

I expected the podcast downloader app to rename the episodes human-readably, so 
I'm wondering if I've got a bad URL for the feed, if the feed is broken or the 
app.

Stroller.




Re: [gentoo-user] media-sound/podracer doesn't name downloaded podcasts

2018-02-25 Thread David M. Fellows
>Hello,
>
>As per my thread a month ago [1], I've now installed Podracer and gave
>it a spin last night.
>
>I started by trying to download NPR's Planet Money podcast:
>https://www.npr.org/sections/money/
>
>I tried 3 different URLs that I found on that page, none of them worked:
>
>• https://www.npr.org/feeds/127413729/feed.json
>• https://www.npr.org/podcasts/510289/planet-money/
>• https://www.npr.org/rss/rss.php?id=127413729
>
>The podcast is also listed in iTunes, I found:
>https://itunes.apple.com/us/podcast/planet-money/id290783428
>
>Using that URL in my .podracer/subscriptions, Podracer downloaded 300
>mp3 files, I assume every Podcast in the show's archive.
>
>However the files are named by ID, which is meaningless to humans:
>
>$ ls podcasts/2018-02-24/ | head 20150424_blog_pmoney.mp3
>20150429_blog_pmoney.mp3 20150501_blog_pmoney.mp3
>20150506_blog_pmoney.mp3 20150508_blog_pmoney.mp3
>20150513_blog_pmoney.mp3 20150516_blog_pmoney.mp3
>20150522_blog_pmoney2.mp3 20150522_blog_pmoney.mp3
>20150527_blog_pmoney.mp3 $

Those look like dates to me. Probably the date the program was first aired.
DaveF

>
>If anyone has any suggestions, I'd be grateful. I'll perhaps try Flexget
>later today if I haven't thought of anything else.
>
>Stroller.
>
>
>
>
>[1]
>https://archives.gentoo.org/gentoo-user/message/bcd7c0ae62e60a0583f10ae3
>daf7f0e4
>
>



Re: [gentoo-user] media-sound/podracer doesn't name downloaded podcasts

2018-02-25 Thread Jack

On 2018.02.25 06:59, Stroller wrote:

Hello,

As per my thread a month ago [1], I've now installed Podracer and  
gave it a spin last night.


I started by trying to download NPR's Planet Money podcast:   
https://www.npr.org/sections/money/


I tried 3 different URLs that I found on that page, none of them  
worked:


• https://www.npr.org/feeds/127413729/feed.json
• https://www.npr.org/podcasts/510289/planet-money/
• https://www.npr.org/rss/rss.php?id=127413729

The podcast is also listed in iTunes, I found:  
https://itunes.apple.com/us/podcast/planet-money/id290783428


Using that URL in my .podracer/subscriptions, Podracer downloaded 300  
mp3 files, I assume every Podcast in the show's archive.


However the files are named by ID, which is meaningless to humans:

$ ls podcasts/2018-02-24/ | head
20150424_blog_pmoney.mp3
20150429_blog_pmoney.mp3
20150501_blog_pmoney.mp3
20150506_blog_pmoney.mp3
20150508_blog_pmoney.mp3
20150513_blog_pmoney.mp3
20150516_blog_pmoney.mp3
20150522_blog_pmoney2.mp3
20150522_blog_pmoney.mp3
20150527_blog_pmoney.mp3
$

If anyone has any suggestions, I'd be grateful. I'll perhaps try  
Flexget later today if I haven't thought of anything else.


Stroller.
If the web site has a page listing all the shows, with links to the  
files, you might be able to save that file, and then edit/parse/?? it  
to match the show name to the file name.


Jack


[gentoo-user] media-sound/podracer doesn't name downloaded podcasts

2018-02-25 Thread Stroller
Hello,

As per my thread a month ago [1], I've now installed Podracer and gave it a 
spin last night.

I started by trying to download NPR's Planet Money podcast:  
https://www.npr.org/sections/money/

I tried 3 different URLs that I found on that page, none of them worked:

• https://www.npr.org/feeds/127413729/feed.json
• https://www.npr.org/podcasts/510289/planet-money/
• https://www.npr.org/rss/rss.php?id=127413729 

The podcast is also listed in iTunes, I found: 
https://itunes.apple.com/us/podcast/planet-money/id290783428

Using that URL in my .podracer/subscriptions, Podracer downloaded 300 mp3 
files, I assume every Podcast in the show's archive.

However the files are named by ID, which is meaningless to humans:

$ ls podcasts/2018-02-24/ | head
20150424_blog_pmoney.mp3
20150429_blog_pmoney.mp3
20150501_blog_pmoney.mp3
20150506_blog_pmoney.mp3
20150508_blog_pmoney.mp3
20150513_blog_pmoney.mp3
20150516_blog_pmoney.mp3
20150522_blog_pmoney2.mp3
20150522_blog_pmoney.mp3
20150527_blog_pmoney.mp3
$ 

If anyone has any suggestions, I'd be grateful. I'll perhaps try Flexget later 
today if I haven't thought of anything else.

Stroller.




[1] 
https://archives.gentoo.org/gentoo-user/message/bcd7c0ae62e60a0583f10ae3daf7f0e4