Giter Club home page Giter Club logo

isubrip's Introduction

iSubRip

A Python package for scraping and downloading subtitles from AppleTV / iTunes movie pages.
Latest version: 2.5.4 (changelog)


PyPI - Version PyPI - Monthly Downloads PyPI - Total Downloads PyPI - Python Version GitHub - License GitHub - issues GitHub - Repo stars

Requirements

  • Python 3.8+

Installation

PyPI (Recommended)

python3 -m pip install isubrip

Git Source Code

python3 -m pip install -e git+https://github.com/MichaelYochpaz/iSubRip.git#egg=isubrip

Usage

isubrip <iTunes movie URL> [iTunes movie URL...]

Configuration

A TOML config file can be created and used to configure different options and features. A config file will be looked for in one of the following paths (according to OS):

Windows: %USERPROFILE%\.isubrip\config.toml
Linux / macOS: $HOME/.isubrip/config.toml

Examples:

Windows: C:\Users\Michael\.isubrip\config.toml
Linux: /home/Michael/.isubrip/config.toml
macOS: /Users/Michael/.isubrip/config.toml


Example Config:

[downloads]
folder = "C:\\Subtitles\\iTunes"
languages = ["en-US", "fr-FR", "he"]
zip = false

[subtitles]
convert-to-srt = true
fix-rtl = true

[subtitles.webvtt]
subrip-alignment-conversion = true

An example config with details and explanations for all available settings can be found here.

Logs

A log file, containing debug information, will be created for each run on one of the following paths (according to OS):

Windows: %USERPROFILE%\.isubrip\logs
Linux / macOS: $HOME/.isubrip/logs

Log rotation (deletion of old files, once a certain amount of files is reached) can be configured in the config file using the general.log-rotation-size setting. The default log rotation value is 15.

isubrip's People

Contributors

michaelyochpaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

isubrip's Issues

[Issue]: ZIP files get overwritten

Confirmations

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

OS Type

Linux

Python Version

Python 3.8.9

Package Version

2.3.2

Description

Downloading subtitles from multiple subtitle regions in one command will overwrite the previous zip.
e.g. isubrip https://itunes.apple.com/ar/movie/id303440550 https://itunes.apple.com/za/movie/id856341024 will download two different sets of subtitles, and the later zip will overwrite the first one.

Suggested fix: add region/storefront to the filename.

Config

No response

Output Log

No response

[Issue]: URLs without the title name (tv.apple.com) aren't recognized

Confirmations

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

OS Type

Linux

Python Version

3.8.9

Package Version

2.3.2

Description

Links without the movie name on tv.apple.com don't work, similar to #13.

https://tv.apple.com/us/movie/umc.cmc.5cxq4yswbsp3apykshwrcb890 doesn't work
https://tv.apple.com/us/movie/a/umc.cmc.5cxq4yswbsp3apykshwrcb890w works (despite not being a valid URL, as only the ID matters)
https://tv.apple.com/us/movie/everything-everywhere-all-at-once/umc.cmc.5cxq4yswbsp3apykshwrcb890 also works

Config

No response

Output Log

Error: https://tv.apple.com/us/movie/umc.cmc.5cxq4yswbsp3apykshwrcb890 is not a valid iTunes/AppleTV movie URL.

[Feature Request]: Report source FPS in filename

Confirmations

  • I confirm that I checked the issues tab and couldn't find an existing issue with a request for the feature I want to requst.

Description

Hi,

I was wondering if it would be possible to report the source file's framerate in the output filename?
Makes it a whole lot easier for synching if there's no need to guess what the FPS is!

Many thanks

[Feature Request]: Add year to ZIP files

Confirmations

  • I confirm that I checked the issues tab and couldn't find an existing issue with a request for the feature I want to requst.

Description

If ripped individually the subtitles will always have a year in the title. Same for the subtitles in the ZIPs.

I think the ZIP files will only have year if the iTunes URL contains it. iTunes isn't consistent in having a year in URL for movies to avoid name collisions.

Example:
https://itunes.apple.com/se/movie/pinocchio/id540283464?l=en
https://itunes.apple.com/se/movie/pinocchio/id1597469980?l=en

[Issue]: Can't rip movies with slash in title

Confirmations

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

OS Type

Windows

Python Version

Python 3.10.7

Package Version

Version: 2.3.2

Description

Try rip a movie with slash in the title, in this case Superman/Batman: Apocalypse:
isubrip https://itunes.apple.com/se/movie/superman-batman-apocalypse/id820997757?l=en

