这个程序是架设在服务器然后读取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-
