Giter Club home page Giter Club logo

Comments (2)

arenekosreal avatar arenekosreal commented on September 23, 2024

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.

hublllllli avatar hublllllli commented on September 23, 2024

wow ,it's so cool ,i'll try to it.

from autoxuexiplaywright.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.