This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import requests | |
import random | |
from bs4 import BeautifulSoup as bs | |
import time | |
import pytz | |
import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |