Skip to content

Instantly share code, notes, and snippets.

View upbit's full-sized avatar

Zhou Hao upbit

  • China
View GitHub Profile
@upbit
upbit / jsonp-proxy.py
Created July 1, 2020 10:51 — forked from netj/jsonp-proxy.py
A primitive JSON-P proxy in Python compatible to node-jsonp-proxy (support python3)
#!/usr/bin/env python
# A very primitive JSON-P proxy in Python
# Derived from Patric Fornasier's Blog: http://patforna.blogspot.com/2009/03/jsonp-proxy-server.html
# Made compatible with node-jsonp-proxy: https://github.com/clintandrewhall/node-jsonp-proxy
import sys
import re
import urllib
if sys.version_info >= (3, 0):
from http.server import BaseHTTPRequestHandler, HTTPServer
@upbit
upbit / README.md
Last active March 27, 2024 00:29 — forked from ZipFile/README.md
Pixiv OAuth Flow (with Selenium)

Retrieving Auth Token (with Selenium)

  1. Setup, install Selenium/ChromeDriver
pip install selenium
# download chromedriver from https://chromedriver.storage.googleapis.com/index.html?path=91.0.4472.101/
# eg: wget https://chromedriver.storage.googleapis.com/91.0.4472.101/chromedriver_mac64.zip && unzip chromedriver_mac64.zip
import math
import os
import sys
import traceback
import modules.scripts as scripts
import gradio as gr
from modules.processing import Processed, process_images, fix_seed