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 characters
ffmpeg -i $1 -c copy -map 0 -segment_time 3600 -f segment -strftime 1 "$2/%Y-%m-%d_%H-%M-%S.mkv" |
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 characters
(function($) { | |
var baseUrl = "https://www.lego.com//service/biservice/searchbytheme?fromIndex={index}&onlyAlternatives=false&theme={theme}" | |
var themes = JSON.parse($("div.product-search").attr("data-search-themes")) | |
var products = [] | |
next = function() { | |
if (themes.length) { | |
theme = themes.pop() | |
dowload(0, theme.key, theme.Label) |
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 characters
//https://www.lego.com/en-us/service/buildinginstructions/search | |
//Please jQuerify first | |
$("li.bi-result").each(function(){ | |
let title=$("div.bi-top h4.title",this).next().text() + " - " + $("div.bi-top h4.title",this).text() | |
$("a[download]",this).html(title) | |
}) |
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 characters
(function($) { | |
t = null | |
checkResult = function(coupon, coupons) { | |
let msg = $("#allcoupon_msg").text() | |
if (msg == "") { | |
t = setTimeout(checkResult, 500, coupon, coupons) | |
console.log(coupon + " wait for 500ms") | |
} else { | |
$("#allcoupon_msg").html("") |
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 characters
(function($) { | |
parse = function(data, textStatus, jqXHR) { | |
console.log(data) | |
orders = data.mainOrders | |
rows = [] | |
for (let mOrder of orders) { | |
header = [] | |
body = [] | |
header = [mOrder.id, |
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 characters
//Download links' text beautifier | |
var doc = (window.frames.length > 1) ? window.frames[2].document : document | |
var jQuery = jQuery || window.frames[2].window.jQuery || null | |
if (!jQuery) { | |
var s = document.createElement('script'); | |
s.setAttribute('src', 'http://code.jquery.com/jquery.js'); | |
doc.body.appendChild(s); | |
} else { |
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 characters
//Download links and append html body to parent | |
var doc = (window.frames.length > 1) ? window.frames[2].document : document | |
var jQuery = jQuery || window.frames[2].window.jQuery || null | |
if (!jQuery) { | |
var s = document.createElement('script'); | |
s.setAttribute('src', 'http://code.jquery.com/jquery.js'); | |
doc.body.appendChild(s); | |
} else { | |
(function($, doc) { |
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 characters
//For https://www.dpreview.com/products/search/cameras | |
(function($) { | |
var all = [] | |
var parse = function() { | |
$("td.info").each(function() { | |
all.push([ | |
$("div.name", this).text(), | |
$("div.announcementDate", this).text(), | |
$("div.prices", this).text(), | |
].concat($("div.shortProductSpecs", this).text().split("|")).join("\t")) |
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 characters
//https://www.mchk.org.hk/english/list_register/list.php?&type=L | |
(function($) { | |
var parse = function($$) { | |
return $$.find("table[cellpadding=4] tr").map(function(i) { | |
if (i === 0) return "" | |
let $td = $("td", this) | |
let data; | |
if ($td.eq(0).attr("headers") === "qualification") { | |
data = ["", "", "", "", "", | |
$td.eq(0).find("span:eq(0)").get(0).childNodes[0].data, |
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 characters
(function($) { | |
var parse = function($$) { | |
console.log("parse") | |
var brands = $$.find("select[name=brand] option").map(function() { | |
return this.value | |
}).get() || [] | |
brands.shift() | |
var category = $$.find("div.nav-menu").text().trim() |