manojmj92 / subtitle-downloader Goto Github PK
View Code? Open in Web Editor NEWPython script to automatically download subtitles for any movie/tv series episode.
License: GNU General Public License v3.0
Python script to automatically download subtitles for any movie/tv series episode.
License: GNU General Public License v3.0
Hi again.
Ok, so I got the script to work now. I followed the instructions putting the cmd file in the send to directory. Right clicking a movie and sending it to the cmd file just flashes a black windows (command prompt) really quickly with nothing happening. If I call the cmd directly it works like a charm. I've tried adding pause statements in the cmd to see where it breaks, but even if I put a pause on the first line nothing happens. I guess this means it doesn't even start to run the file.
Anyone got any ideas what might be happening?
The shebang(#!/usr/bin/env python) is missing in the subtitle-downloader.py file.
Adding that makes it more convenient to run the script on GNU Linux.
Command prompt says:
No Module named 'request'
If anyone follows the instructions specified in the readme.MD file it won't run because of installation-of-libraries (bs4, requests, click) didn't specify. @manojmj92 did you intentionally not specified it?
First of all I would like to say its an amazing piece of script you've written. Bravo!
But I'd also like to point out when I put the subtitle-downloader.py in *C:* (according to the README) I was getting a IO Error due to the script not having permission to write the log file. So to resolve the issue I put the subtitle-downloader.py in a location where it doesn't need to have permission and then changed the Subtitle.cmd accordingly.
I think you might mention this in your README as windows by default doesn't give write permission on C:\ root.
Hi.
I was recommended this script, so went to try it. Installed python to my d: drive (windows 10), added python and python\scripts to my path, ran the script installed the requests module, tried again and it still failed. Went to install re, bs4 and zipfiles, but none of them will install.
`pip install -vvv zipfiles
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
Config variable 'Py_UNICODE_SIZE' is unset, Python ABI tag may be incorrect
Collecting zipfiles
1 location(s) to search for versions of zipfiles:
Same thing happens for all of them. Is there a way to manually download or fix this?
Cheers!
Hello, thanks for the code. I've found below error while executing script.
Error (<class 'urllib.error.HTTPError'>, HTTPError(), <traceback object at 0x03092580>)
When I traced the hash file and entered url directly in browser, it displays a blank page.
here is the url,
http://api.thesubdb.com/?action=download&hash=93f5905927c3c95e135dfcfc8eef1d4d&language=en
I doubt whether there is not any subtitle file on website of this hash.
I request you if you've working file and it actually downloads the subtitle file then please share me the hash of the file so that I can check it in the script.
Thanks
When I was downloading the subtitle of the Serial , I was getting the error as follow due to which I was not able to download the subtitle.
Error in fetching subtitle for /home/sahil/Movie/Breaking Bad/Season 2/Breaking.Bad.S02E02.BluRay.720p.x264.mkv
Error (<class 'zipfile.BadZipFile'>, BadZipFile('File is not a zip file',), <traceback object at 0x7f7bab887c48>)
Edited.
$ ~/apps/subtitle-downloader/subtitle-downloader.py Interstellar.2014.IMAX.1080p.Bluray.x264.DTS-EVO.mkv
Error in fetching subtitle for Interstellar.2014.IMAX.1080p.Bluray.x264.DTS-EVO.mkv
('Error', (<type 'exceptions.AttributeError'>, AttributeError("'builtin_function_or_method' object has no attribute 'namelist'",), <traceback object at 0x7fb7fcfd2cf8>))
Git clone on ubuntu 16.04 LTS
The command prompt stays open with no response on every video file I tried.
#1. The Equalizer 3 (2023)
Robert McCall finds himself at home in Southern Italy but he discovers his friends are under the control of local crime bosses. As events turn deadly, McCall knows what he has to do: become his friends' protector by taking on the mafia.
Richard Lindheim
Characters
Michael Sloan
Characters
Antoine Fuqua
Director
Richard Wenk
Writer
#The Equalizer 3 (2023) MOVIES trailer
#The Equalizer 3 (2023) MOVIES Netflix Free Download
#The Equalizer 3 (2023) MOVIES Hulu Free Download
#The Equalizer 3 (2023) MOVIES Disney Plus Free Download
#The Equalizer 3 (2023) MOVIES Where to download free
#The Equalizer 3 (2023) MOVIES is available on NETFLIX, HULU, DISNEY, AMAZON PRIME
#2. Haunted Mansion (2023)
A woman and her son enlist a motley crew of so-called spiritual experts to help rid their home of supernatural squatters.
Justin Simien
Director
Katie Dippold
Writer
#Haunted Mansion (2023) MOVIES trailer
#Haunted Mansion (2023) MOVIES Netflix Free Download
#Haunted Mansion (2023) MOVIES Hulu Free Download
#Haunted Mansion (2023) MOVIES Disney Plus Free Download
#Haunted Mansion (2023) MOVIES Where to download free
#Haunted Mansion (2023) MOVIES is available on NETFLIX, HULU, DISNEY, AMAZON PRIME
#3. The Nun II (2023)
In 1956 France, a priest is violently murdered, and Sister Irene begins to investigate. She once again comes face-to-face with a powerful evil.
Akela Cooper
Screenplay, Story
James Wan
Characters
Gary Dauberman
Characters
Michael Chaves
Director
Richard Naing
Screenplay
Ian B. Goldberg
Screenplay
#The Nun II (2023) MOVIES trailer
#The Nun II (2023) MOVIES Netflix Free Download
#The Nun II (2023) MOVIES Hulu Free Download
#The Nun II (2023) MOVIES Disney Plus Free Download
#The Nun II (2023) MOVIES Where to download free
#Haunted Mansion (2023) MOVIES is available on NETFLIX, HULU, DISNEY, AMAZON PRIME
I wanted to contribute with instructions on how to add the "Download Subtitle" item in the right-click context menu under Dolphin/KDE5
/home/<username>/.local/share/kservices5/ServiceMenus/
DownloadSub.desktop
[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin,video/*
Actions=DownSub
[Desktop Action DownSub]
Name=Download Subtitles
Icon=kfm
Exec=<path_to_repository>/subtitle-downloader.py "%U"
I'm running on linux-mint 18.3 (cinnamon version) and tried to follow the instruction to get everything working for nemo.
Within ~/.gnome2/
there was no nemo-scripts
directory, so I created the it and placed Subtitles_In_English_for_nemo.sh
in there. I followed all other instructions as well.
When I right click on the movie, there is no option to click on Services
hi i wanted to use this open source program for my school's assignment project. by doing so, i need to add an enhancements to the program so i am asking may i add another language and add another suitable movie file format?
Since the script require Request and Beautiful Soup library to run , It will be great to add requirements.txt file as it will help to install the dependency required to run the script and causes no error if the user have not the required library provided.
Traceback (most recent call last):
File "C:\subtitle-downloader.py", line 19, in
import requests,time,re,zipfile
ModuleNotFoundError: No module named 'requests'
Traceback (most recent call last):
File "C:\subtitle-downloader.py", line 19, in
import requests,time,re,zipfile
ModuleNotFoundError: No module named 'requests'
Traceback (most recent call last):
File "C:\subtitle-downloader.py", line 19, in
import requests,time,re,zipfile
ModuleNotFoundError: No module named 'requests'
Traceback (most recent call last):
File "C:\subtitle-downloader.py", line 19, in
import requests,time,re,zipfile
ModuleNotFoundError: No module named 'requests'
GOTO was unexpected at this time.
Above error comes when I am using the script.
Hey there,
Looks like the script is broken - it keeps throwing 404.
python /Users/alagu/bin/Subtitle_Downloader.py /Users/alagu/Movies/Swades/Swades1.avi
Traceback (most recent call last):
File "/Users/alagu/bin/Subtitle_Downloader.py", line 49, in <module>
sub_downloader(path)
File "/Users/alagu/bin/Subtitle_Downloader.py", line 44, in sub_downloader
response = urllib2.urlopen(req).read()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found
ERROR:root:Error in fetching subtitle for D:\tv\Riverdale\Riverdale.S02E02.720p.HDTV.2CH.x265.HEVC-PSA.mkv(<class 'bs4.FeatureNotFound'>, FeatureNotFound("Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?",), <traceback object at 0x000001A8FA111D08>)
I tried to use this on Ubuntu 16.04 , gave me error on line 19 in subtitle-downloader.py file saying there is no module requests which you are trying to import. When I commented that line and tried script worked fine. Check this.
My python version is 2.7.11+
Thanks.
May be you could add python 32 folder path also to the cmd files.
Latest commit to include subscene breaks the script by use of BS4 and requests modules.
Either installation instructions should be added or script should handle the ImportError
Following lines are to help people coming here looking for help meanwhile:
c:\python27\scripts\easy_install-2.7.exe requests
c:\python27\scripts\easy_install-2.7.exe BeautifulSoup4
I removed square braces in the path and tried still, a cmd window pops and and left. how to pause the cmd window and see the error message. I tried giving pause
in the batch file but nothing works.
after i send the movie file or folder on my windows 8 system it shows error in fetching subtitles. Please see to it soon because i need it to be done till today evening or by tomorrow morning.
I've tried as instructed but notthing happend... Just windows cmd show up and there is no subtitled downloaded..
where is the problem?
Any file name affect to this?
So I've followed the instructions of the README.md file and recognized that the script wouldn't work for me (Ubuntu 16.04). There were 2 Issues on my side:
To solve those Issues:
Hi
Trying to run it on a mac but I'm not able to.
I've added the script in "Services" but can't see it when I right click
Please resolve
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.