[Issue]: Can't rip movies with slash in title
insurw opened this issue · 3 comments
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'
Same issue with the colon character, e.g. 3:10 to Yuma
https://itunes.apple.com/se/movie/3-10-to-yuma/id808278931?l=en
Then there's the same error with Con Air but the name seems normal, without any special characters:
https://itunes.apple.com/se/movie/con-air/id252789518?l=en
NotADirectoryError: [WinError 267] The directory name is invalid: 'C:\\Users\\insurw-su\\AppData\\Local\\Temp\\isubrip\\Con.Air.iT.WEB'
Though I guess I should open an issue for each one?
Thanks for reporting, there's no need for another issue.
The issue with "Con Air" is that Windows doesn't allow file names with Con
(separated with a dot) in it. (More info)
I'll work on a fix.
Fixed in the latest release (v2.3.3).