Skip to content

Instantly share code, notes, and snippets.

View spookyahell's full-sized avatar
🌐
Browsing the WWW (and helping others and myself get through life)

spookyahell

🌐
Browsing the WWW (and helping others and myself get through life)
View GitHub Profile
@spookyahell
spookyahell / piTunesClaimBatch.py
Last active December 25, 2018 10:09
python iTunes tool (batch claim) | Use at own risk | Modify the sections that obviously require editing
import requests
import configparser
s = requests.session()
from sys import exit
import argparse
parser = argparse.ArgumentParser(prog='piTunes',formatter_class=argparse.RawTextHelpFormatter, description='This python script is the work of @spookyahell.\n'+
@spookyahell
spookyahell / NineKWeu.py
Last active December 20, 2018 17:53
client object for 9kw.eu
from UA import firefox
from time import sleep
import requests
class nineKWclientException(Exception):
pass
class nineKWclient(object):
def __init__(self, APIKEY):
self.APIKEY = APIKEY
@spookyahell
spookyahell / NZBget_rpc.py
Last active December 19, 2018 22:46
Send new password to nzbget RPC by either account or servername
import requests
from sys import argv, exit as sexy_exit
#~ Script to update the password on a NZBget server by finding a very specific username
def setPassword(printX, serverURL = None, username = None, password = None, servername = None):
r = requests.post(serverURL, json = {'method':'loadconfig','params':[]})
if r.status_code != 200:
printX('Assuming auth misconfig')
@spookyahell
spookyahell / py
Last active January 2, 2019 15:39
py for Linux - Ever wanted sth like the py launcher but for linux... just copy this do /bin and chmod +x /bin/py to make it executable
#!/usr/bin/python3.6
from subprocess import call
from shutil import which
from sys import exit as sexy_exit, argv
from re import fullmatch
from os import environ
from os.path import join as path_join, isfile
command = 'python3.6'
@spookyahell
spookyahell / relentless_aria2c_download.py
Created November 27, 2018 15:37
download relentlessly (even upon error - but sleep inbetween
from subprocess import call
from time import sleep
WAIT_TIME = 5 * 60
def download():
x = call(largs)
if x == 1:
if args.relentless:
try:
@spookyahell
spookyahell / fosshub-mkvtoolnix.py
Created November 22, 2018 23:22
Download latest portable x64 version of mkvmerge & Co
import requests
import re
import json
s = requests.Session()
site = 'https://www.fosshub.com/'
downloadAPP = 'MKVToolNix.html'
downloadsite = site + downloadAPP
@spookyahell
spookyahell / NOSUB.srt
Created September 27, 2018 23:07
Ever need to merge subtitles and need a segment for that... use this..
1
00:00:01,000 --> 00:00:03,000
[NO SUBTITLES]
@spookyahell
spookyahell / getAdUri.py
Last active September 22, 2018 16:16
Ever needed that one YouTube ad downloaded but didn't know how to get the URL? (while watch on your computer) Just copy debug infos to clipboard via right click on the viewer and then run this script. (Run in python3.6+)
import re
from tkinter import Tk
AdDocId = None
text = Tk().clipboard_get()
for line in text.split('\n'):
x = re.search('"ad_docid": "(.+)"', line)
if x:
AdDocId = x.group(1)
@spookyahell
spookyahell / aria2c_analyser.py
Last active September 24, 2018 16:53
Returns the maximum connections per server you can make (can vary if you make a manual build)
from subprocess import check_output
import re
from shutil import which
def getMaxConnPerServer():
x = which('aria2c')
if x is None:
print('You have to add aria2c to your path first')
@spookyahell
spookyahell / waitforproxytobealive.py
Last active September 20, 2018 16:52
Wait for proxy to be alive again - uses python VLC bindings to play windows notification sound if available and fetch does not return error
import requests
from requests.exceptions import ProxyError
import time
from time import sleep
from importlib import util
pyvlc = False
if util.find_spec('vlc') != None:
from vlc import MediaPlayer, State