Amazon Video - subtitle downloader

Allows you to download subtitles from Amazon Video

< 腳本Amazon Video - subtitle downloader的回應

評論:正評 - 腳本一切正常

§
發表於:2023-07-01

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)\/.+/

§
發表於:2023-07-02

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

§
發表於:2023-07-05

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.
§
發表於:2023-07-07
編輯:2023-07-07

Okay. (can't update without a reply)

發表回覆

登入以回復