Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Loading...

impshum

:octocat:
Loading...
View GitHub Profile
View worldcat.py
from bs4 import BeautifulSoup
import requests
import urllib.parse
import pandas as pd
import json
import csv
def build_query(a, b):
a = a.replace(' ', '+')
@impshum
impshum / reddit_autovote_all.js
Created Jun 12, 2020
Automagically Up/downvote all on page | Reddit
View reddit_autovote_all.js
// OPEN JS CONSOLE THEN
// UPVOTE
$('.up').click();
// DOWNVOTE
$('.down').click();
// P.S. NOT RECOMMENDED
@impshum
impshum / return_user_input_from_dict.py
Last active Mar 14, 2020
Return user input from dictionary
View return_user_input_from_dict.py
things = {
'1': 'one',
'2': 'two',
'3': 'three',
'0': 'EXIT'
}
def menu(options, menu_text):
while 1:
for k, v in options.items():
@impshum
impshum / changer.py
Last active Mar 14, 2020
Change colour of screen thingy with pywebview
View changer.py
import webview
class Api:
def __init__(self):
self.recording = False
def record(self):
if not self.recording:
self.recording = True
View tweepy_dl_conf.ini
[TWITTER]
twitter_consumer_key = XXXX
twitter_consumer_secret = XXXX
twitter_access_token = XXXX
twitter_access_token_secret = XXXX
View inviter.py
import configparser
import praw
import pickledb
import time
import sys
from requests import get
import datetime
ignore = ['-en-', 'trite_username', '0imp', '1uvx', '--og', 'Mr_E']
View scrape.py
from bs4 import BeautifulSoup
from requests import get
import csv
def main(query, max_pages, outfile):
query = query.replace(' ', '%20')
page = 1
next = True
with open(outfile, 'w+') as csv_file:
View scrape_ebay.py
from bs4 import BeautifulSoup
from requests import get
from fake_useragent import UserAgent
import csv
max_pages = 2
products_per_page = 100
min_price = 10
max_price = 100
@impshum
impshum / alacalc.py
Created Jun 28, 2019
Alacalc session python
View alacalc.py
import requests
data = {
'email': 'XXXX',
'api_access_key': 'XXXX'
}
s = requests.Session()
s.post('https://www.alacalc.com/api/v1/sessions', data=data)
View config.ini
[REDDIT]
username = XXXX
password = XXXX
client_id = XXXX
client_secret = XXXX
You can’t perform that action at this time.