Greasy Fork is available in English.

Amazon Video - subtitle downloader

Allows you to download subtitles from Amazon Video

< Відгуки до Amazon Video - subtitle downloader

Відгук: Добре - скрипт працює добре

§
Опубліковано: 01.07.2023

Works well, but the regex has to change to make it work with more amazon.co.jp URLs.

The script should work for both URLs, but the current version only works with the first one:
https://www.amazon.co.jp/-/dp/B079T9DSY6/
https://www.amazon.co.jp/-/en/gp/video/detail/B079T9DSY6/

I tried to fix it. Original regex:
/^https:\/\/(www|smile)\.amazon\.co\.jp\/(gp\/(video|product)|(.*?\/)?dp)\/.+/
New regex:
/^https:\/\/(www|smile)\.amazon\.co\.jp\/(.*\/.*)?\/(gp\/(video|product)|(.*?\/)?dp)\/.+/

§
Опубліковано: 02.07.2023

Some other changes that would be nice:
- Using the compression:"DEFLATE" option on zip.generateAsync instead of the default (STORE, no compression)
- Adding a way to save the original .ttml2 file instead of/along with the converted .srt

Tithen-FirionАвтор
§
Опубліковано: 05.07.2023

This is clearly a feature request so could you not mark it as "OK - script works, but has bugs" when there are no bugs? -_-

  1. I switched to @match and used matching so lax that it should work on all Amazon URLs.
  2. There's no point using deflate compression. It adds unnecessary processing. And in ZIP files each file is compressed individually. So if you want to cut down the size in a meaning way you have to extract the subtitle files and compress them using some other archive format - .7z, .rar, .tar.*, etc.
  3. If conversion to .str fails my script downloads the original .ttml2 format. If you want to force it you can edit xmlToSrt function to return null.
§
Опубліковано: 07.07.2023
Edited: 07.07.2023

Okay. (can't update without a reply)

Опублікувати відповідь

Sign in to post a reply.