Skip to content

Instantly share code, notes, and snippets.

@heartleth
heartleth / hello.py
Last active December 11, 2021 14:50
프린터기
from PIL import Image
import pyautogui as pag
import keyboard
import numpy as np
import time
width = 100
bigimg = Image.open('<YOUR FILE>.jpg')
img = bigimg.resize((width, int((bigimg.size[1]/bigimg.size[0]) * width)))
#! 모바일 버젼도 안됨니다ㅠㅠ
(() => {
const formdata = require("form-data");
const axios = require("axios");
const jsdom = require("jsdom");
const fs = require("fs");
axios.get("https://m.dcinside.com/write/programming").then((e) => {
const html = e.data;
fs.writeFileSync("./index.html", html);
@heartleth
heartleth / asdf.js
Last active January 13, 2021 07:59
디씨 개추 누르기
const axios = require('axios');
(async()=>{
const no = 1589538;
const data = await axios.get(`https://gall.dcinside.com/board/view/?id=programming&no=${no}`)
const cookies = data.headers['set-cookie'].map(e=>e.match(/^[^;]+/)[0]).reduce((a, b) => a + b + '; ', '');
const token = cookies.match(/(?<=(ci_c=))[^;]+/)[0];
const gall_id = 'programming';