isubrip assume the temp path is:
C:\\Users\\insurw-su\\AppData\\Local\\Temp\\isubrip\\Superman\\Batman.Apocalypse.iT.WEB

Config

[general]
check-for-updates = true

[downloads]
folder = "C:\\Users\\insurw-su\\Downloads\\[iTunes subtitles - isubrip]"
format = "srt"
#languages = ["en-US", "sv", "da", "no", "fi"]
languages = ["en", "en-US", "sv", "sv-SE", "da", "da-DK", "no", "no-NO", "fi", "fi-FI"]
merge-playlists = false
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"
zip = true

[scraping]
# User-Agent to use while scraping iTunes.
# Don't change this unless you know what you're doing.
itunes-user-agent = "iTunes-AppleTV/15.2"

# User-Agent to use while scraping AppleTV.
# Don't change this unless you know what you're doing.
appletv-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"

[subtitles]
fix-rtl = false
rtl-languages = ["ar", "he"]
remove-duplicates = true

Output Log

isubrip https://itunes.apple.com/se/movie/superman-batman-apocalypse/id820997757?l=en

Scraping https://itunes.apple.com/se/movie/superman-batman-apocalypse/id820997757?l=en...
Found movie: Superman/Batman: Apocalypse
Traceback (most recent call last):
  File "C:\Users\insurw-su\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\insurw-su\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\insurw-su\AppData\Local\Programs\Python\Python310\Scripts\isubrip.exe\__main__.py", line 7, in <module>
  File "C:\Users\insurw-su\AppData\Local\Programs\Python\Python310\lib\site-packages\isubrip\__main__.py", line 122, in main
    movie_download_path.mkdir(exist_ok=True)
  File "C:\Users\insurw-su\AppData\Local\Programs\Python\Python310\lib\pathlib.py", line 1173, in mkdir
    self._accessor.mkdir(self, mode)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\insurw-su\\AppData\\Local\\Temp\\isubrip\\Superman\\Batman.Apocalypse.iT.WEB'

[Question]: It showed me error, how to fix it?

Question

Thats the error i got:
isubrip : The term 'isubrip' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

Adding support for downloading the subtitles from tv.apple.com

Could downloading the subtitles for the movies from tv.apple.com for the pages with "View in iTunes" be added to the script? They have the same playlists for the movies from itunes.apple.com, and could be used as a backup in case there is any problem with downloading the subtitles from the pages in itunes.apple.com. For example the movie "Interstellar".

https://tv.apple.com/gb/movie/interstellar/umc.cmc.1vrwat5k1ucm5k42q97ioqyq3

https://play.itunes.apple.com/WebObjects/MZPlay.woa/hls/playlist.m3u8?cc=GB&a=965491522&id=236366768&l=en&aec=SD

The subtitle is overwritten by closed captions

Hi, when I try to download the subtitles from this link for the movie "Star Wars: The Rise of Skywalker" the English subtitle is overwritten by the closed captions, an identification might need to be added to the closed captions files, something like ".cc".

https://itunes.apple.com/gb/movie/star-wars-the-rise-of-skywalker/id1490366967

2222

https://play.itunes.apple.com/WebObjects/MZPlay.woa/hls/playlist.m3u8?cc=GB&a=1490366967&id=186755466&l=en&aec=SD

#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subtitles_ap",LANGUAGE="en",NAME="English ",AUTOSELECT=YES,CHARACTERISTICS="public.accessibility.transcribes-spoken-dialog,public.accessibility.describes-music-and-sound",FORCED=NO,STABLE-RENDITION-ID="9ed92c59cfe50cef30065b91abd1f5fe72a1aa29523d9e7603cd02941b3eb259",URI="https://vod-ap-amt.tv.apple.com/itunes-assets/HLSVideo114/v4/34/f2/d1/34f2d171-b10c-382f-d6cd-f713735a7651/P186755466_A1490366967_FF_en_subtitles.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subtitles_ak",LANGUAGE="en",NAME="English ",AUTOSELECT=YES,CHARACTERISTICS="public.accessibility.transcribes-spoken-dialog,public.accessibility.describes-music-and-sound",FORCED=NO,STABLE-RENDITION-ID="9ed92c59cfe50cef30065b91abd1f5fe72a1aa29523d9e7603cd02941b3eb259",URI="https://vod-ak-amt.tv.apple.com/itunes-assets/HLSVideo114/v4/34/f2/d1/34f2d171-b10c-382f-d6cd-f713735a7651/P186755466_A1490366967_FF_en_subtitles.m3u8"

