All Projects → Mapaler → Getonedrivedirectlink

Mapaler / Getonedrivedirectlink

Licence: lgpl-3.0
批量获取OneDrive直链

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Getonedrivedirectlink

Onedrivecmd
A command line client for Onedrive.
Stars: ✭ 341 (+244.44%)
Mutual labels:  onedrive
Onedrived Dev
A Microsoft OneDrive client for Linux, written in Python3.
Stars: ✭ 672 (+578.79%)
Mutual labels:  onedrive
Cyberduck
Cyberduck is a libre FTP, SFTP, WebDAV, Amazon S3, Backblaze B2, Microsoft Azure & OneDrive and OpenStack Swift file transfer client for Mac and Windows.
Stars: ✭ 1,080 (+990.91%)
Mutual labels:  onedrive
Onedrive
#1 Free OneDrive Client for Linux
Stars: ✭ 5,104 (+5055.56%)
Mutual labels:  onedrive
Autoapisecret
加密版,应用id/机密不再可见
Stars: ✭ 597 (+503.03%)
Mutual labels:  onedrive
Packtpub Crawler
Download your daily free Packt Publishing eBook https://www.packtpub.com/packt/offers/free-learning
Stars: ✭ 717 (+624.24%)
Mutual labels:  onedrive
Keepassonedrivesync
Allows syncing of KeePass databases stored on OneDrive Personal, OneDrive for Business or SharePoint
Stars: ✭ 270 (+172.73%)
Mutual labels:  onedrive
Aria2.conf
Aria2 配置文件 | OneDrive & Google Drvive 离线下载 | 百度网盘转存
Stars: ✭ 1,321 (+1234.34%)
Mutual labels:  onedrive
Onedrive Cf Index
🏵 Probably the best looking OneDrive Index around! Powered by Cloudflare Workers.
Stars: ✭ 622 (+528.28%)
Mutual labels:  onedrive
Drivebackupv2
Uploads Minecraft backups to Google Drive/OneDrive or by (S)FTP
Stars: ✭ 26 (-73.74%)
Mutual labels:  onedrive
Onedrive
Free Client for OneDrive on Linux
Stars: ✭ 3,903 (+3842.42%)
Mutual labels:  onedrive
Joplin
Joplin - an open source note taking and to-do application with synchronization capabilities for Windows, macOS, Linux, Android and iOS. Forum: https://discourse.joplinapp.org/
Stars: ✭ 26,916 (+27087.88%)
Mutual labels:  onedrive
Fileprovider
FileManager replacement for Local, iCloud and Remote (WebDAV/FTP/Dropbox/OneDrive) files -- Swift
Stars: ✭ 724 (+631.31%)
Mutual labels:  onedrive
Microsoft365dsc
Manages, configures, extracts and monitors Microsoft 365 tenant configurations
Stars: ✭ 374 (+277.78%)
Mutual labels:  onedrive
Onedrive Fuse Fs
Script to mount Microsoft OneDrive (formerly known as SkyDrive) folder as a FUSE filesystem
Stars: ✭ 68 (-31.31%)
Mutual labels:  onedrive
Office365 Rest Python Client
Office 365 & Microsoft Graph Library for Python
Stars: ✭ 289 (+191.92%)
Mutual labels:  onedrive
Rclone
"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Yandex Files
Stars: ✭ 30,541 (+30749.49%)
Mutual labels:  onedrive
Onemanager Php
An index & manager of Onedrive based on serverless. Can be deployed to Heroku/Glitch/SCF/FG/FC/CFC/PHP web hosting/VPS.
Stars: ✭ 1,313 (+1226.26%)
Mutual labels:  onedrive
Odindex
Onedrive index transplanted from Heymind.
Stars: ✭ 91 (-8.08%)
Mutual labels:  onedrive
Python O365
A simple python library to interact with Microsoft Graph and Office 365 API
Stars: ✭ 742 (+649.49%)
Mutual labels:  onedrive

获取OneDrive直链

本应用的目的是为了批量获取 OneDrive 直链,方便在其他站点外链。前身为提取OneDrive直链地址工具的网页版,因为原来的工具失效了,软件版也不是那么好用了,因此决定使用 OneDrive 官方 SDK 来进行获取,确保不失效。

马上使用

https://mapaler.github.io/GetOneDriveDirectLink/

因为使用官方 API 直接访问 onedrive.live.com 选择文件,因此可能需要翻墙。

隐私声明

使用微软官方 OneDrive file picker SDK,本应用不会得到你的账号密码和其他用户资料。 目前仅申请了 Files.ReadFiles.Read.Selected 两个权限,SDK 只会返回用户选择的文件的信息,不会获得未授权的其他内容。

如何自行搭建

按照OneDrive file picker SDK内的说明进行,由于旧有的Microsoft 应用注册门户已经迁移到Azure门户,特此做出更新,此版本更新于2020年2月6日。

  1. 应用注册
    Azure 门户 创建应用,自己申请一个应用 ID,然后替换本程序 script.js 内底部的 clientId
    客户端ID
    其中 odOptions.advanced.queryParameters 内容参见 DriveItem 资源类型,若不设定,将只返回基本信息。
  2. 设置身份验证
    将网页的各种东西上传到你申请 ID 时设置的 重定向 URL 即可,页面 URL 不在重定向内会发生错误。注:这个页面必须为 https(仅 localhost 可为 http,且 localhost 也需添加到 重定向 URL)
    需要勾选隐式授权访问令牌ID 令牌讨论见#9 身份验证
  3. 设置API 权限
    添加 Microsoft Graph委托的权限Files.ReadFiles.Read.Selected
    需求的权限

原理

http://storage.live.com/items/文件ID 是很早之前就流传的 SkyDrive 官方的真实直链重定向地址,出处不可考。
开始一般是用http://storage.live.com/items/文件ID?filename=xxx.jpg来外链图片,后面的文件名用来欺骗DiscuzX论坛系统,但是浏览器下载该文件还是没有正确文件名。
后来有高手发现的http://storage.live.com/items/文件ID:/xxx.jpg这个地址格式不会影响 SkyDrive 识别ID,还同时可以欺骗浏览器为普通文件地址,识别出文件的文件名与扩展名。
访问 onedrive.live.com 域名需要翻墙,但是生成的 storage.live.com 链接不需要。

1drv.ws 原理

1drv.wsThe OneDrive Direct Download Link Helper 项目的实现。
原理为

  1. 获取OneDrive的分享链接 https://1drv.ms/u/分享ID
  2. 重定向到 https://onedrive.live.com/redir?resid=文件ID&authkey=通行证
  3. 将访问网页的地址修改为下载地址 https://onedrive.live.com/download?resid=文件ID&authkey=通行证
  4. 再次重定向到真实CDN地址 https://public.ch.files.1drv.com/很长一串字符/文件名?download&psid=1

其中,对 onedrive.live.com 的重定向需要墙外后端支持。

在 OneDrive SDK 中,使用 share 操作才能新增并获取到分享链接,因此添加了“额外创建分享链接”按钮。
掩码将获取到的分享链接中的 1drv.ms 修改为 1drv.ws ,即可得到下载链接。但是这种方式的 http header content-Dispositong 值为 attachemen 会弹出下载窗口,而不是内部预览。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].