Skip to content

Instantly share code, notes, and snippets.

@dreygur
Created August 26, 2019 03:49
Show Gist options
  • Select an option

  • Save dreygur/71eae2aaadfb8832cd91e97f51e858c1 to your computer and use it in GitHub Desktop.

Select an option

Save dreygur/71eae2aaadfb8832cd91e97f51e858c1 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name BioScope
// @namespace htps://github.com/dreygur
// @version 0.1
// @description Download BioScopLive Videos for Free!
// @author Rakibul Yeasin
// @match https://www.bioscopelive.com/*
// @grant none
// @require http://code.jquery.com/jquery-1.12.4.min.js
// ==/UserScript==
(function() {
'use strict';
var BioScope = {
ttl: this,
// Sample Path: https://vod.bioscopelive.com/vod/vod/0/c/0c49V8O3YbC/0c49V8O3YbC_480p.ts
note: `<span style="font-size:12px;">Chose quality to Download</span>`,
attach() {
$(document).on('mouseover', 'a.content-modal-toggle', function(e) {
var link = $(this).attr("href");
$(this).contents().find('.btn').text(`Download`);
});
$(document).on('click', 'a.content-modal-toggle', function(e) {
e.preventDefault();
var path = 'https://vod.bioscopelive.com/vod/vod/';
var link = $(this).attr("href");
var id = getBioUrl(link);
window.open(`${path}${id[0]}/${id[1]}/${id}/${id}_480p.ts`, '_blank');
console.log(id);
});
},
init() {
this.attach();
}
};
function getBioUrl(link) {
var regex = /([0-9|A-Z|a-z])\w+/g;
var url = link.match(regex);
return url[2];
}
BioScope.init();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment