marklieberman / downloadstar

Download all items in a webpage that match a pattern
GNU General Public License v3.0
90 stars 16 forks source link

Feature request - automatic naming / extension #27

Closed nikolaymomchev closed 6 years ago

nikolaymomchev commented 6 years ago

So what I really miss from DTA was the ability to name the downloaded files. My uni has multiple links, but the names are jumbled and the extensions come out nonsensical.

bup4gr commented 6 years ago

This is a link http://www.gazzettaufficiale.it/30giorni/serie_generale where the files that you download have the same name (for example "downloadpdf" without extension) so an automatic naming can (probably) solve the problem. Old downthemall can use *name*.*ext* for correct renaming or *inum*.pdf if you want that the name is a progressive number and the extension is always pdf.

Problem is also similar to https://github.com/marklieberman/downloadstar/issues/28

marklieberman commented 6 years ago

@nikolaymomchev Have a look at #25 for a sneak peek of the naming feature.

bup4gr commented 6 years ago

I see the screnshots on https://github.com/marklieberman/downloadstar/issues/25, but i think that this don't solve my problem.

When you are on this page http://www.gazzettaufficiale.it/30giorni/serie_generale and try to download a single link, for example http://www.gazzettaufficiale.it/do/gazzetta/downloadPdf?dataPubblicazioneGazzetta=20180604&numeroGazzetta=127&tipoSerie=SG&tipoSupplemento=GU&numeroSupplemento=0&progressivo=0&estensione=pdf&edizione=0, firefox give you corret name "20180604_127.pdf" when i download the links with download star i don't have automatically the correct name, but always the same name. So when i use only firefox i have correct name. when i use download star the name is incorrect.

marklieberman commented 6 years ago

@bup4gr Those links are using Content-Disposition header to provide the filename. DownloadStar cannot see that header because Mozilla has not implemented parts of the downloads web extension API. See #7. image

You can use the mask naming feature to rename the files using the link text content so the filenames are a bit more unique image

bup4gr commented 6 years ago

Thanks, it's very kind of you. I hope that Mozilla adds the function to read the headers.