Skip to content

Instantly share code, notes, and snippets.

import json
import glob
import os
import re
import random
## Get Settings.
dirname = os.path.dirname(os.path.realpath(__file__))
f = open(f'{dirname}/settings.json')
data = json.load(f)
@jlovald
jlovald / horriblesubsbatch.js
Last active June 15, 2019 10:55
Downloads a batch of episodes from horrible subs. Click on an anime to get to the download list. Run this script in the console (tested for chrome). And click on the copy button at the console output. Paste this into qbittorrent or another client that supports adding a batch of magnet links
// Change to the resolution you desire. "480p", "720p", "1080p".
var res = "1080p";
var x = document.getElementsByClassName("hs-shows")[0];
var li = x.childNodes;
var myRegexp = /<a title="Magnet Link" href="(.*)">Magnet/g;
var x = document.getElementsByClassName("hs-shows")[0];
var li = x.childNodes;
var links = "";
var btn = document.getElementsByClassName("more-button")[0];
This file has been truncated, but you can view the full file.
public class NaturalNumberSwitch {
public static void main(String args[] ) throws Exception {
if((16*4) == 61) {
System.out.println(16);
return;
}
if((26*4) == 62) {
System.out.println(26);
return;
}