Skip to main content

complete mission, get money, from v2ex

Project description

Latest Version

        _____                 _       _ _                   _         _
       / __  \               | |     (_) |                 (_)       (_)
__   __`' / /' _____  __   __| | __ _ _| |_   _   _ __ ___  _ ___ ___ _  ___  _ __
\ \ / /  / /  / _ \ \/ /  / _` |/ _` | | | | | | | '_ ` _ \| / __/ __| |/ _ \| '_ \
 \ V / ./ /__|  __/>  <  | (_| | (_| | | | |_| | | | | | | | \__ \__ \ | (_) | | | |
  \_/  \_____/\___/_/\_\  \__,_|\__,_|_|_|\__, | |_| |_| |_|_|___/___/_|\___/|_| |_|
                                           __/ |
                                          |___/

基本简介:

模拟登录 v2ex 完成任务领钱 OvO

功能和亮点

  • Python 3.10+ support

  • 签到领钱

  • 本地日志记录,查询

  • 查询连续登录天数

  • 签到失败提醒

基本安装

$ (sudo)pip -U install v2ex_daily_mission

请确保版本号大于等于 0.7.0,因为 V2EX 增加了验证码,可以看 issue #13

如何使用

配置文件

使用自带的子命令初始化(可能需要 root 权限或者管理员权限):

$ v2ex init

按照提示输入cookie和日志路径。日志路径举个例子:/home/lord63/code/v2ex_daily_mission/

生成的配置文件的默认地址, Linux 在 /usr/local/bin/v2ex_config.json。你也可以手动指定生成的配置文件的路径:

$ v2ex init --directory /home/lord63/code/v2ex_daily_mission

另外如果有需要,可以开启签到失败通知提醒,目前支持 bark 和 slack 通知,v0.8.0 以上版本支持。

  • bark配置:只支持 iOS,下载安装后,选择喜欢的格式在 init 的时候选择 bark 的通知方式并填入 url 即可。

  • slack配置:前往自定义集成页面(https://youworkspace.slack.com/apps/manage/custom-integrations)并添加一个新的 webhook 配置, 在 init 的时候选择 slack 的通知方式并填入 webhook url 即可

开始使用

完成任务得到钱:

$ v2ex sign

查看最近的日志情况(默认天数 5):

$ v2ex read

也可以通过参数来查看最近的情况

$ v2ex read -c NUMBER

查看已经连续登录多少天

$ v2ex last

测试失败通知提醒(v0.8.0 以上版本支持)

$ v2ex notify

以上的是使用默认的配置文件,你也可以自己手动指定配置文件的地址,使用 --config 参数, 比如在 Linux 下:

$ v2ex --config /home/lord63/v2ex_config.json sign

通过 v2ex -h 和各个子命令的帮助文档获得使用更为详细的使用帮助

Linux 用户建议将任务加入 cron 定时运行(建议每天执行两次,防止意外失败导致中断签到天数), 比如:

0 9,21 * * *  /usr/local/bin/v2ex sign

实际使用举例

首次签到:

$ v2ex sign
Today: 20140731 的每日登录奖励 26 铜币
Total: 5439.0

如果你已经签到过了:

$ v2ex sign
You have completed the mission today.

本地日志查询最近签到领钱的情况(默认设置是 5 ):

$ v2ex read
2014-07-27 19:12:03,902 [INFO] 20140727 的每日登录奖励 15 铜币    Total:5346.0
2014-07-28 19:12:03,751 [INFO] 20140728 的每日登录奖励 28 铜币    Total:5374.0
2014-07-29 19:12:03,750 [INFO] 20140729 的每日登录奖励 27 铜币    Total:5401.0
2014-07-30 19:12:03,471 [INFO] 20140730 的每日登录奖励 12 铜币    Total:5413.0
2014-07-31 19:12:03,417 [INFO] 20140731 的每日登录奖励 26 铜币    Total:5439.0

你当然也可以指定显示日志的数量:

$ v2ex read -c 1
2014-07-31 19:12:03,417 [INFO] 20140731 的每日登录奖励 26 铜币    Total:5439.0

查询你连续登录的天数:

$ v2ex last
已连续登录 54 天

Development

首先安装依赖(使用 uv):

$ uv sync --group dev

运行测试:

$ uv run pytest tests/

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

v2ex_daily_mission-0.9.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

v2ex_daily_mission-0.9.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file v2ex_daily_mission-0.9.0.tar.gz.

File metadata

  • Download URL: v2ex_daily_mission-0.9.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for v2ex_daily_mission-0.9.0.tar.gz
Algorithm Hash digest
SHA256 737d132470360ac05ce4105c2bc791b94c62238577964cdc94af3f189a5372ea
MD5 c327a7f5fa634301a58bfc5b56b80f7b
BLAKE2b-256 612ffcab343d2d2178bfd3438354985f8a120e5cc5daf4040340544d29d643bc

See more details on using hashes here.

File details

Details for the file v2ex_daily_mission-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: v2ex_daily_mission-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for v2ex_daily_mission-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d7282c20d0181041f1ef34f7d63ebf6627c2c65ecb823b3439e257ca05e9bbb
MD5 56cadc3cc4dac4197908acebcf22de67
BLAKE2b-256 74d82941962b8447389330d11d2abd9fd033344e470ba43f8ead75eb6a8aa230

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page