Skip to content

Instantly share code, notes, and snippets.

View arthur-tomsjj's full-sized avatar
😀
Hello this is TomsJj

TomsJj arthur-tomsjj

😀
Hello this is TomsJj
View GitHub Profile
@arthur-tomsjj
arthur-tomsjj / php動態圖片
Created June 2, 2021 15:26
php動態圖片
<?php
$ip = $_SERVER['REMOTE_ADDR'];
$rnd_img = rand(1,5)
$im = imagecreatefrompng("sample".strval($rnd_img).".png");
$text_color = imagecolorallocate($im,0,0,100);
imagestring($im, 5, 100, 25, $ip, $text_color);
header("Content-type: image/png");
@arthur-tomsjj
arthur-tomsjj / 拓元自動買票
Last active May 30, 2021 08:23
拓元自動購票系統
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from PIL import Image
from bs4 import BeautifulSoup
import cv2
import requests
import numpy as np
import pytesseract
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
url = "https://accounts.pixiv.net/login?return_to=https%3A%2F%2Fwww.pixiv.net%2F&lang=zh_tw&source=pc&view_type=page"
driver = webdriver.Chrome("D:\\PythonLab\\chromedriver_win32\\chromedriver.exe")
driver.get(url)
elem_user = driver.find_element_by_xpath("//input[@autocomplete = 'username']")
elem_user.send_keys("電子信箱帳號")
from bs4 import BeautifulSoup
from selenium import webdriver
import time
import os
import requests
#因urllib.request只能用在靜態網頁
#故使用driver來進入動態網頁
driver = webdriver.Chrome('D:\PythonLab\chromedriver_win32/chromedriver.exe')
driver.get("https://pcredivewiki.tw/Gacha")
import urllib.request as req
import requests
from bs4 import BeautifulSoup
import os
file_path = input("輸入本子要存放的路徑:")
Header = {'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36'}
while(1):
@arthur-tomsjj
arthur-tomsjj / ehentai crawler test
Created July 22, 2020 08:19
i am hentai senshi
####### e-hentai本子 爬蟲測試 #######
import urllib.request as req
import requests
from bs4 import BeautifulSoup
import os
import time
url = 'https://e-hentai.org/s/42331c9fc6/1467036-1'
Header = {'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36'}
@arthur-tomsjj
arthur-tomsjj / tetris
Last active October 22, 2020 12:44
tetris
#include<iostream>
#include<windows.h>
#include<string>
#include<cstdlib>
#include<conio.h>
#include<ctime>
/* 俄羅斯方塊 Tetris */
using namespace std;