We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
**had issue/error this part of script giving and error with the conversion:
re.error: global flags not at the start of the expression at position 63
I did a work around using ffmpeg and importing subprocess to achieve the same result. you have to add ffmpeg, ffprobe, ffplay to the main folder.**
def download_subtitles(self, subtitle='', filepath=''): if subtitle: filename = "%s\%s" % (filepath, subtitle.filename) if os.name == 'nt' else "%s/%s" % ( filepath, subtitle.filename) try: retval = subtitle.download(filepath=filepath, quiet=True) except KeyboardInterrupt: sys.stdout.write(fc + sd + "\n[" + fr + sb + "-" + fc + sd + "] : " + fr + sd + "User Interrupted..\n") sys.exit(0) else: msg = retval.get('msg') if msg == "download": #self.convert(filename=filename) #convert to srt using ffmpeg instead of vvt2srt srt_name = filename.replace('.vtt', '.srt') try: subprocess.run(['ffmpeg', '-i', filename, '-loglevel', 'quiet', '-hide_banner', '-nostats', '-y', srt_name]) except: pass
def download_subtitles(self, subtitle='', filepath=''): if subtitle: filename = "%s\%s" % (filepath, subtitle.filename) if os.name == 'nt' else "%s/%s" % ( filepath, subtitle.filename) try: retval = subtitle.download(filepath=filepath, quiet=True) except KeyboardInterrupt: sys.stdout.write(fc + sd + "\n[" + fr + sb + "-" + fc + sd + "] : " + fr + sd + "User Interrupted..\n") sys.exit(0) else: msg = retval.get('msg') if msg == "download": #self.convert(filename=filename)
#convert to srt using ffmpeg instead of vvt2srt srt_name = filename.replace('.vtt', '.srt') try: subprocess.run(['ffmpeg', '-i', filename, '-loglevel', 'quiet', '-hide_banner', '-nostats', '-y', srt_name]) except: pass
The text was updated successfully, but these errors were encountered:
No branches or pull requests
**had issue/error this part of script giving and error with the conversion:
re.error: global flags not at the start of the expression at position 63
I did a work around using ffmpeg and importing subprocess to achieve the same result. you have to add ffmpeg, ffprobe, ffplay to the main folder.**
The text was updated successfully, but these errors were encountered: