E5 自动续期

Related tags

MiscellaneousAutoApiP
Overview

请选择跳转

新版本系统 (2021-2-9采用):

  • 以后更新都在AutoApi,采用v0.0版本号覆盖式更新

  • 保留1到2个稳定的简易版,防止萌新大范围报错

AutoApiP ( 即v5.0,稳定版 ) ———— E5自动续期

AutoApi系列:AutoApi(v1.0)AutoApiSecret(v2.0)AutoApiSR(v3.0)AutoApiS(v4.0)AutoApiP(v5.0)、AutoApi(v6.0)

说明

  • E5自动续期程序,但是不保证续期
  • 设置了周六日(UTC时间)不启动自动调用,周1-5每6小时自动启动一次 (修改看教程)

相关

步骤

  • 准备工具:

    • E5开发者账号(非个人/私人账号
      • 管理员号 ———— 必选
      • 子号 ———— 可选 (不清楚微软是否会统计子号的活跃度,想弄可选择性补充运行)
    • rclone软件,下载地址 rclone.org ,(windows 64)
    • 教程图片看不到请科学上网
  • 步骤大纲:

    • 微软方面的准备工作 (获取应用id、密码、密钥)
    • GIHTHUB方面的准备工作 (获取Github密钥、设置secret)
    • 试运行

微软方面的准备工作

  • 第一步,注册应用,获取应用id、secret

    • 1)点击打开仪表板,左边点击所有服务,找到应用注册,点击+新注册

    image

    image

    • 3)复制应用程序(客户端)ID到记事本备用(获得了应用程序ID!),点击左边管理的证书和密码,点击+新客户端密码,点击添加,复制新客户端密码的保存(获得了应用程序密码!)

    image

    image

    • 4)点击左边管理的API权限,点击+添加权限,点击常用Microsoft API里的Microsoft Graph(就是那个蓝色水晶), 点击委托的权限,然后在下面的条例选中下列需要的权限,最后点击底部添加权限

    赋予api权限的时候,选择以下几个(全选Read也行)

              Calendars.ReadWrite、Contacts.ReadWrite、Directory.ReadWrite.All、
              
              Files.ReadWrite.All、MailboxSettings.ReadWrite、Mail.ReadWrite、
              
              Notes.ReadWrite.All、People.Read.All、Sites.ReadWrite.All、
              
              Tasks.ReadWrite、User.ReadWrite.All
    

    image

    image

    image

    • 5)添加完自动跳回到权限首页,点击代表授予管理员同意

      如若是子号运行,请用管理员账号登录仪表板找到子号注册的应用,点击“代表管理员授权”。

    image

  • 第二步,获取refresh_token(微软密钥)

    • 1)rclone.exe所在文件夹,shift+右键,在此处打开powershell,输入下面修改后的内容,回车后跳出浏览器,登入e5账号,点击接受,回到powershell窗口,看到一串东西。

            ./rclone authorize "onedrive" "应用程序(客户端)ID" "应用程序密码"
      
    • 2)在那一串东西里找到 "refresh_token":" ,从双引号开始选中到 ","expiry":2021 为止(就是refresh_token后面双引号里那一串,不要双引号),如下图,右键复制保存(获得了微软密钥

    image


GITHUB方面的准备工作

  • 第一步,fork本项目

    登陆/新建github账号,回到本项目页面,点击右上角fork本项目的代码到你自己的账号,然后你账号下会出现一个一模一样的项目,接下来的操作均在你的这个项目下进行。

    image

  • 第二步,新建github密钥

    • 1)进入你的个人设置页面 (右上角头像 Settings,不是仓库里的 Settings),选择 Developer settings -> Personal access tokens -> Generate new token

    image

    image

    • 2)设置名字为 GH_TOKEN , 然后勾选repo,点击 Generate token ,最后复制保存生成的github密钥(获得了github密钥,一旦离开页面下次就看不到了!)

    image

  • 第三步,新建secret

    • 1)依次点击页面上栏右边的 Setting -> 左栏 Secrets -> 右上 New repository secret,新建4个secret: GH_TOKEN、MS_TOKEN、CLIENT_ID、CLIENT_SECRET

    image

    image

    (以下填入内容注意前后不要有空格空行)

    GH_TOKEN

    github密钥 (第三步获得),例如获得的密钥是abc...xyz,则在secret页面直接粘贴进去,不用做任何修改,只需保证前后没有空格空行

    MS_TOKEN

    微软密钥(第二步获得的refresh_token)

    CLIENT_ID

    应用程序ID (第一步获得)

    CLIENT_SECRET

    应用程序密码 (第一步获得)

试运行

  • 1)点击上栏中间的Action进入运行日志页面,中间应该有个绿色按钮(I understand my workflow...),点击。

自动刷新后,会看到左边有两个流程,一个Auto Api Pro,一个Update Token (这两个流程名字前面应该是有两个黄色感叹号的)。 分别点进去,然后会看到有个黄条(this schedule was disabled......),点击 enable workflow 按钮,两个流程都要按这个!

(不确定是否都需要进行这一步,我自己做视频教程的时候发现有的。如果你没有,直接忽略并往下进行,能正常运行就可以了 )

  • 2)点击两次右上角的星星(star,就是fork按钮的隔壁)启动action,再点击上面的Action选择Auto Api Pro流程 -> build -> runapi 就能看到每次的运行日志,看看运行状况

(必需点进去build里面的run api看下,api有没有调用到位,有没有出错。外面的Auto Api打勾只能说明运行是正常的,我们还需要确认api调用成功了,就像图里的一样)

image

  • 3)再点两次星星,查看是否能再次成功运行

    然后点击Action里的 update token 流程 -> build -> update token ,日志里显示“微软密钥上传成功”。 同时,依次点击页面上栏右边的 Setting -> 左栏 Secrets(也就是Github方面准备的第三步的secret页面),应该能看到MS_TOKEN显示刚刚update了

    (这一步是为了保证重新上传到secret的token是正确的)

教程最后

程序会自行按计划启动,不必操心。

    但是github更新了防止薅羊毛的规则,如果仓库60天无任何变动,将会暂停Action,但是会发邮件通知,所以请留意邮箱,收到邮件请上来手动启动一下action。
   (我还没有收到过此邮件,但是据说邮件里会有启动链接,或者上来按两次星星按钮就行)

P版(AutoApiP)用户请留意是否会触发此暂停规则,由于P版采取了新方案,是否能跳过github检测活跃呢?如果P版收到暂停邮件,最好在issues的这个帖子触发暂停统计里留言

教程完


额外设置 (看不懂请忽略)##

  • 定时启动修改

  • 多账号/应用支持

  • 超级参数设置

定时启动修改

我设定的每6小时自动运行一次(周六日不启动),每次调用3轮(点击右上角星星/star也可以立马调用一次),你们自行斟酌修改(我也不知道保持活跃要调用多少次、多久):

  • 定时自动启动修改地方:在.github/workflow/autoapi.yml(只修改这一个)文件里,自行百度cron定时任务格式,最短每5分钟一次

image

多账号/应用支持

如果想输入第二账号或者应用,请按上述步骤获取第二个应用的id、密码、微软密钥:

再按以下步骤:

1)增加secret

依次点击页面上栏右边的 Setting -> 左栏 Secrets -> 右上 New repository secret,新增加secret:APP_NUM、MS_TOKEN_2、CLIENT_ID_2、CLIENT_SECRET_2

APP_NUM

账号/应用数量(现在例如是两个账号/应用,就是2 ;3个账号就填3,日后如果想要增加请修改APP_NUM)

MS_TOKEN_2

第二个账号的微软密钥(第二步refresh_token),(第三个账号/应用就是MS_TOKEN_3,如此类推)

CLIENT_ID_2

第二个账号的应用程序ID (第一步获取),(第三个账号/应用就是CLIENT_ID_3,如此类推)

CLIENT_SECRET_2

第二个账号的应用程序密码 (第一步获取),(第三个账号/应用就是CLIENT_SECRET_3,如此类推)

