Last active
August 17, 2020 18:49
-
-
Save wlib/cce00bee274347ca29375f0279603e00 to your computer and use it in GitHub Desktop.
Revisions
-
wlib revised this gist
Aug 17, 2020 . 2 changed files with 1 addition and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,8 @@ const https = require("https") const pageHTMLHandler = html => { const videoURL = html.match(/https:\/\/vidstreaming\.io\/load\.php\?id=.*?SUB/)[0] require("child_process").exec(`open "${videoURL}"`) } const requestHandler = HTMLHandler => response => { This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,2 +0,0 @@ -
wlib revised this gist
Aug 17, 2020 . 1 changed file with 25 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ const https = require("https") const playerHTMLHandler = html => { const videoURL = html.match(/https:\/\/file\.gogocdn\.net.*?mp4/)[0] const viewDataURI = `data:text/html,<video controls src=${videoURL}></video>` console.log(viewDataURI) require("child_process").exec(`open "https://gistpreview.github.io/?cce00bee274347ca29375f0279603e00#${videoURL}"`) } const pageHTMLHandler = html => { const videoURL = html.match(/https:\/\/vidstreaming\.io\/load\.php\?id=.*?SUB/)[0] https.get(videoURL, requestHandler(playerHTMLHandler)) } const requestHandler = HTMLHandler => response => { let html = "" response.on("data", chunk => html += chunk) response.on("end", () => HTMLHandler(html)) } const getEpisode = episode => https.get(`https://www8.gogoanimehub.tv/gintama-episode-${episode}`, requestHandler(pageHTMLHandler)) getEpisode(parseInt(process.argv[2])) -
wlib created this gist
Aug 17, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ <video controls></video> <script>document.querySelector("video").src = location.hash.slice(1)</script>