Dragon
  • 欢迎来到主题派官网,主题源码,插件,模板下载。wordpress,thinkphp,discuz,织梦模板,小程序。
主题派主题派  2023-06-16 15:38 主题派 隐藏边栏 |   抢沙发  0 
文章评分 0 次,平均分 0.0

开源免费基于 Python3 的简约 OneDrive 网盘目录列表–OneList

这个程序是架设在服务器然后读取 OneDrive 网盘文件的!

OneList 是一个 Python3 的项目 (Flask + Redis).

GitHub 地址: https://github.com/0oVicero0/OneList/
演示地址: https://moeclub.org/onedrive/
特别感谢: @sxyazi

特点:
1. 简约风格。
2. 优化 Redis 缓存策略。
3. 专注于 “目录列表” 功能。
4. 使用不同的 API (使用范围较小, 带全局管理员的账户使用是没有问题的,如: E3_MSDN)。

安装配置:

Installation

# apt install python3-pip redis-server

git clone https://github.com/0oVicero0/OneList.git
cd OneList

pip3 install -r requirements.txt
# Get auth_token –> Get refresh_token –> Setup config

gunicorn app:app -b 127.0.0.1:5000 -D

Configuration

Create a config file named config.json

{
“token": “<refresh_token>",
“location_path": “/",
“start_directory": “/",
“refresh_seconds": 720,
“metadata_cached_seconds": 768,
“structure_cached_seconds": 840
}

Get auth_token

https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&client_id=ea2b36f6-b8ad-40be-bc0f-e5e4a4a7d4fa&redirect_uri=http://localhost/onedrive-login

Get refresh_token

code="<auth_token>"
wget –no-check-certificate –post-data="client_id=ea2b36f6-b8ad-40be-bc0f-e5e4a4a7d4fa&client_secret=h27zG8pr8BNsLU0JbBh5AOznNS5Of5Y540l/koc7048=&grant_type=authorization_code&resource=https://api.office.com/discovery/&redirect_uri=http://localhost/onedrive-login&code=$code" 'https://login.microsoftonline.com/common/oauth2/token’ -qO-

 

「点点赞赏,手留余香」

还没有人赞赏,快来当第一个赞赏的人吧!

主题派给主题派打赏
×
予人玫瑰,手有余香
  • 2
  • 5
  • 10
  • 20
  • 50
2
支付

本文为原创文章,版权归所有,欢迎分享本文,转载请保留出处!

主题派
主题派 关注:0    粉丝:0
Wordpress主题,插件,源码商城

发表评论

表情 格式 贴图 链接 私密 签到 常用语
扫一扫二维码分享
×
艾瑞克网