Comments (2)
We have let this program load some custom code during execution. You can write a module file like this:
from autoxuexiplaywright.sdk.module import Module, module_entrance
from autoxuexiplaywright.events import EventID, find_event_by_id
from PIL import Image
from io import BytesIO
from urllib import parse
from pyzbar.pyzbar import decode
@module_entrance
class CustomPushModule(Module):
@property
def name(self)->str:
return "CustomPushModule"
@property
def author(self)->str:
return "You"
def start(self):
find_event_by_id(EventID.QR_UPDATED).add_callback(self.push)
def push(self, image:bytes):
img = Image.open(BytesIO(image))
data = decode(img)[0]
urla1=data.data.decode()
dtxuexi="dtxuexi://appclient/page/study_feeds?url="+parse.quote(urla1)
print("dtxuexi=",dtxuexi)
This script will print dtxuexi to stdout, but you can always do whatever you like, such as pushing to Server-Chan.
Module files are usually created at %USERPROFILE%\AppData\Local\AutoXuexiPlaywright\modules
on Windows, with .py
as its suffix name. On Linux, you can put module files at ${XDG_DATA_HOME:-${HOME}/.local/share}/AutoXuexiPlaywright/modules
from autoxuexiplaywright.
wow ,it's so cool ,i'll try to it.
from autoxuexiplaywright.
Related Issues (13)
- 是否可以设置学习哪些模块
- 跳过的项目设置 HOT 3
- 启动后需要大概1分钟才出现登录二维码 HOT 3
- The current version cannot learn HOT 10
- [New Feature]: 希望能增加docker镜像 HOT 1
- 如何调试滑动验证码求解脚本 HOT 4
- 封号问题请教 HOT 2
- [Bug]: 前两天还可以刷出十几分, 今天刷不了了, 可以麻烦看看吗, 感谢 HOT 3
- [Bug]: 按照要求全部安装好了,但是最后出现一个bug,请问如何解决,谢谢。
- [Bug]: waiting for locator("section[data-data-id=\"zhaiyao-title\"] span.moreUrl").first to be visible HOT 1
- 安装依赖问题 HOT 1
- 运行提示
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autoxuexiplaywright.