jjjake/internetarchive

Format (-f) option doesn't work as described in the documentation

Closed this issue · 2 comments

e-ave commented

Always returns
"skipping item, no matching files found."

Example:
ia metadata --formats "item"
Flac
PNG
Text
Archive BitTorrent
Metadata
JPEG Thumb
JPEG
VBR MP3
Columbia Peaks
Spectrogram
Item Tile

ia download "item" --format='Flac'
item:
skipping item, no matching files found.

My first instinct was to try uppercase --format=FLAC since archive.org URLs do formats=ITEM TILE,ARCHIVE BITTORRENT,METADATA,TEXT,JPEG,FLAC
Then I tried all possibilities:
ia download "item" --format='Flac'
ia download "item" --format='FLAC'
ia download "item" --format='flac'
ia download "item" --format=flac
ia download "item" --format=FLAC
ia download "item" --format=Flac

I finally figured out that it only works without the apostrophes AND with capital first letter
ia download "item" --format=Flac

So this lead me to wonder, how on earth do you download the 'Item Tile' or 'Archive BitTorrent' then since they have a space? I haven't been able to figure that out and download them via this tool, personally. None of these work:
format=Torrent
format=torrent
format=Archive BitTorrent
format='Archive BitTorrent'
format='torrent'
format='Torrent'

Since you mention that single quotes cause issues, I assume you're on Windows and using cmd.exe. That has strange quoting rules that cause problems all the time. On virtually all other shells, those examples would work fine; --format='Flac' and --format=Flac are the exact same thing everywhere except on cmd.exe. Try double quotes instead for when the value includes a space.

e-ave commented

Indeed I was using Windows cmd.exe. Actually feeling rather dumb for not trying regular quotes now!