Skip to content

Instantly share code, notes, and snippets.

View zhullyb's full-sized avatar

竹林里有冰 zhullyb

View GitHub Profile
@zhullyb
zhullyb / getCert.py
Last active June 21, 2024 11:57
A python script to get ssl certificate from https://ohttps.com
#!/usr/bin/env python
# A python script to get certificate from https://ohttps.com
# Documentation: https://ohttps.com/docs/cloud/api/api
apiid = "push-example_str"
apikey = ""
certificateid = "cert-example_str"
path = "./"
keyname = "example.key"
@zhullyb
zhullyb / fwwb_crawler.py
Created June 10, 2024 12:58
针对 fwwb.org.cn 的新公告爬虫
#!/usr/bin/env python
import os
import requests
import random
from bs4 import BeautifulSoup as bs
import time
import pytz
import datetime
@zhullyb
zhullyb / douban_crawler.py
Created January 21, 2024 06:14
随手手搓的豆瓣爬虫,不会继续维护
ua = 'Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0'
base_url = 'https://movie.douban.com/subject/'
import requests
from bs4 import BeautifulSoup
import json
def get_html(url):
try:
r = requests.get(url, headers={'User-Agent': ua})
import requests
from bs4 import BeautifulSoup
url = 'https://toot.mantyke.icu/@dontworry'
def search(url, file):
res = requests.get(url)
soup = BeautifulSoup(res.text, 'html.parser')
list_ = [i.string for i in soup.find_all('p')[1:-2]]
@zhullyb
zhullyb / lib_booking.sh
Created June 27, 2023 16:23
浙江工业大学图书馆研讨室预约脚本
#!/bin/bash
# 图书馆研讨室预约脚本
# 需要连接内网使用,或自行配置 frp 内网穿透
base_url="http://172.16.30.83"
url_login="$base_url/ClientWeb/pro/ajax/login.aspx"
url_rev="$base_url/ClientWeb/pro/ajax/reserve.aspx"
main_card_id="202200000000"
pwd=$main_card_id
@zhullyb
zhullyb / zjut_edu_web_login.sh
Last active April 9, 2024 12:16
浙江工业大学的校园网网页认证脚本
#!/bin/bash
# 浙江工业大学校园网网页认证
# 此处需要填写网页认证时使用的账号和密码
user_account=
user_password=
# 针对路由器,用于设置路由表以方便访问学校内网
# 可能需要将路由器 DNS 设置为 172.16.7.10 和 172.16.7.30 以获取正确的内网服务器 ip
if `ip route | grep -q 10.129.0.1`; then