Giter Site home page Giter Site logo

nonebot_plugin_leetcode2's Introduction

nonebot_plugin_leetcode2

基于nonebot2的leetcode查询插件。

目前已实现功能

  • 对指令/每日一题/lc/leetcode回复,发送今天的每日一题。

  • 可搜索leetcode题目,指令/lc搜索 XXXXX/lc查找 XXXXX/leetcode搜索 XXXXX,将以关键词“XXXXX”进行leetcode搜索,发送搜索到的第一道题。

  • 随机一题,指令/lc随机/lc随机一题/leetcode随机将请求leetcode随机一题,发送请求到的任意题目。

  • 查询用户信息/lc查询 XXXXX/lc查询用户 XXXXX/leetcode查询 XXXXX,可查询用户基本信息,XXXXX为用户ID(不能用用户名)。

  • 加入计划任务 每日在指定时间向指定群和好友发送当天的每日一题

使用方法

1.在机器人plugins目录下进行git clone

2.使用nb plugin install nonebot_plugin_leetcode2

3.使用pip install nonebot_plugin_leetcode2,并修改插件加载。

注意事项

若有需要使用本插件计划任务相关功能,请在.env.*文件中加入以下设置:

LEETCODE_QQ_FRIENDS=[3102002900]
LEETCODE_QQ_GROUPS=[805324289]
LEETCODE_INFORM_TIME=[{"HOUR":20,"MINUTE":1},{"HOUR":20,"MINUTE":10},{"HOUR":0,"MINUTE":1}]

其中LEETCODE_QQ_FRIENDS是欲定期发送题目的好友QQ,LEETCODE_QQ_GROUPS是定期发送题目的群聊群号,LEETCODE_INFORM_TIME是定时的时间。这和另一个leetcode插件的配置项是相同的。

当然,不添加配置项也可正常使用其他功能。感谢@j1g5awi佬的检查与提醒。

另外,由于使用到nonebot-plugin-apscheduler插件,请安排插件导入顺序以免发生错误。

nonebot_plugin_leetcode2's People

Contributors

nranphy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nonebot_plugin_leetcode2's Issues

centos系统中文不支持

部署在centos7系统的该插件,在运行过程中出现了中文不显示的问题,如图所示:所有的中文文字都变成了方块
3263193078-127180351-1C1D945044747F69573EF9A57ECDBCF6

安装时出现error

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
nonebot-plugin-acm-reminder 0.1.4 requires httpx>=0.23.3, but you have httpx 0.20.0 which is incompatible.
nonebot-plugin-acm-reminder 0.1.4 requires nonebot-plugin-apscheduler>=0.2.0, but you have nonebot-plugin-apscheduler 0.1.4 which is incompatible.
nonebot-plugin-acm-reminder 0.1.4 requires nonebot-plugin-htmlrender>=0.2.0.3, but you have nonebot-plugin-htmlrender 0.0.4.8 which is incompatible.
nonebot-plugin-resolver 1.0.11 requires httpx<0.24,>=0.23, but you have httpx 0.20.0 which is incompatible.
image

lc每日报错

报错内容为
f.write(today_data[2])
UnicodeEncodeError: 'gbk' codec can't encode character '\xa0' in position 261: illegal multibyte sequence

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.