[Issue]: Cannot download english version of subtitles

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.11.4

Package Version

2.4.3

Description

This Apple movie states it has English subtitles within the Subtitles section at the bottom, but they are not downloading via isubrip

Output Log

isubrip https://tv.apple.com/us/movie/tracing-skylines/umc.cmc.4fbxsitwvsslpatrh2x89t9rt
Scraping https://tv.apple.com/us/movie/tracing-skylines/umc.cmc.4fbxsitwvsslpatrh2x89t9rt
Found movie: Tracing Skylines (2013)
Deutsch (Deutschland) (de-DE) subtitles were successfully downloaded.
Español (es) subtitles were successfully downloaded.
Français (France) (fr-FR) subtitles were successfully downloaded.
Italiano (it) subtitles were successfully downloaded.
Nederlands (nl) subtitles were successfully downloaded.

5/5 matching subtitles have been successfully downloaded.

Config

No response

[Issue]: whenever isubrip finds a subtitles file, python crashes.

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.11.4

Package Version

2.4.3

Description

whenever I try to download any subtitle to any path that's not the isubrip folder, and isubrip does indeed find a subtitles file, as soon as it does, python crashes.
I've tried debugging this problem, steps included running isubrip on a different computer (on which it worked perfectly). completely uninstalling and purging all libraries and modules, then reinstalling everything (which did not work). downgrading to an older version of python.
nothing seems to work.

when debugging, I came across an error that seemed to indicate that this is a permissions error, and so I tried to run isubrip as admin, but still I keep on getting the same error.

the odd thing is that when I hit "close program" on the "python has crashed" window that gets prompted, isubrip does indeed download the desired subtitle to the folder specified in the config file.
I've been trying to debug this for the past two weeks to no avail, which is why I'm now submitting this report.

just to clarify, I'm using the administrator user of said computer (so there shouldn't be and read/write permission problems), and cmd is running on either admin or system permissions, yet still python crashes on both.

when debugging, this is the error I got:
Unhandled exception at 0x00007FF8EE9CBA44 (python311.dll) in python.exe: 0xC0000005: Access violation reading location 0x0000000000000008.

Output Log

Scraping https://tv.apple.com/il/movie/the-little-mermaid/umc.cmc.gto5t9phvu7dpajarqglrfmh
Found movie: The Little Mermaid (2023)
עברית (he) subtitles were successfully downloaded.
עברית (forced) (he) subtitles were successfully downloaded.

2/2 matching subtitles have been successfully downloaded.

#then after that python crashes, and displays the subtitles in the folder, only after I press "close program", as stated in the description.

Config

[general]
check-for-updates = true

[downloads]
folder = "C:\\Users\\Administrator\\Documents\\ATV-Downloads"
format = "srt"
languages = [
    "he",
    "he-IL",
]
overwrite-existing = true
merge-playlists = false
zip = false

[subtitles]
remove-duplicates = true
convert-to-srt = true

[scrapers]
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"

[Feature Request]: Add `{\an8}` tags when converting from WebVTT to SRT

Confirmations

  • I confirm that I 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.10.7

Package Version

2.3.2

Description

{\an8} (shows subs at top) is stripped when it shouldn't be.
I compared ~20 movies. It seems the only difference compared to Subtitle Edit SRTs is the missing {\an8}.
Though it could be other similar but much less used formatting is also stripped.

Config

No response

Output Log

No response

[Feature Request]: downloading from multiple URLs at once

Confirmations

  • I confirm that I checked the issues tab and couldn't find an existing issue with a request for the feature I want to requst.

Description

Can support be added so that instead of the syntax "isubrip [itunes/appleTV link]", we could input a path to a txt or even xml file that contains multiple iTunes movie links, so that isubrip will rip the subtitles from all links with one command rather than a separate command for each link?

[Issue]: Media data parsing issue

Confirmations

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

OS Type

Linux

Python Version

3.8.9

Package Version

2.4.0

Description

isubrip fails to scrape some some URLs and fails with a cryptic python error.

Changing the code to raise the error reveals that it's some issue with name parsing.

  File "isubrip/__main__.py", line 52, in main
    print(f"Found movie: {media_data.name} ({media_data.release_date.year})")
AttributeError: 'list' object has no attribute 'name'

Config

No response

Output Log

