Get OneDrive direct download link by just changing the "1drv.ms" to "1drv.ws"
通过简单地改域名, 来获取OneDrive的直接下载链接。
- Get the share link, like this: https://1drv.ms/u/s!Aiw77soXua44hb4CEu6eSveUl0xUoA
- Change the domain
1drv.ms
to1drv.ws
, I mean, just flip the m to w
which becomes https://1drv.ws/u/s!Aiw77soXua44hb4CEu6eSveUl0xUoA - This IS the direct link, you can paste it to browser and see.
btw, you can add ?txt
at the end of url, to display text link, instead of a 301 redirect.
eg: https://1drv.ws/u/s!Aiw77soXua44hb4CEu6eSveUl0xUoA?txt
https://1drv.ms/t/s!Aiw11soXua11pxigLnclZsYIU_Rx
-- HTTP --> https://onedrive.live.com/redir?resid=...&authkey=!...&ithint=file%1ctxt
--MODIFY--> https://onedrive.live.com/download?resid=...!1111&authkey=!...&ithint=file%1ctxt
-- HTTP --> https://jlohlg.by.files.1drv.com/some-long-long-link/file.txt?download&psid=1
- Play OneDrive video directly in local player (eg:PotPlayer), most player support "play from url"
- dispaly as image
<img src='https://1drv.ws/u/s!Aiw77soXua44hb4CEu6eSveUl0xUoA'>
- Python 3.5+ is required.
git clone https://github.com/aploium/OneDrive-Direct-Link
cd OneDrive-Direct-Link
pip3 install -r requirements.txt
python3 app.py
- Now you got this services in your localhost.
warning: this code is simple and not fool-proof.