Skip to content

Instantly share code, notes, and snippets.

View monsterxcn's full-sized avatar
🥱
上班!

Monst.x monsterxcn

🥱
上班!
View GitHub Profile
@monsterxcn
monsterxcn / chims-crawler.py
Last active August 21, 2021 08:27
Python 使用 Playwright 爬取诸葛神算三百八十四签,保存为 JSON 供后续使用。来源:https://www.laohuangli.net/suanming/zhuge.html
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import time, ujson
from playwright.sync_api import sync_playwright
chims = []
(STARTFLAG, ENDFLAG) = (1, 385)
# 懒得用异步了
@monsterxcn
monsterxcn / dash.svg
Last active August 22, 2021 07:10
派蒙特调诸葛签的 HTML 模板,整理修改自 genshin.pub F12
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@monsterxcn
monsterxcn / nonebot_plugin_akinator.py
Last active August 29, 2021 10:17
Akinator 网络天才 NoneBot2 插件 via @NinjaSnail1080/akinator.py
import akinator
from akinator.async_aki import Akinator
from typing import Optional
from nonebot.adapters.cqhttp import Bot, Message
from nonebot.adapters.cqhttp.event import MessageEvent
from nonebot.log import logger
from nonebot.plugin import on_command
aki = Akinator()
// version v0.0.2
// create by ruicky
// detail url: https://github.com/ruicky/jd_sign_bot
const exec = require('child_process').execSync;
const fs = require('fs');
const rp = require('request-promise');
const download = require('download');
// 公共变量
@monsterxcn
monsterxcn / tencent_ocr_artifact.py
Last active September 8, 2021 06:36
Python 腾讯云通用印刷体识别(高精度版)分析原神圣遗物截图并返回为可莉特调评分 API 可用格式(也许
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import asyncio, difflib, hashlib, hmac, json, re, time
from datetime import datetime
from httpx import AsyncClient
secretId = "AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
secretKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
@monsterxcn
monsterxcn / tencent_ocr_artifact_rating.py
Last active September 8, 2021 14:15
Python 利用腾讯云 OCR 处理圣遗物截图并自行计算圣遗物评分
# -*- coding: utf-8 -*-
import asyncio, difflib, hashlib, hmac, json, re, time
from datetime import datetime
from httpx import AsyncClient
secretId = "AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
secretKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
imageUrl = "https://gchat.qpic.cn/gchatpic_new/38877256/957765668-2255829091-2FBAE655FCB15D93E873F83E3D361B90/0?term=255"
@monsterxcn
monsterxcn / 御神签.txt
Last active September 9, 2021 02:12
原神「御神签」汇总
——末吉——
空中的云层偏低,并且仍有堆积之势,
不知何时雷雨会骤然从头顶倾盆而下。
但是等雷雨过后,还会有彩虹在等着。
宜循于旧,守于静,若妄为则难成之。
今天的幸运物是:树上掉落的「松果」。
并不是所有的松果都能长成高大的松树,
成长需要适宜的环境,更需要一点运气。
所以不用给自己过多压力,耐心等待彩虹吧。
@monsterxcn
monsterxcn / README.md
Last active October 6, 2021 01:36
Systemctl 守护 Nonebot2 QQ 机器人

准备

mkdir /data/bot
cd /data/bot
git clone http://github.com/monsterxcn/Genshin_QBot.git .
mkdir go-cqhttp
cd go-cqhttp
wget https://github.com/Mrs4s/go-cqhttp/releases/download/v1.0.0-beta7-fix2/go-cqhttp_linux_amd64.tar.gz
tar xvzf go-cqhttp_linux_amd64.tar.gz
@monsterxcn
monsterxcn / live_notes.py
Created October 18, 2021 03:08
PIL 绘制原神实时便笺草稿(原谅我两空格缩进还手搓 CQ 码
import base64
import hashlib
import json
import os
import sys
import time
from io import BytesIO
from random import randint
import nonebot

API

::: tip API 调用响应格式

字段名 类型 说明
success bool 接口调用结果
msg string 返回消息,出错时此字段包含错误消息
data any 返回数据,可能为 objectstringarray 类型