isubrip https://tv.apple.com/ca/movie/umc.cmc.2jhzj3f3ic3shrf0gt5450j9z?l=en
Scraping https://tv.apple.com/ca/movie/umc.cmc.2jhzj3f3ic3shrf0gt5450j9z?l=en
Error: 'list' object has no attribute 'name'

[Issue]: Can't rip subs for movie even though it has ~30

Confirmations

  • I confirm that I 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.10.7

Package Version

2.3.2

Description

I can't rip Bullet Train subs for some reason. I thought maybe it was because it's buy only, but Thor: Love and Thunder doesn't have the issue.

Config

[general]
check-for-updates = true

[downloads]
folder = "C:\\Users\\insurw-su\\Downloads"
format = "srt"
#languages = ["en", "en-US", "sv", "sv-SE", "da", "da-DK", "no", "no-NO", "fi", "fi-FI"]
languages = []
merge-playlists = false
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"
zip = true

[scraping]
# User-Agent to use while scraping iTunes.
# Don't change this unless you know what you're doing.
itunes-user-agent = "iTunes-AppleTV/15.2"

# User-Agent to use while scraping AppleTV.
# Don't change this unless you know what you're doing.
appletv-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"

[subtitles]
fix-rtl = false
rtl-languages = ["ar", "he"]
remove-duplicates = true

Output Log

isubrip https://itunes.apple.com/se/movie/bullet-train/id1635627017?l=en
Scraping https://itunes.apple.com/se/movie/bullet-train/id1635627017?l=en...
Found movie: Bullet Train
Error: No valid playlist could be found.

isubrip https://itunes.apple.com/us/movie/bullet-train/id1635627017
Scraping https://itunes.apple.com/us/movie/bullet-train/id1635627017...
Found movie: Bullet Train
Error: No valid playlist could be found.

[Feature Request]: Separate subtitles by Country Codes.

Confirmations

  • I have checked the issues tab, and couldn't find an existing issue with my feature request.

Description

When downloading subtitles from a certain country code (GB, US, MZ, BR or any other), create a folder with the respective name and save the subtitles in this folder.

Examples:

For the same URL from different country codes:

MZ https://tv.apple.com/mz/movie/puss-in-boots-the-last-wish/umc.cmc.3ysvrfdjp7h6q8dt73t3bq23i

Save in MZ folder.

BR https://tv.apple.com/br/movie/gato-de-botas-2--o-ultimo-pedido/umc.cmc.3ysvrfdjp7h6q8dt73t3bq23i

Save in BR folder.

Create folders named from a list of ISO 3166-1 alpha-2 two-letter country codes. Always in capital letters.

Thereafter, save all downloaded subtitles of the MZ country code in the MZ folder and BR in the BR folder, extending this to all other country codes and their respective subtitles.

Suggestion: Create a configuration option organize-by-country-code or sort-by-country-code.

Always redirected to the same subtitle pack.

Before this latest update (2.3.1), I was able to download different subtitle packs depending on which website language (iTunes or AppleTV) I selected. Now, apparently, regardless of the selected website language ("https://tv.apple.com/us/" or "https://tv.apple.com/br/"), the destination is always the same URL and hence the same subtitle pack. I want to download packages that contain Brazilian Portuguese subtitles and I am always redirected to the same URL and to the same subtitles package.

[Issue]: Can't save zip file to a different drive

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.8.10

Package Version

2.4.1

Description

Hi

if i use folder = "C:\\Users\\Downloads\\Itunes\\" everything works fine,
but if I change the disk to folder = "E:\\iTunes\\", it doesn't let me download the subtitles with the zip.
but I can download them in any format.
with the old version there wasn't this problem.

Thanks

Config

folder = "E:\\iTunes\\"

Output Log

[WinError 17] The system cannot move the file to a different disk drive

Can't configure isubrip on Mac OS?

I created the folder and the TOML file specified in README but it's not doing anything? I also do not find the default_config.toml in the folder either.

Windows 10 FFmpeg directory

I've installed FFmpeg and added it's directory to my "user-config.toml" but when I run the isubrip command I still get the error that FFmpeg isn't installed. Would you please give me some guidance on what I'm missing? Here is the line in my TOML file:
[ffmpeg] path = "C:\Users\isaac\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ffmpeg" args = "-loglevel warning -hide_banner -y"

Converting the script to an executable

Hi, could you convert the script to an executable so the novice users would be able to use it without the need for knowing how to use python? Something like this one

iSubRip_v1.0.3_with_ffmpeg.zip

I made it to myself using auto-py-to-exe, I added a batch file Download.bat to make the downloading process easier by just opening the batch file with notepad and adding the movie's link and saving the file then running the batch file.

I added ffmpeg.exe in the same folder with iSubRip.exe so no need for adding ffmpeg.exe to the PATH.

[Bug] 'urlopen error [Winerror 10060]'

Occasionally, I'll get this error. After I paste the URL and hit enter, it says Scraping [URL]... and in a minute or two I get the error. It could also say it detected this or that language subtitle but nothing will happen either, and then I'll get the error. My cmd is not in English, so here's the translation of the message I get:

"Failed attempt to establish connection due to no response from the other computer, or the established connection has been terminated due to invalid response from the connected computer."

From what I've seen, PC reboot helps solve this, so it could just be my PC, but judging by the error message it could be something else.

[Issue]: Temporary files aren't properly moved between drives

Confirmations

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

OS Type

Linux

Python Version

3.8.9

Package Version

2.4.0

Description

Files aren't properly moved from the temporary directory, if that happens to be in another drive. That's because Path.replace is used which only attempts to rename the file, changing that to shutil.move fixes the issue.

Config

No response

Output Log

isubrip https://itunes.apple.com/ar/movie/id1641189067
Scraping https://itunes.apple.com/ar/movie/id1641189067?l=en
Found movie: Farewell Mr. Haffmann (2021)
Español (Latinoamérica) (es-419) subtitles were successfully downloaded.
Português (Brasil) (pt-BR) subtitles were successfully downloaded.
Error: [Errno 18] Invalid cross-device link: '/dev/shm/isubrip/Farewell.Mr.Haffmann.2021.iT.WEB/Farewell.Mr.Haffmann.2021.iT.WEB.es-419.vtt' -> 'Farewell.Mr.Haffmann.2021.iT.WEB.es-419.vtt'

Doesn't scrape if movie has '?' in the title

Movie "Can You Hear Us Now?" has ? in the title, and ? is not supported in Windows for folders/filenames.

isubrip https://itunes.apple.com/us/movie/can-you-hear-us-now/id1617191490
Scraping https://itunes.apple.com/us/movie/can-you-hear-us-now/id1617191490...
Found movie: Can You Hear Us Now?
Traceback (most recent call last):
  File "%appdata%\local\programs\python\python38-32\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "%appdata%\local\programs\python\python38-32\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "%appdata%\local\programs\python\python38-32\scripts\isubrip.exe\__main__.py", line 7, in <module>
  File "%appdata%\local\programs\python\python38-32\lib\site-packages\isubrip\__main__.py", line 91, in main
    os.makedirs(current_download_path, exist_ok=True)
  File "%appdata%\local\programs\python\python38-32\lib\os.py", line 221, in makedirs
    mkdir(name, mode)
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'C:\\%appdata%\\Local\\Temp\\iSubRip\\Can.You.Hear.Us.Now?.iT.WEB'

Also some other error:

isubrip https://itunes.apple.com/us/movie/climate-crisis-flooding/id1615085644
Scraping https://itunes.apple.com/us/movie/climate-crisis-flooding/id1615085644...
Found movie: Climate Crisis: Flooding
Error: No valid playlist could be found.

--------------------------------------------------

config file

hi. more of a question rather than issue.
downloaded the scripts, and am trying to locate the config file in the specified path on windows 11, and i am able t find the .isubrip folder, but its in a completely different path, and also, it doesnwt contain anything.
am I missing something? do I need to create the .toml file? if so, how does one do that?

The script stopped working

Hi, the script stopped working because iTunes changed the GROUP-ID in the playlist .

#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subtitles_vod-ap3-amt.tv.apple.com",LANGUAGE="ar",NAME="العربية",AUTOSELECT=YES,FORCED=NO,STABLE-RENDITION-ID="55653e6317a4e49b7bb9b7124feea77224bee9c044764a3f07c49f052face22b",URI="https://vod-ap3-amt.tv.apple.com/itunes-assets/HLSVideo124/v4/2d/07/c9/2d07c9c5-cd6b-0bdd-0071-3ef7955c3d86/P236366768_A965491522_FF_ar_subtitles.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subtitles_vod-ak-amt.tv.apple.com",LANGUAGE="ar",NAME="العربية",AUTOSELECT=YES,FORCED=NO,STABLE-RENDITION-ID="55653e6317a4e49b7bb9b7124feea77224bee9c044764a3f07c49f052face22b",URI="https://vod-ak-amt.tv.apple.com/itunes-assets/HLSVideo124/v4/2d/07/c9/2d07c9c5-cd6b-0bdd-0071-3ef7955c3d86/P236366768_A965491522_FF_ar_subtitles.m3u8"

#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subtitles_vod-ap-amt.tv.apple.com",LANGUAGE="ar",NAME="العربية",AUTOSELECT=YES,FORCED=NO,STABLE-RENDITION-ID="428b51a5addbf1d8409cc348b0e2deb5dd15d38e46fc13ae94185a5cd2d40733",URI="https://vod-ap-amt.tv.apple.com/itunes-assets/HLSVideo114/v4/f1/b0/6d/f1b06ddc-7964-e432-57b2-59ed727dc770/P185792533_A270199674_FF_ar_subtitles_B8379289.m3u8"

[Issue]: Apple TV IDs shorted than 24 characters are not recognized

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.10.6

Package Version

2.4.2

Description

Some Apple TV IDs are only 23 characters long.
Changing the regex here fixes the issue: https://github.com/MichaelYochpaz/iSubRip/blob/main/isubrip/scrapers/appletv_scraper.py#L20

Example: https://tv.apple.com/ca/movie/umc.cmc.sa30371iduf6frzmmat3mwh

Output Log

Scraping https://tv.apple.com/ca/movie/umc.cmc.sa30371iduf6frzmmat3mwh
Error: No matching scraper was found for URL 'https://tv.apple.com/ca/movie/umc.cmc.sa30371iduf6frzmmat3mwh'

Config

No response

[Issue]: "An iTunes offer could not be found. Skipping..."

Confirmations

  • I confirm that I 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.10.5

Package Version

2.3.3

Description

When I try to get the French subtitles for this link: https://tv.apple.com/fr/movie/the-score/umc.cmc.64dyhbdttzmnf1yghg8tbd9lh, isubrip says: "An iTunes offer could not be found. Skipping...".

But the Apple TV page lists French subtitles as available.

Config

[downloads]
folder = "C:\\Users\\Admin\\Desktop\\"
format = "vtt"
languages = ["en-US", "en-GB", "fr-FR","fr"]
zip = false

[subtitles]
fix-rtl = false

check-for-updates = true

Output Log

C:\Users\Admin>isubrip https://tv.apple.com/fr/movie/the-score/umc.cmc.64dyhbdttzmnf1yghg8tbd9lh
Scraping https://tv.apple.com/fr/movie/the-score/umc.cmc.64dyhbdttzmnf1yghg8tbd9lh...
An iTunes offer could not be found. Skipping...

Pre-Order

Hello, the script now working great. but when trying to download subs for pre-order movies the downloaded subs are for other movies.

[Issue]: tv.apple.com aren't recognized

Confirmations

  • I confirm that I 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.10.0

Package Version

2.3.3

Description

Package seems to be outdated because its not recognizing urls anymore i tried following

https://tv.apple.com/us/show/blade-the-series/umc.cmc.20yikft1ykcpl0yohd1tmep9q?at=1000l3V2

https://itunes.apple.com/us/tv-season/blade-the-series-season-1/id161811818

Config

No response

Output Log

C:\Users\Ninja\Desktop>isubrip https://itunes.apple.com/us/tv-season/blade-the-series-season-1/id161811818
Scraping https://itunes.apple.com/us/tv-season/blade-the-series-season-1/id161811818...
Error: https://itunes.apple.com/us/tv-season/blade-the-series-season-1/id161811818 is not a valid iTunes/AppleTV movie URL.

C:\Users\Ninja\Desktop>isubrip https://tv.apple.com/us/show/blade-the-series/umc.cmc.20yikft1ykcpl0yohd1tmep9q?at=1000l3V2
Scraping https://tv.apple.com/us/show/blade-the-series/umc.cmc.20yikft1ykcpl0yohd1tmep9q?at=1000l3V2...
Error: https://tv.apple.com/us/show/blade-the-series/umc.cmc.20yikft1ykcpl0yohd1tmep9q?at=1000l3V2 is not a valid iTunes/AppleTV movie URL.

How are you getting the urls to the movies?

I'm sure I'm just an idiot but I can't for the life of me figure out how you are getting the itunes urls links to movies? Everything I try just opens itunes and I don't know how to get the url from the app? A little guidance would be greatly appreciated!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.