Skip to content

Instantly share code, notes, and snippets.

View jonbarrow's full-sized avatar
🏠
Working from home

Jonathan Barrow jonbarrow

🏠
Working from home
View GitHub Profile
# **********************************************************************
# * Project: 00-piws-vars *
# * Created: 05/06/2018 22:27 *
# * Author: Martin Svensson aka ztealmax - pi-workbench.org *
# * Info: create in /etc/chromium-browser/customizations/ *
# * Note: replaces rpi-chromium-mods *
# **********************************************************************
#
PICHROMIUMMODS="/etc/chromium-browser/customizations/00-rpi-vars"
@jonbarrow
jonbarrow / kickassanime.js
Created July 31, 2019 03:16
Scrapes kickassanime.io
const got = require('got');
const crypto = require('crypto');
const querystring = require('querystring');
const JSON5 = require('json5'); // Lazy-parse JSON
const URL_BASE = 'https://www18.kickassanime.io';
const SEARCH_URL = `${URL_BASE}/api/anime_search`;
const IV_REGEX = /"vt":"(.*?)"/;
const KEY_REGEX = /"sig":"(.*?)"/;
class AsyncLoop {
constructor(length, looper, cb) {
this.i = -1;
this.length = length;
this.looper = looper;
this.callback = cb;
this.loop();
}
loop() {
this.i++;