2)修改.github/workflows/里的两个yml文件(超过5个账号需要更改,5个及以下暂时不用修改文件,忽略这一步

yml文件我已经注明了,看着改就行,我已经写入5个账号模板了,跟着复制粘贴很简单的(没有找到比较好的自动方案)

超级参数设置

runapi.py 文件第11行有个config_list,里面是以下参数配置

· 轮数:

         就是一次运行要跑多少轮api,也就是启动一次会重复跑几圈

· 是否启动随机时间(默认关闭):

        这个是每一轮结束,要不要等一个随机时间再开始调用下一轮。后面两个参数就是生成随机时间的,例如设置600,1200,就会延时600-1200s之间。

· 是否开启随机api顺序(默认开启):

        不开启就是初版10个api,固定顺序。开启就是28个api抽12个随机排序。

· 是否开启各api延时(默认关闭):

        这个是每个api之间要不要开启延时。后面两参数参考“随机时间”

· 是否开启各账号延时(默认关闭):

        这个是每个账号/应用之间要不要开启延时。后面两参数参考“随机时间”

(延时的设置是会延长运行时间的,全关闭大概每次运行1min,开启就会适当延长)

结尾

有事发issue

Q群:657581700 (项目相关讨论)

                          wangziyingwen
Liquid Rocket Engine Cooling Simulation

Liquid Rocket Engine Cooling Simulation NASA CEA The implemented class calls NASA CEA via RocketCEA. INSTALL GUIDE In progress install instructions fo

John Salib 1 Jan 30, 2022
This is a simple leaderboard for 30 days of Google Cloud program for students of ASIET

30daysleaderboard #Hacktoberfest - Please don't make changes in readme file. Only improvement in the project will be accepted. Update - Now if you run

5 Oct 29, 2021
Discover and load entry points from installed packages

Entry points are a way for Python packages to advertise objects with some common interface. The most common examples are console_scripts entry points,

Thomas Kluyver 69 Jul 05, 2022
Hospitality app for ERPNext to manage hotels & restaurants.

Hospitality ERPNext Hospitality module is designed to handle workflows for Hotels and Restaurants. Manage Restaurants The Restaurant module in ERPNext

Frappe 19 Dec 26, 2022
A casual IDOR exploiter that provides .csv files of url and status code.

IDOR-for-the-casual Do you like to IDOR? Are you a Windows hax0r? Well have I got a tool for you... A casual IDOR exploiter that provides .csv files o

Ben Wildee 2 Jan 20, 2022
script buat mengcrack

setan script buat mengcrack cara install $ pkg install upgrade && pkg update $ pkg install python $ pkg install git $ pip install requests $ pip insta

1 Nov 03, 2021
The-White-Noise-Project - The project creates noise intentionally

The-White-Noise-Project High quality audio matters everywhere, even in noise. Be

Ali Hakim Taşkıran 1 Jan 02, 2022
Create a program for generator Truth Table

Python-Truth-Table-Ver-1.0 Create a program for generator Truth Table in here you have to install truth-table-generator module for python modules inst

JehanKandy 10 Jul 13, 2022
Simple kivy project to help new kivy users build android apps with python.

Kivy Calculator A Simple Calculator made with kivy framework.Works on all platforms from Windows/linux to android. Description Simple kivy project to

Oussama Ben Sassi 6 Oct 06, 2022
🙌Kart of 210+ projects based on machine learning, deep learning, computer vision, natural language processing and all. Show your support by ✨ this repository.

ML-ProjectKart 📌 Repository This kart showcases the finest collection of all projects based on machine learning, deep learning, computer vision, natu

Prathima Kadari 203 Dec 28, 2022
An upgraded version of extractJS

extractJS_2.0 An enhanced version of extractJS with even more functionality Features Discover JavaScript files directly from the webpage Customizable

Ali 4 Dec 21, 2022
script to analyze EQ decay using python

pyq_decay script to analyze EQ decay using python PyQ Decay ver 1.0 A pythonic script to analyze EQ aftershock decay using method of Omori (1894), Mog

1 Nov 04, 2021
PatZilla is a modular patent information research platform and data integration toolkit with a modern user interface and access to multiple data sources.

PatZilla is a modular patent information research platform and data integration toolkit with a modern user interface and access to multiple data sources.

IP Tools 68 Dec 14, 2022
switching computer? changing your setup? You need to automate the download of your current setup? This is the right tool for you :incoming_envelope:

🔮 setup_shift(SS.py) switching computer? changing your setup? You need to automate the download of your current setup? This is the right tool for you

Mohamed Elfaleh 15 Aug 26, 2022
Automated moth pictures for biodiversity research

Automated moth pictures for biodiversity research

Ludwig Kürzinger 1 Dec 16, 2021
A Python wrapper for Matrix Synapse admin API

Synapse-admin-api-python A Python wrapper for Matrix Synapse admin API. Versioning This library now supports up to Synapse 1.45.0, any Admin API intro

Knugi 9 Sep 28, 2022
Chat meetup

FLiP-Meetup-Chat Chat meetup create function bin/pulsar-admin functions create --auto-ack true --jar pulsardjlexample-1.0.jar --classname "dev.pulsarf

Timothy Spann 1 Dec 09, 2021
Attempt at creating organized collection of little handy snippets of code I'm receiving along the way

ChaosCode Attempt at creating organized collection of little handy snippets of code I'm receiving along the way I always considered coding and program

INFU 4 Nov 26, 2022
Project 2 for Microsoft Azure on WUT

azure-proj2 Project 2 for Microsoft Azure on WUT Table of contents Team Tematyka projektu Architektura Opis rozwiązania Demo dzałania The Team Krzyszt

1 Dec 07, 2021
Additional useful operations for Python

Pyteal Extensions Additional useful operations for Python Available Operations MulDiv64: calculate m1*m2/d with no overflow on multiplication (TEAL 3+

Ulam Labs 11 Dec 14, 2022