MichaelYochpaz/iSubRip

[Issue]: Some rips doesn't seem to use specified URL

insurw opened this issue · 4 comments

Confirmations

  • I have checked the issues tab, and couldn't find an existing open issue for the issue I want to report.

OS Type

Windows

Python Version

3.12.3

Package Version

2.5.4

Description

isubrip log seems to indicate it's using the URL specified but doesn't and rips languages that aren't listed. It doesn't matter if isubrup settings is set to rip all or specific languages. It uses wrong URL in both cases.

URL: https://tv.apple.com/se/movie/in-bruges/umc.cmc.3hfzzmfjj39s02vwynx3b91ih

I tested these movies with only Nordic subs and they rip correctly:
https://tv.apple.com/se/movie/kill-chain/umc.cmc.4d93g7p1rgs2jaqk2wyb878xb
https://tv.apple.com/se/movie/sameblod/umc.cmc.7574jgktfqv2sj5rimnwizy2f
https://tv.apple.com/se/movie/point-break/umc.cmc.xmw67i1eh8yv86pkhougfr33

Output Log

Scraping 'https://tv.apple.com/se/movie/in-bruges/umc.cmc.3hfzzmfjj39s02vwynx3b91ih'...
Found movie: In Bruges [2008] (ID: 772060987)
'Espa単ol (Espa単a) (es-ES)' subtitles were successfully downloaded.
'Italiano (it)' subtitles were successfully downloaded.
'Nederlands (nl)' subtitles were successfully downloaded.
'English (US) (en-US) [CC]' subtitles were successfully downloaded.
4/4 matching subtitles were successfully downloaded.

Config

[general]
check-for-updates = true


[downloads]
# Folder to downloads files to.
# The default "." value means it will download to the same folder the script ran from.
# Use double backslashes in path to avoid escaping characters. Example: "C:\\Users\\<username>\\Downloads\\"
folder = "."

# A list of iTunes language codes to download.
# An empty array (like the one currently being used) will result in downloading all of the available subtitles.
# Example: ["en-US", "fr-FR", "he"]
#languages = ["en", "en-US", "en-UK", "sv", "sv-SE", "da", "da-DK", "no", "no-NO", "fi", "fi-FI"]
languages = []

# Whether to overwrite existing subtitles files.
# If set to false, names of existing subtitles will have a number appended to them to avoid overwriting.
# Value can be either "true" or "false".
overwrite-existing = false

# Save files into a zip archive if there is more than one matching subtitles.
# Value can be either "true" or "false".
zip = true


[subtitles]
# Fix RTL (Right To Left) for languages set on `fix-rtl-languages`.
# Value can be either "true" or "false".
#
# NOTE: This is off by default as some subtitles use other methods to fix RTL (like writing punctuations backwards).
#       Using this option on these type of subtitles can break the already-fixed RTL issues.
fix-rtl = false

# List of iTunes language codes to fix RTL on.
# This setting is optional, and is used for overriding the default list of languages to fix RTL on.
# This setting is not set by default.
rtl-languages = ["ar", "he"]

# Remove duplicate paragraphs (same text and timestamps).
remove-duplicates = true

# Whether to convert subtitles to SRT format.
# NOTE: This can cause loss of subtitles metadata that is not supported by SRT format.
convert-to-srt = false


[scrapers]
# User-Agent to use by default for all HTTP requests.
# Will be overridden by scraper-specific user-agent (if set).
default-user-agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"


[scrapers.itunes]
# User-Agent to use while scraping from iTunes.
# Changing this setting is not recommended.
# This setting is not set by default.
user-agent = "iTunes-AppleTV/15.2"


[scrapers.appletv]
# User-Agent to use while scraping from AppleTV.
# Changing this setting is not recommended.
# This setting is not set by default.
user-agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"

This happens because AppleTV includes references to other streaming services (referenced by AppleTV as "Channels") on their movie / series pages, and not just iTunes.

There are even pages for content that is exclusive to other streaming platforms and isn't available on iTunes.
For example: The Irishman, which is a Netflix exclusive.

In the link you provided, you can see the referenced channels here:
29 04 2024-firefox-609

The listed subtitles on the page, as far as I can tell, are the subtitles available for one of the channels that's picked by default, and not an accumulation of all of them together / iTunes specifically.

In the link you provided, looking at the data returned by AppleTV's API, it seems like the subtitles you see by default on the page are the ones available on "SkyShowtime".

If you'll use the following link, which includes a configuration to show information about the iTunes channel specifically, it'll specify the subtitles available for iTunes, and the subtitles isubrip actually finds and downloads:
https://tv.apple.com/se/movie/in-bruges/umc.cmc.3hfzzmfjj39s02vwynx3b91ih?ctx_brand=tvs.sbd.9001&l=en

Also, unrelated to the issue, but seems like your config is a modified copy-paste of the example config.

Please see the following comment I made for another issue (mainly the second part, which explains why the user had the issue occur to him): #63 (comment)
And the comment I added at the top here.

Up to you to keep your config as-is or update it, but I highly recommend setting only settings you actually know what they do, and want to change their default value, instead of having all available settings in your config, since the default values can change (and in this case, the user-agent for the iTunes scraper has been changed a while ago), and by setting them in your config you will override their new default values with the older one.

This happens because AppleTV includes references to other streaming services (referenced by AppleTV as "Channels") on their movie / series pages, and not just iTunes.

If you'll use the following link, which includes a configuration to show information about the iTunes channel specifically, it'll specify the subtitles available for iTunes, and the subtitles isubrip actually finds and downloads: https://tv.apple.com/se/movie/in-bruges/umc.cmc.3hfzzmfjj39s02vwynx3b91ih?ctx_brand=tvs.sbd.9001&l=en

Hmm, ok. I've been using this custom search (Chrome) to find subtitles:
https://www.google.com/search?q=%s+site%3Ahttps%3A%2F%2Ftv.apple.com%2Fse%2Fmovie

I tried different ways to add iTunes config in the search but it doesn't appear in the URLs when searching with Google.
Do you know any way? Justwatch does provide the correct iTunes URL.

In the Windows AppleTV app it's even worse. They list all subtitles available at SkyShowtime and iTunes in one section. Though the AppleTV app is a preview version which they forced it on me when I updated iTunes, as it now only contains music and podcasts. I probably should downgrade iTunes.

I still use the iTunes app on Windows, as I found it more useful for getting URLs to scrape (although my guess is that at some point it'll probably just get removed and completely replace by the AppleTV app).

Unfortunately, I don't really have a suggestion for searching atm. The only thing I can suggest in relation to this issue is that if you're on an AppleTV page and want the metadata displayed to correspond to the iTunes channel, you can use the ctx_brand=tvs.sbd.9001 URL parameter (tvs.sbd.9001 is the ID of the iTunes channel).