I'm trying to extract the subtitles from this website... but they are displayed like the image.. could someone help me..
https://home.hitv.vip/es-es/series/mary-kills-people/1?frm=history_index
Thanks in advance
+ Reply to Thread
Results 1 to 4 of 4
-
責任者-MDX
-
press F12 to open Chrome DevTools and go to the Sources tab
In the search bar (Ctrl + P), search for:
home.hitv.vip/js/hiplayer.min.da039b8436907c12bae3.js
Right-click the file and select "Override"
Note: If it’s your first time using Overrides, enable it under the Overrides tab in DevTools and select a folder for local changes.
Search inside the file for the following line:
Code:n.resolveSubtitle = function(e, t) {
Replace the entire function with the following modified version:
Code:n.resolveSubtitle = function(e, t) { var r; if (this.video.textTracks && this.video.textTracks.length > 0) for (var i = this.video.textTracks.length, n = 0; n < i; n++) { var a = this.video.textTracks[n]; a && "subtitle-xml" === a.label && (r = a) } r || ((r = this.video.addTextTrack("metadata", "subtitle-xml")).mode = "showing"); var subtitlesData = []; for (var o = e.dias || [], s = 0; s < o.length; s++) { var l = o[s] , u = l.st , h = l.et , c = l.con; t.offset && (u += t.offset, h += t.offset), t.secret && (c = Ae(t.secret.key, t.secret.iv, c)); subtitlesData.push({ startTime: u, endTime: h, text: c }); var d = new VTTCue(u,h,c) , f = e.note.height , p = e.note.width; this.container && this.container.setAttribute("base-width", "" + p), l.style && (d.style = Ce({ baseW: p, baseH: f }, l.style)), d.id = s + "", r.addCue(d) } var srtContent = ""; for (var i = 0; i < subtitlesData.length; i++) { var subtitle = subtitlesData[i]; srtContent += (i + 1) + "\n"; var formatTime = function(time) { var hours = Math.floor(time / 3600); var minutes = Math.floor((time % 3600) / 60); var seconds = Math.floor(time % 60); var milliseconds = Math.floor((time % 1) * 1000); return hours.toString().padStart(2, '0') + ":" + minutes.toString().padStart(2, '0') + ":" + seconds.toString().padStart(2, '0') + "," + milliseconds.toString().padStart(3, '0'); }; srtContent += formatTime(subtitle.startTime) + " --> " + formatTime(subtitle.endTime) + "\n"; srtContent += subtitle.text + "\n\n"; } setTimeout(() => { try { var blob = new Blob([srtContent], {type: 'text/plain;charset=utf-8'}); var url = URL.createObjectURL(blob); var a = document.createElement('a'); a.href = url; a.download = 'sub.srt'; a.style.display = 'none'; document.body.appendChild(a); a.click(); setTimeout(() => { document.body.removeChild(a); URL.revokeObjectURL(url); }, 100); } catch (error) { console.error('Error downloading SRT file:', error); } }, 100); return r }
Once the subtitles are loaded and the video starts, this code will automatically generate and download an .srt file
download: https://gofile.io/d/yTT3hT -
@Frieren ... Thank thanks for the sub.
@umr_saleh ... Thanks for the method as detailed as always. 📝責任者-MDX
Similar Threads
-
Extract encoded subtitles
By sekininsha in forum Video Streaming DownloadingReplies: 4Last Post: 23rd Jun 2025, 23:54 -
Subtitle edit not extracting subtitles
By boristhecat in forum SubtitleReplies: 5Last Post: 3rd May 2024, 11:03 -
help in extracting subtitles
By ecolek in forum Video Streaming DownloadingReplies: 8Last Post: 16th Feb 2022, 11:11 -
Problem with extracting tx3g subtitles
By Fleand in forum Video ConversionReplies: 21Last Post: 21st Jul 2021, 10:28 -
Extracting subtitles from m4v/mp4.
By protoX in forum SubtitleReplies: 54Last Post: 16th Dec 2020, 12:26